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

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

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:
  260|    673|{
  261|    673|  Curl_async_thrdd_destroy(data, async);
  262|    673|}
Curl_async_thrdd_destroy:
  278|  1.33k|{
  279|  1.33k|  (void)data;
  280|  1.33k|  if(async->queries_ongoing && !async->done &&
  ------------------
  |  Branch (280:6): [True: 402, False: 929]
  |  Branch (280:32): [True: 402, False: 0]
  ------------------
  281|    402|     data->multi && data->multi->resolv_thrdq) {
  ------------------
  |  Branch (281:6): [True: 201, False: 201]
  |  Branch (281:21): [True: 201, False: 0]
  ------------------
  282|       |    /* Remove any resolve items still queued */
  283|    201|    struct async_thrdd_match_ctx mctx;
  284|    201|    mctx.mid = data->mid;
  285|    201|    mctx.resolv_id = async->id;
  286|    201|    Curl_thrdq_clear(data->multi->resolv_thrdq,
  287|    201|                     async_thrdd_match_item, &mctx);
  288|    201|  }
  289|       |#ifdef USE_HTTPSRR_ARES
  290|       |  if(async->thrdd.rr.channel) {
  291|       |    ares_destroy(async->thrdd.rr.channel);
  292|       |    async->thrdd.rr.channel = NULL;
  293|       |  }
  294|       |  Curl_httpsrr_cleanup(&async->thrdd.rr.hinfo);
  295|       |#endif
  296|  1.33k|  async_thrdd_item_destroy(async->thrdd.res_A);
  297|  1.33k|  async->thrdd.res_A = NULL;
  298|  1.33k|  async_thrdd_item_destroy(async->thrdd.res_AAAA);
  299|       |  async->thrdd.res_AAAA = NULL;
  300|  1.33k|}
Curl_async_await:
  308|    107|{
  309|    107|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
  310|    107|  struct async_thrdd_ctx *thrdd = async ? &async->thrdd : NULL;
  ------------------
  |  Branch (310:35): [True: 107, False: 0]
  ------------------
  311|    107|  timediff_t milli, ms;
  312|       |
  313|    107|  if(!thrdd)
  ------------------
  |  Branch (313:6): [True: 0, False: 107]
  ------------------
  314|      0|    return CURLE_FAILED_INIT;
  315|       |
  316|   940k|  while(async->queries_ongoing && !async->done) {
  ------------------
  |  Branch (316:9): [True: 940k, False: 0]
  |  Branch (316:35): [True: 940k, False: 0]
  ------------------
  317|   940k|    Curl_async_thrdd_multi_process(data->multi);
  318|   940k|    if(async->done)
  ------------------
  |  Branch (318:8): [True: 107, False: 940k]
  ------------------
  319|    107|      break;
  320|       |
  321|   940k|    ms = curlx_ptimediff_ms(Curl_pgrs_now(data), &async->start);
  322|   940k|    if(ms < 3)
  ------------------
  |  Branch (322:8): [True: 940k, False: 189]
  ------------------
  323|   940k|      milli = 0;
  324|    189|    else if(ms <= 50)
  ------------------
  |  Branch (324:13): [True: 178, False: 11]
  ------------------
  325|    178|      milli = ms / 3;
  326|     11|    else if(ms <= 250)
  ------------------
  |  Branch (326:13): [True: 9, False: 2]
  ------------------
  327|      9|      milli = 50;
  328|      2|    else
  329|      2|      milli = 200;
  330|   940k|    CURL_TRC_DNS(data, "await, waiting %" FMT_TIMEDIFF_T "ms", milli);
  ------------------
  |  |  168|   940k|  do {                                 \
  |  |  169|   940k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|   940k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|   940k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  1.88M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 940k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 940k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  1.88M|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((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|   940k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|   940k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|   940k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 940k]
  |  |  ------------------
  ------------------
  331|   940k|    curlx_wait_ms(milli);
  332|   940k|  }
  333|    107|  return Curl_async_take_result(data, async, pdns);
  334|    107|}
Curl_async_thrdd_multi_init:
  469|  13.0k|{
  470|  13.0k|  CURLcode result;
  471|  13.0k|  DEBUGASSERT(!multi->resolv_thrdq);
  ------------------
  |  | 1077|  13.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (471:3): [True: 0, False: 13.0k]
  |  Branch (471:3): [True: 13.0k, False: 0]
  ------------------
  472|  13.0k|  result = Curl_thrdq_create(&multi->resolv_thrdq, "DNS", 0,
  473|  13.0k|                             min_threads, max_threads, idle_time_ms,
  474|  13.0k|                             async_thrdd_item_free,
  475|  13.0k|                             async_thrdd_item_process,
  476|  13.0k|                             async_thrdd_event,
  477|  13.0k|                             multi);
  478|  13.0k|#ifdef DEBUGBUILD
  479|  13.0k|  if(!result) {
  ------------------
  |  Branch (479:6): [True: 13.0k, False: 0]
  ------------------
  480|  13.0k|    const char *p = getenv("CURL_DBG_RESOLV_MAX_THREADS");
  481|  13.0k|    if(p) {
  ------------------
  |  Branch (481:8): [True: 0, False: 13.0k]
  ------------------
  482|      0|      curl_off_t l;
  483|      0|      if(!curlx_str_number(&p, &l, UINT32_MAX)) {
  ------------------
  |  Branch (483:10): [True: 0, False: 0]
  ------------------
  484|      0|        result = Curl_async_thrdd_multi_set_props(
  485|      0|          multi, min_threads, (uint32_t)l, idle_time_ms);
  486|      0|      }
  487|      0|    }
  488|  13.0k|  }
  489|  13.0k|#endif
  490|  13.0k|  return result;
  491|  13.0k|}
Curl_async_thrdd_multi_destroy:
  495|  13.0k|{
  496|  13.0k|  if(multi->resolv_thrdq) {
  ------------------
  |  Branch (496:6): [True: 13.0k, False: 0]
  ------------------
  497|  13.0k|#ifdef CURLVERBOSE
  498|  13.0k|    CURL_TRC_DNS(multi->admin, "destroy thread queue+pool, join=%d", join);
  ------------------
  |  |  168|  13.0k|  do {                                 \
  |  |  169|  13.0k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  13.0k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  13.0k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  26.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 13.0k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 13.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  26.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|  13.0k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  13.0k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  13.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 13.0k]
  |  |  ------------------
  ------------------
  499|  13.0k|    Curl_thrdq_trace(multi->resolv_thrdq, multi->admin);
  500|  13.0k|#endif
  501|  13.0k|    Curl_thrdq_destroy(multi->resolv_thrdq, join);
  502|       |    multi->resolv_thrdq = NULL;
  503|  13.0k|  }
  504|  13.0k|}
Curl_async_thrdd_multi_process:
  551|   957k|{
  552|   957k|  struct Curl_easy *data;
  553|   957k|  void *qitem;
  554|       |
  555|   958k|  while(!Curl_thrdq_recv(multi->resolv_thrdq, &qitem)) {
  ------------------
  |  Branch (555:9): [True: 275, False: 957k]
  ------------------
  556|       |    /* dispatch resolve result */
  557|    275|    struct async_thrdd_item *item = qitem;
  558|    275|    struct Curl_resolv_async *async = NULL;
  559|       |
  560|    275|    data = Curl_multi_get_easy(multi, item->mid);
  561|    275|    if(data)
  ------------------
  |  Branch (561:8): [True: 275, False: 0]
  ------------------
  562|    275|      async = Curl_async_get(data, item->resolv_id);
  563|    275|    if(async) {
  ------------------
  |  Branch (563:8): [True: 275, False: 0]
  ------------------
  564|    275|      struct async_thrdd_item **pdest = &async->thrdd.res_A;
  565|       |
  566|    275|      async->dns_responses |= item->dns_queries;
  567|    275|      --async->queries_ongoing;
  568|    275|      async->done = !async->queries_ongoing;
  569|       |
  570|    275|#ifdef CURLRES_IPV6
  571|    275|      if(item->dns_queries & CURL_DNSQ_AAAA)
  ------------------
  |  |   52|    275|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (571:10): [True: 83, False: 192]
  ------------------
  572|     83|        pdest = &async->thrdd.res_AAAA;
  573|    275|#endif
  574|    275|      if(!*pdest) {
  ------------------
  |  Branch (574:10): [True: 275, False: 0]
  ------------------
  575|    275|        VERBOSE(async_thrdd_report_item(data, item));
  ------------------
  |  | 1623|    275|#define VERBOSE(x) x
  ------------------
  576|    275|        *pdest = item;
  577|    275|        item = NULL;
  578|    275|      }
  579|      0|      else
  580|    275|        DEBUGASSERT(0); /* should not receive duplicates here */
  ------------------
  |  | 1077|    275|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (580:9): [Folded, False: 0]
  |  Branch (580:9): [Folded, False: 0]
  ------------------
  581|    275|      Curl_multi_mark_dirty(data);
  582|    275|    }
  583|    275|    async_thrdd_item_free(item);
  584|    275|  }
  585|   957k|#ifdef CURLVERBOSE
  586|   957k|  Curl_thrdq_trace(multi->resolv_thrdq, multi->admin);
  587|   957k|#endif
  588|   957k|}
Curl_async_getaddrinfo:
  629|    332|{
  630|    332|  CURLcode result = CURLE_FAILED_INIT;
  631|    332|  void *resolver = NULL;
  632|       |
  633|    332|  if(async->queries_ongoing || async->done)
  ------------------
  |  Branch (633:6): [True: 0, False: 332]
  |  Branch (633:32): [True: 0, False: 332]
  ------------------
  634|      0|    return CURLE_FAILED_INIT;
  635|       |
  636|       |#ifdef USE_HTTPSRR_ARES
  637|       |  DEBUGASSERT(!async->thrdd.rr.channel);
  638|       |  if((async->dns_queries & CURL_DNSQ_HTTPS) && !async->is_ipaddr) {
  639|       |    result = async_rr_start(data, async);
  640|       |    if(result)
  641|       |      goto out;
  642|       |    resolver = async->thrdd.rr.channel;
  643|       |  }
  644|       |#endif
  645|       |
  646|    332|  result = Curl_resolv_announce_start(data, resolver);
  647|    332|  if(result)
  ------------------
  |  Branch (647:6): [True: 0, False: 332]
  ------------------
  648|      0|    return result;
  649|       |
  650|    332|#ifdef CURLRES_IPV6
  651|       |  /* Do not start an AAAA query for an IPv4 address when
  652|       |   * we will start an A query for it. */
  653|    332|  if((async->dns_queries & CURL_DNSQ_AAAA) &&
  ------------------
  |  |   52|    332|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (653:6): [True: 233, False: 99]
  ------------------
  654|    233|     !(async->is_ipv4addr && (async->dns_queries & CURL_DNSQ_A))) {
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (654:8): [True: 0, False: 233]
  |  Branch (654:30): [True: 0, False: 0]
  ------------------
  655|    233|    result = async_thrdd_query(data, async, CURL_DNSQ_AAAA);
  ------------------
  |  |   52|    233|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  656|    233|    if(result)
  ------------------
  |  Branch (656:8): [True: 0, False: 233]
  ------------------
  657|      0|      goto out;
  658|    233|  }
  659|    332|#endif
  660|    332|  if(async->dns_queries & CURL_DNSQ_A) {
  ------------------
  |  |   51|    332|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (660:6): [True: 315, False: 17]
  ------------------
  661|    315|    result = async_thrdd_query(data, async, CURL_DNSQ_A);
  ------------------
  |  |   51|    315|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  662|    315|    if(result)
  ------------------
  |  Branch (662:8): [True: 0, False: 315]
  ------------------
  663|      0|      goto out;
  664|    315|  }
  665|       |
  666|    332|#ifdef CURLVERBOSE
  667|    332|  Curl_thrdq_trace(data->multi->resolv_thrdq, data);
  668|    332|#endif
  669|       |
  670|    332|out:
  671|    332|  if(result)
  ------------------
  |  Branch (671:6): [True: 0, False: 332]
  ------------------
  672|      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]
  |  |  ------------------
  ------------------
  673|    332|                 async->hostname, async->port, (int)result);
  674|    332|  return result;
  675|    332|}
Curl_async_pollset:
  680|    423|{
  681|    423|  timediff_t timeout_ms;
  682|       |
  683|    423|  timeout_ms = Curl_async_timeleft_ms(data, async);
  684|       |#ifdef USE_HTTPSRR_ARES
  685|       |  if(async->thrdd.rr.channel) {
  686|       |    CURLcode result = Curl_ares_pollset(data, async->thrdd.rr.channel, ps);
  687|       |    if(result)
  688|       |      return result;
  689|       |    timeout_ms = Curl_ares_timeout_ms(data, async, async->thrdd.rr.channel);
  690|       |  }
  691|       |#else
  692|    423|  (void)ps;
  693|    423|#endif
  694|       |
  695|    423|  if(!async->done) {
  ------------------
  |  Branch (695:6): [True: 423, False: 0]
  ------------------
  696|       |#ifndef ENABLE_WAKEUP
  697|       |    timediff_t stutter_ms, elapsed_ms;
  698|       |    elapsed_ms = curlx_ptimediff_ms(Curl_pgrs_now(data), &async->start);
  699|       |    if(elapsed_ms < 3)
  700|       |      stutter_ms = 1;
  701|       |    else if(elapsed_ms <= 50)
  702|       |      stutter_ms = elapsed_ms / 3;
  703|       |    else if(elapsed_ms <= 250)
  704|       |      stutter_ms = 50;
  705|       |    else
  706|       |      stutter_ms = 200;
  707|       |    timeout_ms = CURLMIN(stutter_ms, timeout_ms);
  708|       |#endif
  709|    423|    Curl_expire(data, timeout_ms, EXPIRE_ASYNC_NAME);
  710|    423|  }
  711|    423|  return CURLE_OK;
  712|    423|}
Curl_async_take_result:
  722|    554|{
  723|    554|  struct async_thrdd_ctx *thrdd = &async->thrdd;
  724|    554|  struct Curl_dns_entry *dns = NULL;
  725|    554|  CURLcode result = CURLE_OK;
  726|       |
  727|    554|  DEBUGASSERT(pdns);
  ------------------
  |  | 1077|    554|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (727:3): [True: 0, False: 554]
  |  Branch (727:3): [True: 554, False: 0]
  ------------------
  728|    554|  *pdns = NULL;
  729|    554|  if(!async->queries_ongoing && !async->done) {
  ------------------
  |  Branch (729:6): [True: 131, False: 423]
  |  Branch (729:33): [True: 0, False: 131]
  ------------------
  730|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (730:5): [Folded, False: 0]
  |  Branch (730:5): [Folded, False: 0]
  ------------------
  731|      0|    return CURLE_FAILED_INIT;
  732|      0|  }
  733|       |
  734|       |#ifdef USE_HTTPSRR_ARES
  735|       |  /* best effort, ignore errors */
  736|       |  if(thrdd->rr.channel)
  737|       |    (void)Curl_ares_perform(thrdd->rr.channel, 0);
  738|       |#endif
  739|       |#ifndef ENABLE_WAKEUP
  740|       |  Curl_async_thrdd_multi_process(data->multi);
  741|       |#endif
  742|       |
  743|    554|  if(!async->done)
  ------------------
  |  Branch (743:6): [True: 423, False: 131]
  ------------------
  744|    423|    return CURLE_AGAIN;
  745|       |
  746|    131|  Curl_expire_done(data, EXPIRE_ASYNC_NAME);
  747|       |
  748|       |  /* A failure is an authoritative negative answer, eligible for
  749|       |     negative caching, only when every A/AAAA query performed came
  750|       |     back answering that the name does not exist. A query that
  751|       |     failed transiently or never returned is not an answer. */
  752|    131|  {
  753|    131|    const uint8_t ip_queries =
  754|    131|      async->dns_queries & (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   51|    131|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                    async->dns_queries & (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   52|    131|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  755|    131|    bool negative = (async->dns_responses & ip_queries) == ip_queries;
  756|    131|    if(thrdd->res_A && (thrdd->res_A->res || !thrdd->res_A->negative))
  ------------------
  |  Branch (756:8): [True: 115, False: 16]
  |  Branch (756:25): [True: 6, False: 109]
  |  Branch (756:46): [True: 1, False: 108]
  ------------------
  757|      7|      negative = FALSE;
  ------------------
  |  | 1054|      7|#define FALSE false
  ------------------
  758|    131|    if(thrdd->res_AAAA && (thrdd->res_AAAA->res || !thrdd->res_AAAA->negative))
  ------------------
  |  Branch (758:8): [True: 40, False: 91]
  |  Branch (758:28): [True: 2, False: 38]
  |  Branch (758:52): [True: 2, False: 36]
  ------------------
  759|      4|      negative = FALSE;
  ------------------
  |  | 1054|      4|#define FALSE false
  ------------------
  760|    131|    if(!thrdd->res_A && !thrdd->res_AAAA)
  ------------------
  |  Branch (760:8): [True: 16, False: 115]
  |  Branch (760:25): [True: 0, False: 16]
  ------------------
  761|      0|      negative = FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  762|    131|    async->negative_answer = negative;
  763|    131|  }
  764|       |
  765|    131|  if(async->result) {
  ------------------
  |  Branch (765:6): [True: 0, False: 131]
  ------------------
  766|      0|    result = async->result;
  767|      0|    goto out;
  768|      0|  }
  769|       |
  770|    131|  if((thrdd->res_A && thrdd->res_A->res) ||
  ------------------
  |  Branch (770:7): [True: 115, False: 16]
  |  Branch (770:23): [True: 6, False: 109]
  ------------------
  771|    125|     (thrdd->res_AAAA && thrdd->res_AAAA->res)) {
  ------------------
  |  Branch (771:7): [True: 40, False: 85]
  |  Branch (771:26): [True: 2, False: 38]
  ------------------
  772|      8|    dns = Curl_dnscache_mk_entry2(
  773|      8|      data, async->dns_queries,
  774|      8|      thrdd->res_A ? &thrdd->res_A->res : NULL,
  ------------------
  |  Branch (774:7): [True: 6, False: 2]
  ------------------
  775|      8|      thrdd->res_AAAA ? &thrdd->res_AAAA->res : NULL,
  ------------------
  |  Branch (775:7): [True: 2, False: 6]
  ------------------
  776|      8|      async->hostname, async->port);
  777|      8|    if(!dns) {
  ------------------
  |  Branch (777:8): [True: 0, False: 8]
  ------------------
  778|      0|      result = CURLE_OUT_OF_MEMORY;
  779|      0|      goto out;
  780|      0|    }
  781|       |
  782|       |#ifdef USE_HTTPSRR_ARES
  783|       |    if(thrdd->rr.channel) {
  784|       |      struct Curl_https_rrinfo *lhrr = NULL;
  785|       |      if(thrdd->rr.hinfo.complete) {
  786|       |        lhrr = Curl_httpsrr_dup_move(&thrdd->rr.hinfo);
  787|       |        if(!lhrr) {
  788|       |          result = CURLE_OUT_OF_MEMORY;
  789|       |          goto out;
  790|       |        }
  791|       |      }
  792|       |      Curl_httpsrr_trace(data, lhrr);
  793|       |      Curl_dns_entry_set_https_rr(dns, lhrr);
  794|       |    }
  795|       |#endif
  796|      8|  }
  797|       |
  798|    131|  if(dns) {
  ------------------
  |  Branch (798:6): [True: 8, False: 123]
  ------------------
  799|      8|    *pdns = dns;
  800|      8|    dns = NULL;
  801|      8|  }
  802|    131|#ifdef CURLVERBOSE
  803|    131|  Curl_thrdq_trace(data->multi->resolv_thrdq, data);
  804|    131|#endif
  805|       |
  806|    131|out:
  807|    131|  Curl_dns_entry_unlink(data, &dns);
  808|    131|  Curl_async_thrdd_shutdown(data, async);
  809|    131|  if(!result && !*pdns)
  ------------------
  |  Branch (809:6): [True: 131, False: 0]
  |  Branch (809:17): [True: 123, False: 8]
  ------------------
  810|    123|    result = Curl_async_failed(data, async, NULL);
  811|    131|  if(result &&
  ------------------
  |  Branch (811:6): [True: 123, False: 8]
  ------------------
  812|    123|     (result != CURLE_COULDNT_RESOLVE_HOST) &&
  ------------------
  |  Branch (812:6): [True: 12, False: 111]
  ------------------
  813|     12|     (result != CURLE_COULDNT_RESOLVE_PROXY)) {
  ------------------
  |  Branch (813:6): [True: 0, False: 12]
  ------------------
  814|      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]
  |  |  ------------------
  ------------------
  815|      0|                 (int)result, async->hostname, async->port);
  816|      0|  }
  817|    131|  return result;
  818|    131|}
Curl_async_get_ai:
  839|    190|{
  840|    190|  struct async_thrdd_ctx *thrdd = &async->thrdd;
  841|       |
  842|    190|  (void)data;
  843|    190|  switch(ai_family) {
  844|    108|  case AF_INET:
  ------------------
  |  Branch (844:3): [True: 108, False: 82]
  ------------------
  845|    108|    if(thrdd->res_A)
  ------------------
  |  Branch (845:8): [True: 0, False: 108]
  ------------------
  846|      0|      return async_thrdd_get_ai(thrdd->res_A->res, ai_family, index);
  847|    108|    break;
  848|    108|#ifdef USE_IPV6
  849|    108|  case AF_INET6:
  ------------------
  |  Branch (849:3): [True: 82, False: 108]
  ------------------
  850|     82|    if(thrdd->res_AAAA)
  ------------------
  |  Branch (850:8): [True: 82, False: 0]
  ------------------
  851|     82|      return async_thrdd_get_ai(thrdd->res_AAAA->res, ai_family, index);
  852|      0|    break;
  853|      0|#endif
  854|      0|  default:
  ------------------
  |  Branch (854:3): [True: 0, False: 190]
  ------------------
  855|      0|    break;
  856|    190|  }
  857|    108|  return NULL;
  858|    190|}
asyn-thrdd.c:async_thrdd_match_item:
  270|    114|{
  271|    114|  const struct async_thrdd_match_ctx *ctx = match_data;
  272|    114|  struct async_thrdd_item *item = qitem;
  273|    114|  return (item->mid == ctx->mid) && (item->resolv_id == ctx->resolv_id);
  ------------------
  |  Branch (273:10): [True: 114, False: 0]
  |  Branch (273:37): [True: 114, False: 0]
  ------------------
  274|    114|}
asyn-thrdd.c:async_thrdd_item_destroy:
  131|  3.21k|{
  132|  3.21k|  if(item) {
  ------------------
  |  Branch (132:6): [True: 548, False: 2.66k]
  ------------------
  133|    548|    if(item->res)
  ------------------
  |  Branch (133:8): [True: 0, False: 548]
  ------------------
  134|      0|      Curl_freeaddrinfo(item->res);
  135|    548|    curlx_free(item);
  ------------------
  |  | 1488|    548|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  136|    548|  }
  137|  3.21k|}
asyn-thrdd.c:async_thrdd_item_free:
  460|    548|{
  461|    548|  async_thrdd_item_destroy(item);
  462|    548|}
asyn-thrdd.c:async_thrdd_item_process:
  360|    538|{
  361|    538|  struct async_thrdd_item *item = arg;
  362|    538|  struct addrinfo hints;
  363|    538|  char service[12];
  364|    538|  int pf = PF_INET;
  365|    538|  int rc;
  366|       |
  367|    538|#ifdef DEBUGBUILD
  368|    538|  if(item->delay_ms) {
  ------------------
  |  Branch (368:6): [True: 0, False: 538]
  ------------------
  369|      0|    curlx_wait_ms(item->delay_ms);
  370|      0|  }
  371|    538|  if(item->delay_fail_ms) {
  ------------------
  |  Branch (371:6): [True: 0, False: 538]
  ------------------
  372|      0|    curlx_wait_ms(item->delay_fail_ms);
  373|      0|    item->negative = item->dbg_negative;
  374|      0|    return;
  375|      0|  }
  376|    538|#endif
  377|       |
  378|    538|  memset(&hints, 0, sizeof(hints));
  379|    538|#ifdef CURLRES_IPV6
  380|    538|  if(item->dns_queries & CURL_DNSQ_AAAA) {
  ------------------
  |  |   52|    538|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (380:6): [True: 233, False: 305]
  ------------------
  381|    233|    pf = (item->dns_queries & CURL_DNSQ_A) ? PF_UNSPEC : PF_INET6;
  ------------------
  |  |   51|    233|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (381:10): [True: 0, False: 233]
  ------------------
  382|    233|  }
  383|    538|#endif
  384|    538|  hints.ai_family = pf;
  385|    538|  hints.ai_socktype = Curl_socktype_for_transport(item->transport);
  386|    538|  hints.ai_protocol = Curl_protocol_for_transport(item->transport);
  387|       |#ifdef __APPLE__
  388|       |  /* If we leave `ai_flags == 0` then macOS is looking for IPV4MAPPED
  389|       |   * when doing AAAA queries. We do not want this "help". */
  390|       |  hints.ai_flags = AI_ADDRCONFIG;
  391|       |#endif
  392|       |
  393|    538|  curl_msnprintf(service, sizeof(service), "%u", item->port);
  394|    538|#ifdef AI_NUMERICSERV
  395|    538|  hints.ai_flags |= AI_NUMERICSERV;
  396|    538|#endif
  397|       |
  398|    538|  rc = Curl_getaddrinfo_ex(item->hostname, service, &hints, &item->res);
  399|    538|  if(rc) {
  ------------------
  |  Branch (399:6): [True: 530, False: 8]
  ------------------
  400|    530|    item->sockerr = SOCKERRNO ? SOCKERRNO : rc;
  ------------------
  |  | 1091|    530|#define SOCKERRNO         errno
  ------------------
                  item->sockerr = SOCKERRNO ? SOCKERRNO : rc;
  ------------------
  |  | 1091|    530|#define SOCKERRNO         errno
  ------------------
  |  Branch (400:21): [True: 9, False: 521]
  ------------------
  401|    530|    if(item->sockerr == 0)
  ------------------
  |  Branch (401:8): [True: 0, False: 530]
  ------------------
  402|      0|      item->sockerr = RESOLVER_ENOMEM;
  ------------------
  |  |   46|      0|#define RESOLVER_ENOMEM  EAI_MEMORY  /* = WSA_NOT_ENOUGH_MEMORY on Windows */
  ------------------
  403|    530|    item->negative = gai_negative(rc);
  404|    530|  }
  405|      8|  else {
  406|      8|    Curl_addrinfo_set_port(item->res, item->port);
  407|      8|  }
  408|    538|}
asyn-thrdd.c:gai_negative:
  343|    530|{
  344|    530|  switch(rc) {
  345|      0|#ifdef EAI_NONAME
  346|    512|  case EAI_NONAME:
  ------------------
  |  Branch (346:3): [True: 512, False: 18]
  ------------------
  347|    512|#endif
  348|    512|#if defined(EAI_NODATA) && \
  349|    512|  (!defined(EAI_NONAME) || (EAI_NODATA != EAI_NONAME))
  350|    527|  case EAI_NODATA:
  ------------------
  |  Branch (350:3): [True: 15, False: 515]
  ------------------
  351|    527|#endif
  352|    527|    return TRUE;
  ------------------
  |  | 1051|    527|#define TRUE true
  ------------------
  353|      3|  default:
  ------------------
  |  Branch (353:3): [True: 3, False: 527]
  ------------------
  354|       |    return FALSE;
  ------------------
  |  | 1054|      3|#define FALSE false
  ------------------
  355|    530|  }
  356|    530|}
asyn-thrdd.c:async_thrdd_event:
  444|    380|{
  445|    380|  struct Curl_multi *multi = user_data;
  446|    380|  (void)tqueue;
  447|    380|  switch(ev) {
  448|    380|  case CURL_THRDQ_EV_ITEM_DONE:
  ------------------
  |  Branch (448:3): [True: 380, False: 0]
  ------------------
  449|    380|    (void)curl_multi_wakeup(multi);
  450|    380|    break;
  451|      0|  default:
  ------------------
  |  Branch (451:3): [True: 0, False: 380]
  ------------------
  452|      0|    break;
  453|    380|  }
  454|    380|}
asyn-thrdd.c:async_thrdd_report_item:
  509|    275|{
  510|    275|  char buf[MAX_IPADR_LEN];
  511|    275|  struct dynbuf tmp;
  512|    275|  const char *sep = "";
  513|    275|  const struct Curl_addrinfo *ai = item->res;
  514|    275|  CURLcode result;
  515|    275|  int ai_family;
  516|    275|#ifdef USE_IPV6
  517|    275|  ai_family = (item->dns_queries & CURL_DNSQ_AAAA) ? AF_INET6 : AF_INET;
  ------------------
  |  |   52|    275|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (517:15): [True: 83, False: 192]
  ------------------
  518|       |#else
  519|       |  ai_family = AF_INET;
  520|       |#endif
  521|       |
  522|    275|  if(!CURL_TRC_DNS_is_verbose(data))
  ------------------
  |  |  137|    275|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  ------------------
  |  |  |  |  326|    275|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    550|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 275, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 275]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    550|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((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|    275|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  523|    275|    return;
  524|       |
  525|      0|  curlx_dyn_init(&tmp, 1024);
  526|      0|  for(; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (526:9): [True: 0, False: 0]
  ------------------
  527|      0|    if(ai->ai_family == ai_family) {
  ------------------
  |  Branch (527:8): [True: 0, False: 0]
  ------------------
  528|      0|      Curl_printable_address(ai, buf, sizeof(buf));
  529|      0|      result = curlx_dyn_addf(&tmp, "%s%s", sep, buf);
  530|      0|      if(result) {
  ------------------
  |  Branch (530:10): [True: 0, False: 0]
  ------------------
  531|      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]
  |  |  ------------------
  ------------------
  532|      0|        goto out;
  533|      0|      }
  534|      0|      sep = ", ";
  535|      0|    }
  536|      0|  }
  537|       |
  538|      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]
  |  |  ------------------
  ------------------
  539|      0|               item->hostname, item->port,
  540|      0|               (item->dns_queries & CURL_DNSQ_AAAA) ? '6' : '4',
  541|      0|               (curlx_dyn_len(&tmp) ? curlx_dyn_ptr(&tmp) : "(none)"));
  542|      0|out:
  543|      0|  curlx_dyn_free(&tmp);
  544|      0|}
asyn-thrdd.c:async_thrdd_query:
  602|    548|{
  603|    548|  struct async_thrdd_item *item;
  604|    548|  CURLcode result;
  605|       |
  606|    548|  item = async_thrdd_item_create(data, async->id, dns_queries,
  607|    548|                                 async->hostname, async->port,
  608|    548|                                 async->transport);
  609|    548|  if(!item) {
  ------------------
  |  Branch (609:6): [True: 0, False: 548]
  ------------------
  610|      0|    result = CURLE_OUT_OF_MEMORY;
  611|      0|    goto out;
  612|      0|  }
  613|    548|  CURL_TRC_DNS(data, "queueing query %s", item->description);
  ------------------
  |  |  168|    548|  do {                                 \
  |  |  169|    548|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|    548|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    548|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  1.09k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 548, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 548]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  1.09k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((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|    548|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|    548|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|    548|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 548]
  |  |  ------------------
  ------------------
  614|    548|  result = Curl_thrdq_send(data->multi->resolv_thrdq, item,
  615|    548|                           async_item_description(item), async->timeout_ms);
  ------------------
  |  |  104|    548|#define async_item_description(x)   (x)->description
  ------------------
  616|    548|  if(result)
  ------------------
  |  Branch (616:6): [True: 0, False: 548]
  ------------------
  617|      0|    goto out;
  618|    548|  item = NULL;
  619|    548|  async->queries_ongoing++;
  620|       |
  621|    548|out:
  622|    548|  if(item)
  ------------------
  |  Branch (622:6): [True: 0, False: 548]
  ------------------
  623|      0|    async_thrdd_item_free(item);
  624|    548|  return result;
  625|    548|}
asyn-thrdd.c:async_thrdd_item_create:
  145|    548|{
  146|    548|  size_t hostlen = strlen(hostname);
  147|    548|  struct async_thrdd_item *item;
  148|       |
  149|    548|  item = curlx_calloc(1, sizeof(*item) + hostlen);
  ------------------
  |  | 1485|    548|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  150|    548|  if(!item)
  ------------------
  |  Branch (150:6): [True: 0, False: 548]
  ------------------
  151|      0|    return NULL;
  152|       |
  153|    548|  if(hostlen) /* NUL byte of name already in struct size */
  ------------------
  |  Branch (153:6): [True: 548, False: 0]
  ------------------
  154|    548|    memcpy(item->hostname, hostname, hostlen);
  155|    548|  item->mid = data->mid;
  156|    548|  item->resolv_id = resolv_id;
  157|    548|  item->dns_queries = dns_queries;
  158|    548|  item->port = port;
  159|    548|  item->transport = transport;
  160|       |
  161|    548|#ifdef CURLVERBOSE
  162|    548|  curl_msnprintf(item->description, sizeof(item->description),
  163|    548|                 "[%" FMT_OFF_T "/%u] %s %s:%u",
  164|    548|                 data->id, item->resolv_id,
  165|    548|                 Curl_resolv_query_str(dns_queries),
  166|    548|                 item->hostname, item->port);
  167|    548|#endif
  168|       |
  169|    548|#ifdef DEBUGBUILD
  170|    548|  {
  171|    548|    const char *p = getenv("CURL_DBG_RESOLV_DELAY");
  172|    548|    if(p) {
  ------------------
  |  Branch (172:8): [True: 0, False: 548]
  ------------------
  173|      0|      curl_off_t l;
  174|      0|      if(!curlx_str_number(&p, &l, UINT32_MAX)) {
  ------------------
  |  Branch (174:10): [True: 0, False: 0]
  ------------------
  175|      0|        item->delay_ms = (uint32_t)l;
  176|      0|      }
  177|      0|    }
  178|    548|    p = getenv("CURL_DBG_RESOLV_FAIL_DELAY");
  179|    548|    if(p) {
  ------------------
  |  Branch (179:8): [True: 0, False: 548]
  ------------------
  180|      0|      curl_off_t l;
  181|      0|      if(!curlx_str_number(&p, &l, UINT32_MAX)) {
  ------------------
  |  Branch (181:10): [True: 0, False: 0]
  ------------------
  182|      0|        unsigned char c = 0;
  183|      0|        Curl_rand_bytes(data, FALSE, &c, 1);
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  184|      0|        item->delay_fail_ms = (uint32_t)l + c;
  185|      0|      }
  186|      0|    }
  187|    548|    if(getenv("CURL_DBG_RESOLV_FAIL_NEGATIVE"))
  ------------------
  |  Branch (187:8): [True: 0, False: 548]
  ------------------
  188|      0|      item->dbg_negative = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  189|    548|  }
  190|    548|#endif
  191|       |
  192|    548|  return item;
  193|    548|}
asyn-thrdd.c:async_thrdd_get_ai:
  823|     82|{
  824|     82|  unsigned int i = 0;
  825|     82|  for(i = 0; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (825:14): [True: 0, False: 82]
  ------------------
  826|      0|    if(ai->ai_family == ai_family) {
  ------------------
  |  Branch (826:8): [True: 0, False: 0]
  ------------------
  827|      0|      if(i == index)
  ------------------
  |  Branch (827:10): [True: 0, False: 0]
  ------------------
  828|      0|        return ai;
  829|      0|      ++i;
  830|      0|    }
  831|      0|  }
  832|     82|  return NULL;
  833|     82|}

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

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

Curl_cf_dns_add:
  406|  7.93k|{
  407|  7.93k|  struct Curl_cfilter *cf = NULL;
  408|  7.93k|  bool for_proxy = FALSE;
  ------------------
  |  | 1054|  7.93k|#define FALSE false
  ------------------
  409|  7.93k|  CURLcode result;
  410|       |
  411|  7.93k|  if(!peer)
  ------------------
  |  Branch (411:6): [True: 0, False: 7.93k]
  ------------------
  412|      0|    return CURLE_FAILED_INIT;
  413|  7.93k|#ifndef CURL_DISABLE_PROXY
  414|  7.93k|  for_proxy = (peer == conn->socks_proxy.peer) ||
  ------------------
  |  Branch (414:15): [True: 272, False: 7.66k]
  ------------------
  415|  7.66k|              (peer == conn->http_proxy.peer);
  ------------------
  |  Branch (415:15): [True: 1.90k, False: 5.75k]
  ------------------
  416|  7.93k|#endif
  417|       |
  418|  7.93k|  result = cf_dns_create(&cf, data, peer, dns_queries, transport,
  419|  7.93k|                         for_proxy, FALSE);
  ------------------
  |  | 1054|  7.93k|#define FALSE false
  ------------------
  420|  7.93k|  if(result)
  ------------------
  |  Branch (420:6): [True: 0, False: 7.93k]
  ------------------
  421|      0|    goto out;
  422|  7.93k|  Curl_conn_cf_add(data, conn, sockindex, cf);
  423|  7.93k|out:
  424|  7.93k|  return result;
  425|  7.93k|}
Curl_cf_dns_insert_after:
  439|     85|{
  440|     85|  struct Curl_cfilter *cf;
  441|     85|  CURLcode result;
  442|       |
  443|     85|  result = cf_dns_create(&cf, data, peer, dns_queries, transport,
  444|     85|                         FALSE, complete_resolve);
  ------------------
  |  | 1054|     85|#define FALSE false
  ------------------
  445|     85|  if(result)
  ------------------
  |  Branch (445:6): [True: 0, False: 85]
  ------------------
  446|      0|    return result;
  447|       |
  448|     85|  Curl_conn_cf_insert_after(cf_at, cf);
  449|     85|  return CURLE_OK;
  450|     85|}
Curl_conn_dns_result:
  482|  7.44k|{
  483|  7.44k|  return cf_dns_result(conn->cfilter[sockindex], peer);
  484|  7.44k|}
Curl_cf_dns_get_ai:
  519|  15.6k|{
  520|  15.6k|  (void)data;
  521|  15.6k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (521:9): [True: 15.6k, False: 0]
  ------------------
  522|  15.6k|    if(cf->cft == &Curl_cft_dns) {
  ------------------
  |  Branch (522:8): [True: 15.6k, False: 0]
  ------------------
  523|  15.6k|      struct cf_dns_ctx *ctx = cf->ctx;
  524|  15.6k|      if(Curl_peer_same_destination(ctx->peer, peer)) {
  ------------------
  |  Branch (524:10): [True: 15.6k, False: 0]
  ------------------
  525|  15.6k|        if(ctx->resolv_result)
  ------------------
  |  Branch (525:12): [True: 0, False: 15.6k]
  ------------------
  526|      0|          return NULL;
  527|  15.6k|        else if(ctx->dns)
  ------------------
  |  Branch (527:17): [True: 15.4k, False: 216]
  ------------------
  528|  15.4k|          return cf_dns_get_nth_ai(cf, ctx->dns->addr, ai_family, index);
  529|    216|        else
  530|    216|          return Curl_resolv_get_ai(data, ctx->resolv_id, ai_family, index);
  531|  15.6k|      }
  532|  15.6k|    }
  533|  15.6k|  }
  534|      0|  return NULL;
  535|  15.6k|}
Curl_conn_dns_get_ai:
  546|  15.5k|{
  547|  15.5k|  struct connectdata *conn = data->conn;
  548|  15.5k|  return Curl_cf_dns_get_ai(conn->cfilter[sockindex], data, peer,
  549|  15.5k|                            ai_family, index);
  550|  15.5k|}
cf-dns.c:cf_dns_destroy:
  306|  8.01k|{
  307|  8.01k|  struct cf_dns_ctx *ctx = cf->ctx;
  308|       |
  309|  8.01k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  8.01k|  do {                                          \
  |  |  154|  8.01k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  8.01k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  16.0k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 8.01k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 8.01k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  16.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]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  8.01k|   (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.01k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  8.01k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 8.01k]
  |  |  ------------------
  ------------------
  310|  8.01k|  cf_dns_ctx_destroy(data, ctx);
  311|  8.01k|}
cf-dns.c:cf_dns_ctx_destroy:
   77|  8.01k|{
   78|  8.01k|  if(ctx) {
  ------------------
  |  Branch (78:6): [True: 8.01k, False: 0]
  ------------------
   79|  8.01k|    Curl_peer_unlink(&ctx->peer);
   80|  8.01k|    Curl_dns_entry_unlink(data, &ctx->dns);
   81|  8.01k|    curlx_free(ctx);
  ------------------
  |  | 1488|  8.01k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   82|  8.01k|  }
   83|  8.01k|}
cf-dns.c:cf_dns_connect:
  247|  8.79k|{
  248|  8.79k|  struct cf_dns_ctx *ctx = cf->ctx;
  249|       |
  250|  8.79k|  if(cf->connected) {
  ------------------
  |  Branch (250:6): [True: 23, False: 8.77k]
  ------------------
  251|     23|    *done = TRUE;
  ------------------
  |  | 1051|     23|#define TRUE true
  ------------------
  252|     23|    return CURLE_OK;
  253|     23|  }
  254|       |
  255|  8.77k|  *done = FALSE;
  ------------------
  |  | 1054|  8.77k|#define FALSE false
  ------------------
  256|  8.77k|  if(!ctx->started) {
  ------------------
  |  Branch (256:6): [True: 8.01k, False: 757]
  ------------------
  257|  8.01k|    ctx->started = TRUE;
  ------------------
  |  | 1051|  8.01k|#define TRUE true
  ------------------
  258|  8.01k|    ctx->resolv_result = cf_dns_start(cf, data, &ctx->dns);
  259|  8.01k|  }
  260|       |
  261|  8.77k|  if(!ctx->dns && !ctx->resolv_result) {
  ------------------
  |  Branch (261:6): [True: 1.09k, False: 7.67k]
  |  Branch (261:19): [True: 1.07k, False: 19]
  ------------------
  262|  1.07k|    ctx->resolv_result =
  263|  1.07k|      Curl_resolv_take_result(data, ctx->resolv_id, &ctx->dns);
  264|  1.07k|  }
  265|       |
  266|  8.77k|  if(ctx->resolv_result) {
  ------------------
  |  Branch (266:6): [True: 163, False: 8.61k]
  ------------------
  267|    163|    CURL_TRC_CF(data, cf, "error resolving: %d", (int)ctx->resolv_result);
  ------------------
  |  |  153|    163|  do {                                          \
  |  |  154|    163|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    163|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    326|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 163, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 163]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    326|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((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|    163|   (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|    163|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    163|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 163]
  |  |  ------------------
  ------------------
  268|    163|    return ctx->resolv_result;
  269|    163|  }
  270|       |
  271|  8.61k|  if(ctx->dns && !ctx->announced) {
  ------------------
  |  Branch (271:6): [True: 7.67k, False: 933]
  |  Branch (271:18): [True: 7.45k, False: 222]
  ------------------
  272|  7.45k|    ctx->announced = TRUE;
  ------------------
  |  | 1051|  7.45k|#define TRUE true
  ------------------
  273|  7.45k|    if(cf->sockindex == FIRSTSOCKET) {
  ------------------
  |  |  245|  7.45k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (273:8): [True: 7.45k, False: 0]
  ------------------
  274|  7.45k|      cf->conn->bits.dns_resolved = TRUE;
  ------------------
  |  | 1051|  7.45k|#define TRUE true
  ------------------
  275|  7.45k|      Curl_pgrsTime(data, TIMER_NAMELOOKUP);
  276|  7.45k|    }
  277|  7.45k|    cf_dns_report(cf, data, ctx->dns);
  278|  7.45k|  }
  279|       |
  280|  8.61k|  if(!cf_dns_ready_to_connect(cf, data)) {
  ------------------
  |  Branch (280:6): [True: 845, False: 7.76k]
  ------------------
  281|    845|    return CURLE_OK;
  282|    845|  }
  283|       |
  284|  7.76k|  if(cf->next && !cf->next->connected) {
  ------------------
  |  Branch (284:6): [True: 7.76k, False: 0]
  |  Branch (284:18): [True: 7.66k, False: 100]
  ------------------
  285|  7.66k|    bool sub_done;
  286|  7.66k|    CURLcode result = Curl_conn_cf_connect(cf->next, data, &sub_done);
  287|  7.66k|    if(result || !sub_done)
  ------------------
  |  Branch (287:8): [True: 3.91k, False: 3.75k]
  |  Branch (287:18): [True: 342, False: 3.40k]
  ------------------
  288|  4.25k|      return result;
  289|  3.40k|    DEBUGASSERT(sub_done);
  ------------------
  |  | 1077|  3.40k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (289:5): [True: 0, False: 3.40k]
  |  Branch (289:5): [True: 3.40k, False: 0]
  ------------------
  290|  3.40k|  }
  291|       |
  292|       |  /* sub filter chain is connected */
  293|  3.50k|  CURL_TRC_CF(data, cf, "connected filter chain below");
  ------------------
  |  |  153|  3.50k|  do {                                          \
  |  |  154|  3.50k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  3.50k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  7.01k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 3.50k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 3.50k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  7.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|  3.50k|   (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.50k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.50k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.50k]
  |  |  ------------------
  ------------------
  294|  3.50k|  if(ctx->complete_resolve && !ctx->dns && !ctx->resolv_result) {
  ------------------
  |  Branch (294:6): [True: 100, False: 3.40k]
  |  Branch (294:31): [True: 34, False: 66]
  |  Branch (294:44): [True: 34, False: 0]
  ------------------
  295|       |    /* This filter only connects when it has resolved everything. */
  296|     34|    CURL_TRC_CF(data, cf, "delay connect until resolve complete");
  ------------------
  |  |  153|     34|  do {                                          \
  |  |  154|     34|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     34|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     68|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 34, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 34]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     68|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((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|     34|   (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|     34|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     34|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 34]
  |  |  ------------------
  ------------------
  297|     34|    return CURLE_OK;
  298|     34|  }
  299|  3.47k|  *done = TRUE;
  ------------------
  |  | 1051|  3.47k|#define TRUE true
  ------------------
  300|       |  cf->connected = TRUE;
  ------------------
  |  | 1051|  3.47k|#define TRUE true
  ------------------
  301|  3.47k|  Curl_resolv_destroy(data, ctx->resolv_id);
  302|  3.47k|  return CURLE_OK;
  303|  3.50k|}
cf-dns.c:cf_dns_start:
  165|  8.01k|{
  166|  8.01k|  struct cf_dns_ctx *ctx = cf->ctx;
  167|  8.01k|  timediff_t timeout_ms = Curl_timeleft_ms(data);
  168|  8.01k|  CURLcode result;
  169|       |
  170|  8.01k|  *pdns = NULL;
  171|       |
  172|  8.01k|  CURL_TRC_CF(data, cf, "cf_dns_start %s %s:%u",
  ------------------
  |  |  153|  8.01k|  do {                                          \
  |  |  154|  8.01k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  8.01k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  16.0k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 8.01k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 8.01k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  16.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]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  8.01k|   (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.01k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|  8.01k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 8.01k]
  |  |  ------------------
  ------------------
  173|  8.01k|              ctx->peer->unix_socket ? "unix-domain-socket" : "host",
  174|  8.01k|              ctx->peer->hostname, ctx->peer->port);
  175|  8.01k|  if(ctx->peer->unix_socket)
  ------------------
  |  Branch (175:6): [True: 24, False: 7.99k]
  ------------------
  176|     24|    ctx->dns_queries = 0;
  177|  7.99k|  else if(Curl_is_ipv4addr(ctx->peer->hostname))
  ------------------
  |  Branch (177:11): [True: 7.32k, False: 667]
  ------------------
  178|  7.32k|    ctx->dns_queries |= CURL_DNSQ_A;
  ------------------
  |  |   51|  7.32k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  179|    667|#ifdef USE_IPV6
  180|    667|  else if(ctx->peer->ipv6)
  ------------------
  |  Branch (180:11): [True: 60, False: 607]
  ------------------
  181|     60|    ctx->dns_queries |= CURL_DNSQ_AAAA;
  ------------------
  |  |   52|     60|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  182|  8.01k|#endif
  183|       |
  184|  8.01k|  result = Curl_resolv(data, ctx->peer, ctx->dns_queries, ctx->transport,
  185|  8.01k|                       (bool)ctx->for_proxy, timeout_ms,
  186|  8.01k|                       &ctx->resolv_id, pdns);
  187|  8.01k|  DEBUGASSERT(!result || !*pdns);
  ------------------
  |  | 1077|  8.01k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (187:3): [True: 8.01k, False: 0]
  |  Branch (187:3): [True: 0, False: 0]
  |  Branch (187:3): [True: 7.45k, False: 561]
  |  Branch (187:3): [True: 561, False: 0]
  ------------------
  188|  8.01k|  if(!result) { /* resolved right away, either sync or from dnscache */
  ------------------
  |  Branch (188:6): [True: 7.45k, False: 561]
  ------------------
  189|  7.45k|    DEBUGASSERT(*pdns);
  ------------------
  |  | 1077|  7.45k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (189:5): [True: 0, False: 7.45k]
  |  Branch (189:5): [True: 7.45k, False: 0]
  ------------------
  190|  7.45k|    return CURLE_OK;
  191|  7.45k|  }
  192|    561|  else if(result == CURLE_AGAIN) { /* async resolv in progress */
  ------------------
  |  Branch (192:11): [True: 542, False: 19]
  ------------------
  193|    542|    return CURLE_OK;
  194|    542|  }
  195|     19|  else if(result == CURLE_OPERATION_TIMEDOUT) { /* took too long */
  ------------------
  |  Branch (195:11): [True: 0, False: 19]
  ------------------
  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|     19|  else {
  203|     19|    DEBUGASSERT(result);
  ------------------
  |  | 1077|     19|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (203:5): [True: 0, False: 19]
  |  Branch (203:5): [True: 19, False: 0]
  ------------------
  204|     19|    failf(data, "Could not resolve: %s", ctx->peer->hostname);
  ------------------
  |  |   62|     19|#define failf Curl_failf
  ------------------
  205|     19|    return result;
  206|     19|  }
  207|  8.01k|}
cf-dns.c:cf_dns_report:
  116|  7.45k|{
  117|  7.45k|  struct cf_dns_ctx *ctx = cf->ctx;
  118|  7.45k|  struct dynbuf tmp;
  119|       |
  120|  7.45k|  if(!Curl_trc_is_verbose(data) ||
  ------------------
  |  |  319|  14.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  ------------------
  |  |  |  Branch (319:4): [True: 7.45k, False: 0]
  |  |  |  Branch (319:14): [True: 0, False: 7.45k]
  |  |  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  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|  7.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|  8.61k|{
  214|  8.61k|  struct cf_dns_ctx *ctx = cf->ctx;
  215|       |
  216|  8.61k|  if(ctx->resolv_result)
  ------------------
  |  Branch (216:6): [True: 0, False: 8.61k]
  ------------------
  217|      0|    return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  218|  8.61k|  else if(ctx->dns)
  ------------------
  |  Branch (218:11): [True: 7.67k, False: 933]
  ------------------
  219|  7.67k|    return TRUE;
  ------------------
  |  | 1051|  7.67k|#define TRUE true
  ------------------
  220|    933|#ifdef USE_CURL_ASYNC
  221|    933|  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|    933|    uint8_t wanted_answers = CURL_DNSQ_AAAA;
  ------------------
  |  |   52|    933|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  225|    933|    if(Curl_conn_cf_wants_httpsrr(cf, data))
  ------------------
  |  Branch (225:8): [True: 298, False: 635]
  ------------------
  226|    298|      wanted_answers |= CURL_DNSQ_HTTPS;
  ------------------
  |  |   53|    298|#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|    933|    if(Curl_resolv_has_answers(data, ctx->resolv_id, wanted_answers))
  ------------------
  |  Branch (230:8): [True: 88, False: 845]
  ------------------
  231|     88|      return TRUE;
  ------------------
  |  | 1051|     88|#define TRUE true
  ------------------
  232|       |    /* If the wanted answers are not available after a delay,
  233|       |     * we let the connect attempts start anyway. */
  234|    845|    return Curl_resolv_elapsed_ms(data, ctx->resolv_id) >=
  235|    845|           CURL_HEV3_RESOLVE_DELAY_MS;
  ------------------
  |  |  209|    845|#define CURL_HEV3_RESOLVE_DELAY_MS    50
  ------------------
  236|    933|  }
  237|       |#else
  238|       |  (void)data;
  239|       |  DEBUGASSERT(0); /* We should not come here */
  240|       |  return FALSE;
  241|       |#endif /* USE_CURL_ASYNC */
  242|  8.61k|}
cf-dns.c:cf_dns_adjust_pollset:
  316|     61|{
  317|     61|#ifdef USE_CURL_ASYNC
  318|     61|  if(!cf->connected)
  ------------------
  |  Branch (318:6): [True: 34, False: 27]
  ------------------
  319|     34|    return Curl_resolv_pollset(data, ps);
  320|       |#else
  321|       |  (void)cf;
  322|       |  (void)data;
  323|       |  (void)ps;
  324|       |#endif
  325|     27|  return CURLE_OK;
  326|     61|}
cf-dns.c:cf_dns_cntrl:
  331|  8.01k|{
  332|  8.01k|  struct cf_dns_ctx *ctx = cf->ctx;
  333|  8.01k|  CURLcode result = CURLE_OK;
  334|       |
  335|  8.01k|  (void)arg1;
  336|  8.01k|  (void)arg2;
  337|  8.01k|  switch(event) {
  338|  4.60k|  case CF_CTRL_DATA_DONE:
  ------------------
  |  |  118|  4.60k|#define CF_CTRL_DATA_DONE               7  /* premature  NULL     ignored */
  ------------------
  |  Branch (338:3): [True: 4.60k, False: 3.41k]
  ------------------
  339|  4.60k|    if(ctx->dns) {
  ------------------
  |  Branch (339:8): [True: 4.04k, False: 561]
  ------------------
  340|       |      /* Should only come here when the connect attempt failed and
  341|       |       * `data` is giving up on it. On a successful connect, we already
  342|       |       * unlinked the DNS entry. */
  343|  4.04k|      Curl_dns_entry_unlink(data, &ctx->dns);
  344|  4.04k|    }
  345|  4.60k|    break;
  346|  3.41k|  default:
  ------------------
  |  Branch (346:3): [True: 3.41k, False: 4.60k]
  ------------------
  347|  3.41k|    break;
  348|  8.01k|  }
  349|  8.01k|  return result;
  350|  8.01k|}
cf-dns.c:cf_dns_create:
  376|  8.01k|{
  377|  8.01k|  struct Curl_cfilter *cf = NULL;
  378|  8.01k|  struct cf_dns_ctx *ctx;
  379|  8.01k|  CURLcode result = CURLE_OK;
  380|       |
  381|  8.01k|  (void)data;
  382|  8.01k|  ctx = cf_dns_ctx_create(data, peer, dns_queries, transport,
  383|  8.01k|                          for_proxy, complete_resolve);
  384|  8.01k|  if(!ctx) {
  ------------------
  |  Branch (384:6): [True: 0, False: 8.01k]
  ------------------
  385|      0|    result = CURLE_OUT_OF_MEMORY;
  386|      0|    goto out;
  387|      0|  }
  388|       |
  389|  8.01k|  result = Curl_cf_create(&cf, &Curl_cft_dns, ctx);
  390|       |
  391|  8.01k|out:
  392|  8.01k|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (392:10): [True: 0, False: 8.01k]
  ------------------
  393|  8.01k|  if(result)
  ------------------
  |  Branch (393:6): [True: 0, False: 8.01k]
  ------------------
  394|      0|    cf_dns_ctx_destroy(data, ctx);
  395|  8.01k|  return result;
  396|  8.01k|}
cf-dns.c:cf_dns_ctx_create:
   57|  8.01k|{
   58|  8.01k|  struct cf_dns_ctx *ctx;
   59|       |
   60|  8.01k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1485|  8.01k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   61|  8.01k|  if(!ctx)
  ------------------
  |  Branch (61:6): [True: 0, False: 8.01k]
  ------------------
   62|      0|    return NULL;
   63|       |
   64|  8.01k|  Curl_peer_link(&ctx->peer, peer);
   65|  8.01k|  ctx->dns_queries = dns_queries;
   66|  8.01k|  ctx->transport = transport;
   67|  8.01k|  ctx->for_proxy = for_proxy;
   68|  8.01k|  ctx->complete_resolve = complete_resolve;
   69|       |
   70|  8.01k|  CURL_TRC_DNS(data, "created DNS filter for %s:%u, transport=%x, queries=%x",
  ------------------
  |  |  168|  8.01k|  do {                                 \
  |  |  169|  8.01k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  8.01k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  8.01k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  16.0k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 8.01k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 8.01k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  16.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]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  8.01k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  8.01k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  8.01k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 8.01k]
  |  |  ------------------
  ------------------
   71|  8.01k|               peer->hostname, peer->port, ctx->transport, ctx->dns_queries);
   72|  8.01k|  return ctx;
   73|  8.01k|}
cf-dns.c:cf_dns_result:
  457|  7.44k|{
  458|  7.44k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (458:9): [True: 7.44k, False: 0]
  ------------------
  459|  7.44k|    if(cf->cft == &Curl_cft_dns) {
  ------------------
  |  Branch (459:8): [True: 7.44k, False: 0]
  ------------------
  460|  7.44k|      struct cf_dns_ctx *ctx = cf->ctx;
  461|  7.44k|      if(Curl_peer_same_destination(ctx->peer, peer)) {
  ------------------
  |  Branch (461:10): [True: 7.44k, False: 0]
  ------------------
  462|  7.44k|        if(ctx->dns || ctx->resolv_result)
  ------------------
  |  Branch (462:12): [True: 7.39k, False: 54]
  |  Branch (462:24): [True: 0, False: 54]
  ------------------
  463|  7.39k|          return ctx->resolv_result;
  464|     54|        return CURLE_AGAIN;
  465|  7.44k|      }
  466|      0|      return CURLE_OK; /* ok, but no results */
  467|  7.44k|    }
  468|  7.44k|  }
  469|      0|  return CURLE_FAILED_INIT;
  470|  7.44k|}
cf-dns.c:cf_dns_get_nth_ai:
  490|  15.4k|{
  491|  15.4k|  struct cf_dns_ctx *ctx = cf->ctx;
  492|  15.4k|  unsigned int i = 0;
  493|       |
  494|  15.4k|  if((ai_family == AF_INET) && !(ctx->dns_queries & CURL_DNSQ_A))
  ------------------
  |  |   51|  7.70k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (494:6): [True: 7.70k, False: 7.70k]
  |  Branch (494:32): [True: 0, False: 7.70k]
  ------------------
  495|      0|    return NULL;
  496|  15.4k|#ifdef USE_IPV6
  497|  15.4k|  if((ai_family == AF_INET6) && !(ctx->dns_queries & CURL_DNSQ_AAAA))
  ------------------
  |  |   52|  7.68k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (497:6): [True: 7.68k, False: 7.72k]
  |  Branch (497:33): [True: 4, False: 7.68k]
  ------------------
  498|      4|    return NULL;
  499|  15.4k|#endif
  500|  23.4k|  for(i = 0; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (500:14): [True: 15.5k, False: 7.90k]
  ------------------
  501|  15.5k|    if(ai->ai_family == ai_family) {
  ------------------
  |  Branch (501:8): [True: 7.83k, False: 7.67k]
  ------------------
  502|  7.83k|      if(i == index)
  ------------------
  |  Branch (502:10): [True: 7.50k, False: 331]
  ------------------
  503|  7.50k|        return ai;
  504|    331|      ++i;
  505|    331|    }
  506|  15.5k|  }
  507|  7.90k|  return NULL;
  508|  15.4k|}

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

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

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

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

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

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

Curl_cf_def_adjust_pollset:
   69|    572|{
   70|       |  /* NOP */
   71|    572|  (void)cf;
   72|    572|  (void)data;
   73|    572|  (void)ps;
   74|    572|  return CURLE_OK;
   75|    572|}
Curl_cf_def_data_pending:
   79|  4.69k|{
   80|  4.69k|  return cf->next ?
  ------------------
  |  Branch (80:10): [True: 15, False: 4.67k]
  ------------------
   81|     15|    cf->next->cft->has_data_pending(cf->next, data) : FALSE;
  ------------------
  |  | 1054|  4.69k|#define FALSE false
  ------------------
   82|  4.69k|}
Curl_cf_def_send:
   87|  4.69k|{
   88|  4.69k|  if(cf->next)
  ------------------
  |  Branch (88:6): [True: 4.69k, False: 0]
  ------------------
   89|  4.69k|    return cf->next->cft->do_send(cf->next, data, buf, len, eos, pnwritten);
   90|      0|  *pnwritten = 0;
   91|      0|  return CURLE_RECV_ERROR;
   92|  4.69k|}
Curl_cf_def_recv:
   96|  13.5k|{
   97|  13.5k|  if(cf->next)
  ------------------
  |  Branch (97:6): [True: 13.5k, False: 0]
  ------------------
   98|  13.5k|    return cf->next->cft->do_recv(cf->next, data, buf, len, pnread);
   99|      0|  *pnread = 0;
  100|      0|  return CURLE_SEND_ERROR;
  101|  13.5k|}
Curl_cf_def_query:
  123|  49.1k|{
  124|  49.1k|  return cf->next ?
  ------------------
  |  Branch (124:10): [True: 40.2k, False: 8.90k]
  ------------------
  125|  40.2k|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
  126|  49.1k|    CURLE_UNKNOWN_OPTION;
  127|  49.1k|}
Curl_conn_trc_filters:
  132|  29.7k|{
  133|  29.7k|  if(CURL_TRC_M_is_verbose(data) && data->conn) {
  ------------------
  |  |  135|  29.7k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  ------------------
  |  |  |  |  326|  59.5k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  59.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 29.7k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 29.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  59.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|  59.5k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (133:37): [True: 0, False: 0]
  ------------------
  134|      0|    struct Curl_cfilter *cf = data->conn->cfilter[sockindex];
  135|       |
  136|      0|    if(cf) {
  ------------------
  |  Branch (136:8): [True: 0, False: 0]
  ------------------
  137|      0|      char msg[256], *buf;
  138|      0|      int blen, n;
  139|       |
  140|      0|      buf = msg;
  141|      0|      blen = sizeof(msg) - 1;
  142|      0|      n = curl_msnprintf(buf, blen, "%s [%d]", info, sockindex);
  143|      0|      buf += n;
  144|      0|      blen -= n;
  145|      0|      for(; cf && blen; cf = cf->next) {
  ------------------
  |  Branch (145:13): [True: 0, False: 0]
  |  Branch (145:19): [True: 0, False: 0]
  ------------------
  146|      0|        n = curl_msnprintf(buf, blen, "[%s%s]",
  147|      0|                           cf->connected ? "" : "!", cf->cft->name);
  ------------------
  |  Branch (147:28): [True: 0, False: 0]
  ------------------
  148|      0|        buf += n;
  149|      0|        blen -= n;
  150|      0|      }
  151|      0|      CURL_TRC_M(data, "%s%s", msg, blen ? "" : "...");
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  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]
  |  |  ------------------
  ------------------
  152|      0|    }
  153|      0|    else
  154|      0|      CURL_TRC_M(data, "%s [%d][-]", info, sockindex);
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  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]
  |  |  ------------------
  ------------------
  155|      0|  }
  156|  29.7k|}
Curl_conn_cf_discard_chain:
  161|  34.0k|{
  162|  34.0k|  struct Curl_cfilter *cfn, *cf = *pcf;
  163|       |
  164|  34.0k|  if(cf) {
  ------------------
  |  Branch (164:6): [True: 8.26k, False: 25.8k]
  ------------------
  165|  8.26k|    *pcf = NULL;
  166|  34.4k|    while(cf) {
  ------------------
  |  Branch (166:11): [True: 26.1k, False: 8.26k]
  ------------------
  167|  26.1k|      cfn = cf->next;
  168|       |      /* prevent destroying filter to mess with its sub-chain, since
  169|       |       * we have the reference now and will call destroy on it.
  170|       |       */
  171|  26.1k|      cf->next = NULL;
  172|  26.1k|      cf->cft->destroy(cf, data);
  173|  26.1k|      curlx_free(cf);
  ------------------
  |  | 1488|  26.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  174|  26.1k|      cf = cfn;
  175|  26.1k|    }
  176|  8.26k|  }
  177|  34.0k|}
Curl_conn_cf_discard_all:
  181|  33.7k|{
  182|  33.7k|  struct curltime *pt = &conn->shutdown.start[sockindex];
  183|  33.7k|  memset(pt, 0, sizeof(*pt));
  184|  33.7k|  Curl_conn_cf_discard_chain(&conn->cfilter[sockindex], data);
  185|  33.7k|}
Curl_conn_shutdown:
  188|    434|{
  189|    434|  struct Curl_cfilter *cf;
  190|    434|  CURLcode result = CURLE_OK;
  191|    434|  timediff_t timeout_ms;
  192|       |
  193|    434|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1077|    434|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (193:3): [True: 0, False: 434]
  |  Branch (193:3): [True: 434, False: 0]
  ------------------
  194|       |
  195|    434|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  322|    434|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (322:36): [True: 434, False: 0]
  |  |  |  Branch (322:50): [True: 434, False: 0]
  |  |  ------------------
  ------------------
  196|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  197|       |
  198|       |  /* Get the first connected filter that is not shut down already. */
  199|    434|  cf = data->conn->cfilter[sockindex];
  200|    434|  while(cf && (!cf->connected || cf->shutdown))
  ------------------
  |  Branch (200:9): [True: 434, False: 0]
  |  Branch (200:16): [True: 0, False: 434]
  |  Branch (200:34): [True: 0, False: 434]
  ------------------
  201|      0|    cf = cf->next;
  202|       |
  203|    434|  if(!cf) {
  ------------------
  |  Branch (203:6): [True: 0, False: 434]
  ------------------
  204|      0|    *done = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  205|      0|    return CURLE_OK;
  206|      0|  }
  207|       |
  208|    434|  *done = FALSE;
  ------------------
  |  | 1054|    434|#define FALSE false
  ------------------
  209|    434|  if(!Curl_shutdown_started(data, sockindex)) {
  ------------------
  |  Branch (209:6): [True: 0, False: 434]
  ------------------
  210|      0|    Curl_shutdown_start(data, sockindex, 0);
  211|      0|  }
  212|    434|  else {
  213|    434|    timeout_ms = Curl_shutdown_timeleft(data, data->conn, sockindex);
  214|    434|    if(timeout_ms < 0) {
  ------------------
  |  Branch (214:8): [True: 0, False: 434]
  ------------------
  215|       |      /* info message, since this might be regarded as acceptable */
  216|      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]
  |  |  ------------------
  ------------------
  217|      0|      return CURLE_OPERATION_TIMEDOUT;
  218|      0|    }
  219|    434|  }
  220|       |
  221|    868|  while(cf) {
  ------------------
  |  Branch (221:9): [True: 434, False: 434]
  ------------------
  222|    434|    if(!cf->shutdown) {
  ------------------
  |  Branch (222:8): [True: 434, False: 0]
  ------------------
  223|    434|      bool cfdone = FALSE;
  ------------------
  |  | 1054|    434|#define FALSE false
  ------------------
  224|    434|      result = cf->cft->do_shutdown(cf, data, &cfdone);
  225|    434|      if(result) {
  ------------------
  |  Branch (225:10): [True: 0, False: 434]
  ------------------
  226|      0|        CURL_TRC_CF(data, cf, "shut down failed with %d", (int)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]
  |  |  ------------------
  ------------------
  227|      0|        return result;
  228|      0|      }
  229|    434|      else if(!cfdone) {
  ------------------
  |  Branch (229:15): [True: 0, False: 434]
  ------------------
  230|      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]
  |  |  ------------------
  ------------------
  231|      0|        return CURLE_OK;
  232|      0|      }
  233|    434|      CURL_TRC_CF(data, cf, "shut down successfully");
  ------------------
  |  |  153|    434|  do {                                          \
  |  |  154|    434|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    434|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    868|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 434, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 434]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    868|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((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|    434|   (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|    434|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    434|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 434]
  |  |  ------------------
  ------------------
  234|    434|      cf->shutdown = TRUE;
  ------------------
  |  | 1051|    434|#define TRUE true
  ------------------
  235|    434|    }
  236|    434|    cf = cf->next;
  237|    434|  }
  238|    434|  *done = (!result);
  239|    434|  return result;
  240|    434|}
Curl_cf_recv:
  244|  10.9k|{
  245|  10.9k|  struct Curl_cfilter *cf;
  246|       |
  247|  10.9k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  10.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (247:3): [True: 0, False: 10.9k]
  |  Branch (247:3): [True: 10.9k, False: 0]
  ------------------
  248|  10.9k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1077|  10.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (248:3): [True: 0, False: 10.9k]
  |  Branch (248:3): [True: 10.9k, False: 0]
  ------------------
  249|  10.9k|  cf = data->conn->cfilter[sockindex];
  250|  54.9k|  while(cf && !cf->connected)
  ------------------
  |  Branch (250:9): [True: 54.9k, False: 0]
  |  Branch (250:15): [True: 43.9k, False: 10.9k]
  ------------------
  251|  43.9k|    cf = cf->next;
  252|  10.9k|  if(cf)
  ------------------
  |  Branch (252:6): [True: 10.9k, False: 0]
  ------------------
  253|  10.9k|    return cf->cft->do_recv(cf, data, buf, len, pnread);
  254|      0|  failf(data, "recv: no filter connected");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  255|      0|  DEBUGASSERT(0);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (255:3): [Folded, False: 0]
  |  Branch (255:3): [Folded, False: 0]
  ------------------
  256|      0|  *pnread = 0;
  257|      0|  return CURLE_FAILED_INIT;
  258|      0|}
Curl_cf_recv_bufq:
  298|    218|{
  299|    218|  struct cf_io_ctx io;
  300|       |
  301|    218|  if(!cf || !data) {
  ------------------
  |  Branch (301:6): [True: 0, False: 218]
  |  Branch (301:13): [True: 0, False: 218]
  ------------------
  302|      0|    *pnread = 0;
  303|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  304|      0|  }
  305|    218|  io.data = data;
  306|    218|  io.cf = cf;
  307|    218|  return Curl_bufq_sipn(bufq, maxlen, cf_bufq_reader, &io, pnread);
  308|    218|}
Curl_cf_send_bufq:
  323|    118|{
  324|    118|  struct cf_io_ctx io;
  325|       |
  326|    118|  if(!cf || !data) {
  ------------------
  |  Branch (326:6): [True: 0, False: 118]
  |  Branch (326:13): [True: 0, False: 118]
  ------------------
  327|      0|    *pnwritten = 0;
  328|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  329|      0|  }
  330|    118|  io.data = data;
  331|    118|  io.cf = cf;
  332|    118|  if(buf && blen)
  ------------------
  |  Branch (332:6): [True: 0, False: 118]
  |  Branch (332:13): [True: 0, False: 0]
  ------------------
  333|      0|    return Curl_bufq_write_pass(bufq, buf, blen, cf_bufq_writer, &io,
  334|      0|                                pnwritten);
  335|    118|  else
  336|    118|    return Curl_bufq_pass(bufq, cf_bufq_writer, &io, pnwritten);
  337|    118|}
Curl_cf_create:
  342|  36.3k|{
  343|  36.3k|  struct Curl_cfilter *cf;
  344|  36.3k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  345|       |
  346|  36.3k|  DEBUGASSERT(cft);
  ------------------
  |  | 1077|  36.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (346:3): [True: 0, False: 36.3k]
  |  Branch (346:3): [True: 36.3k, False: 0]
  ------------------
  347|  36.3k|  cf = curlx_calloc(1, sizeof(*cf));
  ------------------
  |  | 1485|  36.3k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  348|  36.3k|  if(!cf)
  ------------------
  |  Branch (348:6): [True: 0, False: 36.3k]
  ------------------
  349|      0|    goto out;
  350|       |
  351|  36.3k|  cf->cft = cft;
  352|  36.3k|  cf->ctx = ctx;
  353|  36.3k|  result = CURLE_OK;
  354|  36.3k|out:
  355|  36.3k|  *pcf = cf;
  356|  36.3k|  return result;
  357|  36.3k|}
Curl_conn_cf_add:
  363|  15.8k|{
  364|  15.8k|  DEBUGASSERT(conn);
  ------------------
  |  | 1077|  15.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (364:3): [True: 0, False: 15.8k]
  |  Branch (364:3): [True: 15.8k, False: 0]
  ------------------
  365|  15.8k|  DEBUGASSERT(!cf->conn);
  ------------------
  |  | 1077|  15.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (365:3): [True: 0, False: 15.8k]
  |  Branch (365:3): [True: 15.8k, False: 0]
  ------------------
  366|  15.8k|  DEBUGASSERT(!cf->next);
  ------------------
  |  | 1077|  15.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (366:3): [True: 0, False: 15.8k]
  |  Branch (366:3): [True: 15.8k, False: 0]
  ------------------
  367|       |
  368|  15.8k|  cf->next = conn->cfilter[sockindex];
  369|  15.8k|  cf->conn = conn;
  370|  15.8k|  cf->sockindex = sockindex;
  371|  15.8k|  conn->cfilter[sockindex] = cf;
  372|  15.8k|  CURL_TRC_CF(data, cf, "added");
  ------------------
  |  |  153|  15.8k|  do {                                          \
  |  |  154|  15.8k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  15.8k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  31.7k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 15.8k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 15.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  31.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|  15.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|  15.8k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  373|  15.8k|}
Curl_conn_cf_insert_after:
  377|  13.0k|{
  378|  13.0k|  struct Curl_cfilter *tail, **pnext;
  379|       |
  380|  13.0k|  DEBUGASSERT(cf_at);
  ------------------
  |  | 1077|  13.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (380:3): [True: 0, False: 13.0k]
  |  Branch (380:3): [True: 13.0k, False: 0]
  ------------------
  381|  13.0k|  DEBUGASSERT(cf_new);
  ------------------
  |  | 1077|  13.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (381:3): [True: 0, False: 13.0k]
  |  Branch (381:3): [True: 13.0k, False: 0]
  ------------------
  382|  13.0k|  DEBUGASSERT(!cf_new->conn);
  ------------------
  |  | 1077|  13.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (382:3): [True: 0, False: 13.0k]
  |  Branch (382:3): [True: 13.0k, False: 0]
  ------------------
  383|       |
  384|  13.0k|  tail = cf_at->next;
  385|  13.0k|  cf_at->next = cf_new;
  386|  13.0k|  do {
  387|  13.0k|    cf_new->conn = cf_at->conn;
  388|  13.0k|    cf_new->sockindex = cf_at->sockindex;
  389|  13.0k|    pnext = &cf_new->next;
  390|  13.0k|    cf_new = cf_new->next;
  391|  13.0k|  } while(cf_new);
  ------------------
  |  Branch (391:11): [True: 0, False: 13.0k]
  ------------------
  392|  13.0k|  *pnext = tail;
  393|  13.0k|}
Curl_conn_cf_connect:
  422|  26.7k|{
  423|  26.7k|  if(cf)
  ------------------
  |  Branch (423:6): [True: 26.7k, False: 0]
  ------------------
  424|  26.7k|    return cf->cft->do_connect(cf, data, done);
  425|      0|  return CURLE_FAILED_INIT;
  426|  26.7k|}
Curl_conn_cf_send:
  431|  3.39k|{
  432|  3.39k|  if(cf)
  ------------------
  |  Branch (432:6): [True: 3.39k, False: 0]
  ------------------
  433|  3.39k|    return cf->cft->do_send(cf, data, buf, len, eos, pnwritten);
  434|      0|  *pnwritten = 0;
  435|      0|  return CURLE_SEND_ERROR;
  436|  3.39k|}
Curl_conn_cf_recv:
  440|  2.42k|{
  441|  2.42k|  if(cf)
  ------------------
  |  Branch (441:6): [True: 2.42k, False: 0]
  ------------------
  442|  2.42k|    return cf->cft->do_recv(cf, data, buf, len, pnread);
  443|      0|  *pnread = 0;
  444|      0|  return CURLE_RECV_ERROR;
  445|  2.42k|}
Curl_conn_cntrl_update_info:
  466|  3.40k|{
  467|  3.40k|  cf_cntrl_all(conn, data, TRUE, CF_CTRL_CONN_INFO_UPDATE, 0, NULL);
  ------------------
  |  | 1051|  3.40k|#define TRUE true
  ------------------
                cf_cntrl_all(conn, data, TRUE, CF_CTRL_CONN_INFO_UPDATE, 0, NULL);
  ------------------
  |  |  121|  3.40k|#define CF_CTRL_CONN_INFO_UPDATE (256 + 0) /* 0          NULL     ignored */
  ------------------
  468|  3.40k|}
Curl_conn_remove_setup_filters:
  472|  3.40k|{
  473|  3.40k|  struct Curl_cfilter **anchor = &data->conn->cfilter[sockindex];
  474|  17.0k|  while(*anchor) {
  ------------------
  |  Branch (474:9): [True: 13.6k, False: 3.40k]
  ------------------
  475|  13.6k|    struct Curl_cfilter *cf = *anchor;
  476|  13.6k|    if(cf->connected && (cf->cft->flags & CF_TYPE_SETUP)) {
  ------------------
  |  |  207|  13.6k|#define CF_TYPE_SETUP       (1 << 5)
  ------------------
  |  Branch (476:8): [True: 13.6k, False: 0]
  |  Branch (476:25): [True: 10.2k, False: 3.42k]
  ------------------
  477|  10.2k|      *anchor = cf->next;
  478|  10.2k|      cf->next = NULL;
  479|  10.2k|      CURL_TRC_CF(data, cf, "removing connected setup filter");
  ------------------
  |  |  153|  10.2k|  do {                                          \
  |  |  154|  10.2k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  10.2k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  20.4k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 10.2k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  20.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|  10.2k|   (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|  10.2k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  10.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 10.2k]
  |  |  ------------------
  ------------------
  480|  10.2k|      cf->cft->destroy(cf, data);
  481|  10.2k|      curlx_free(cf);
  ------------------
  |  | 1488|  10.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  482|  10.2k|    }
  483|  3.42k|    else
  484|  3.42k|      anchor = &cf->next;
  485|  13.6k|  }
  486|  3.40k|}
Curl_conn_is_connected:
  496|  28.5k|{
  497|  28.5k|  struct Curl_cfilter *cf;
  498|       |
  499|  28.5k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  322|  28.5k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (322:36): [True: 28.5k, False: 0]
  |  |  |  Branch (322:50): [True: 28.5k, False: 0]
  |  |  ------------------
  ------------------
  500|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  501|  28.5k|  cf = conn->cfilter[sockindex];
  502|  28.5k|  if(cf)
  ------------------
  |  Branch (502:6): [True: 28.1k, False: 434]
  ------------------
  503|  28.1k|    return (bool)cf->connected;
  504|    434|  else if(conn->scheme->flags & PROTOPT_NONETWORK)
  ------------------
  |  |  215|    434|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (504:11): [True: 0, False: 434]
  ------------------
  505|      0|    return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  506|    434|  return FALSE;
  ------------------
  |  | 1054|    434|#define FALSE false
  ------------------
  507|  28.5k|}
Curl_conn_is_ssl:
  565|  5.85k|{
  566|  5.85k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  322|  5.85k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (322:36): [True: 5.85k, False: 0]
  |  |  |  Branch (322:50): [True: 5.85k, False: 0]
  |  |  ------------------
  ------------------
  567|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  568|  5.85k|  return conn ? cf_is_ssl(conn->cfilter[sockindex]) : FALSE;
  ------------------
  |  | 1054|  5.85k|#define FALSE false
  ------------------
  |  Branch (568:10): [True: 5.85k, False: 0]
  ------------------
  569|  5.85k|}
Curl_conn_is_multiplex:
  600|  13.7k|{
  601|  13.7k|  struct Curl_cfilter *cf;
  602|       |
  603|  13.7k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  322|  13.7k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (322:36): [True: 13.7k, False: 0]
  |  |  |  Branch (322:50): [True: 13.7k, False: 0]
  |  |  ------------------
  ------------------
  604|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  605|  13.7k|  cf = conn ? conn->cfilter[sockindex] : NULL;
  ------------------
  |  Branch (605:8): [True: 13.7k, False: 0]
  ------------------
  606|       |
  607|  23.4k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (607:9): [True: 22.4k, False: 989]
  ------------------
  608|  22.4k|    if(cf->cft->flags & CF_TYPE_MULTIPLEX)
  ------------------
  |  |  204|  22.4k|#define CF_TYPE_MULTIPLEX   (1 << 2)
  ------------------
  |  Branch (608:8): [True: 0, False: 22.4k]
  ------------------
  609|      0|      return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  610|  22.4k|    if(cf->cft->flags & (CF_TYPE_IP_CONNECT | CF_TYPE_SSL))
  ------------------
  |  |  202|  22.4k|#define CF_TYPE_IP_CONNECT  (1 << 0)
  ------------------
                  if(cf->cft->flags & (CF_TYPE_IP_CONNECT | CF_TYPE_SSL))
  ------------------
  |  |  203|  22.4k|#define CF_TYPE_SSL         (1 << 1)
  ------------------
  |  Branch (610:8): [True: 12.7k, False: 9.70k]
  ------------------
  611|  12.7k|      return FALSE;
  ------------------
  |  | 1054|  12.7k|#define FALSE false
  ------------------
  612|  22.4k|  }
  613|    989|  return FALSE;
  ------------------
  |  | 1054|    989|#define FALSE false
  ------------------
  614|  13.7k|}
Curl_socktype_for_transport:
  624|  7.95k|{
  625|  7.95k|  switch(transport) {
  626|  7.92k|  case TRNSPRT_TCP:
  ------------------
  |  |  249|  7.92k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (626:3): [True: 7.92k, False: 23]
  ------------------
  627|  7.92k|    return SOCK_STREAM;
  628|     23|  case TRNSPRT_UNIX:
  ------------------
  |  |  252|     23|#define TRNSPRT_UNIX 6
  ------------------
  |  Branch (628:3): [True: 23, False: 7.92k]
  ------------------
  629|     23|    return SOCK_STREAM;
  630|      0|  default: /* UDP and QUIC */
  ------------------
  |  Branch (630:3): [True: 0, False: 7.95k]
  ------------------
  631|       |    return SOCK_DGRAM;
  632|  7.95k|  }
  633|  7.95k|}
Curl_protocol_for_transport:
  636|  7.95k|{
  637|  7.95k|  switch(transport) {
  638|  7.92k|  case TRNSPRT_TCP:
  ------------------
  |  |  249|  7.92k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (638:3): [True: 7.92k, False: 23]
  ------------------
  639|  7.92k|    return IPPROTO_TCP;
  640|     23|  case TRNSPRT_UNIX:
  ------------------
  |  |  252|     23|#define TRNSPRT_UNIX 6
  ------------------
  |  Branch (640:3): [True: 23, False: 7.92k]
  ------------------
  641|     23|    return IPPROTO_IP;
  642|      0|  default: /* UDP and QUIC */
  ------------------
  |  Branch (642:3): [True: 0, False: 7.95k]
  ------------------
  643|       |    return IPPROTO_UDP;
  644|  7.95k|  }
  645|  7.95k|}
Curl_conn_cf_wants_httpsrr:
  649|    933|{
  650|    933|  (void)data;
  651|  2.54k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (651:9): [True: 1.90k, False: 635]
  ------------------
  652|  1.90k|    if(cf->cft->flags & CF_TYPE_HTTPSRR)
  ------------------
  |  |  208|  1.90k|#define CF_TYPE_HTTPSRR     (1 << 6)
  ------------------
  |  Branch (652:8): [True: 298, False: 1.60k]
  ------------------
  653|    298|      return TRUE;
  ------------------
  |  | 1051|    298|#define TRUE true
  ------------------
  654|  1.90k|  }
  655|    635|  return FALSE;
  ------------------
  |  | 1054|    635|#define FALSE false
  ------------------
  656|    933|}
Curl_conn_data_pending:
  690|  4.67k|{
  691|  4.67k|  struct Curl_cfilter *cf;
  692|       |
  693|  4.67k|  (void)data;
  694|  4.67k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  4.67k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (694:3): [True: 0, False: 4.67k]
  |  Branch (694:3): [True: 4.67k, False: 0]
  ------------------
  695|  4.67k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1077|  4.67k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (695:3): [True: 0, False: 4.67k]
  |  Branch (695:3): [True: 4.67k, False: 0]
  ------------------
  696|  4.67k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  322|  4.67k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (322:36): [True: 4.67k, False: 0]
  |  |  |  Branch (322:50): [True: 4.67k, False: 0]
  |  |  ------------------
  ------------------
  697|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  698|       |
  699|  4.67k|  cf = data->conn->cfilter[sockindex];
  700|  4.67k|  while(cf && !cf->connected) {
  ------------------
  |  Branch (700:9): [True: 4.67k, False: 0]
  |  Branch (700:15): [True: 0, False: 4.67k]
  ------------------
  701|      0|    cf = cf->next;
  702|      0|  }
  703|  4.67k|  if(cf) {
  ------------------
  |  Branch (703:6): [True: 4.67k, False: 0]
  ------------------
  704|  4.67k|    return cf->cft->has_data_pending(cf, data);
  705|  4.67k|  }
  706|      0|  return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  707|  4.67k|}
Curl_conn_cf_needs_flush:
  711|  9.98k|{
  712|  9.98k|  CURLcode result;
  713|  9.98k|  int pending = 0;
  714|  9.98k|  result = cf ? cf->cft->query(cf, data, CF_QUERY_NEED_FLUSH,
  ------------------
  |  |  167|  9.98k|#define CF_QUERY_NEED_FLUSH         7  /* TRUE/FALSE - */
  ------------------
  |  Branch (714:12): [True: 9.98k, False: 0]
  ------------------
  715|  9.98k|                               &pending, NULL) : CURLE_UNKNOWN_OPTION;
  716|  9.98k|  return (result || !pending) ? FALSE : TRUE;
  ------------------
  |  | 1054|  9.98k|#define FALSE false
  ------------------
                return (result || !pending) ? FALSE : TRUE;
  ------------------
  |  | 1051|  9.98k|#define TRUE true
  ------------------
  |  Branch (716:11): [True: 9.98k, False: 0]
  |  Branch (716:21): [True: 0, False: 0]
  ------------------
  717|  9.98k|}
Curl_conn_needs_flush:
  720|  11.3k|{
  721|  11.3k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  322|  11.3k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (322:36): [True: 9.95k, False: 1.40k]
  |  |  |  Branch (322:50): [True: 9.95k, False: 0]
  |  |  ------------------
  ------------------
  722|  1.40k|    return FALSE;
  ------------------
  |  | 1054|  1.40k|#define FALSE false
  ------------------
  723|  9.95k|  return Curl_conn_cf_needs_flush(data->conn->cfilter[sockindex], data);
  724|  11.3k|}
Curl_conn_cf_adjust_pollset:
  729|  10.5k|{
  730|  10.5k|  CURLcode result = CURLE_OK;
  731|       |  /* Get the lowest not-connected filter, if there are any */
  732|  12.2k|  while(cf && !cf->connected && cf->next && !cf->next->connected)
  ------------------
  |  Branch (732:9): [True: 7.04k, False: 5.20k]
  |  Branch (732:15): [True: 3.02k, False: 4.02k]
  |  Branch (732:33): [True: 1.89k, False: 1.12k]
  |  Branch (732:45): [True: 1.67k, False: 218]
  ------------------
  733|  1.67k|    cf = cf->next;
  734|       |  /* Skip all filters that have already shut down */
  735|  10.5k|  while(cf && cf->shutdown)
  ------------------
  |  Branch (735:9): [True: 5.36k, False: 5.20k]
  |  Branch (735:15): [True: 0, False: 5.36k]
  ------------------
  736|      0|    cf = cf->next;
  737|       |  /* From there on, give all filters a chance to adjust the pollset.
  738|       |   * Lower filters are called later, so they may override */
  739|  16.4k|  while(cf && !result) {
  ------------------
  |  Branch (739:9): [True: 5.84k, False: 10.5k]
  |  Branch (739:15): [True: 5.84k, False: 0]
  ------------------
  740|  5.84k|    result = cf->cft->adjust_pollset(cf, data, ps);
  741|  5.84k|    cf = cf->next;
  742|  5.84k|  }
  743|  10.5k|  return result;
  744|  10.5k|}
Curl_conn_adjust_pollset:
  749|  5.20k|{
  750|  5.20k|  CURLcode result = CURLE_OK;
  751|  5.20k|  int i;
  752|       |
  753|  5.20k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  5.20k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (753:3): [True: 0, False: 5.20k]
  |  Branch (753:3): [True: 5.20k, False: 0]
  ------------------
  754|  5.20k|  DEBUGASSERT(conn);
  ------------------
  |  | 1077|  5.20k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (754:3): [True: 0, False: 5.20k]
  |  Branch (754:3): [True: 5.20k, False: 0]
  ------------------
  755|       |  /* During connect time, connection filters may add sockets to the pollset
  756|       |   * even when the transfer neither wants to send nor receive. And those
  757|       |   * sockets, when having events, are served.
  758|       |   * Once connected however, a transfer that neither wants to send nor receive
  759|       |   * will never call the connection filters. Any sockets added by the filters
  760|       |   * will not change state and POLLIN/POLLOUT events will trigger forever,
  761|       |   * making us busy loop. See #21671 */
  762|  5.20k|  if(ps->n || !Curl_conn_is_connected(conn, FIRSTSOCKET) ||
  ------------------
  |  |  245|    968|#define FIRSTSOCKET     0
  ------------------
  |  Branch (762:6): [True: 4.23k, False: 968]
  |  Branch (762:15): [True: 968, False: 0]
  ------------------
  763|      0|     (conn->cfilter[SECONDARYSOCKET] &&
  ------------------
  |  |  246|      0|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (763:7): [True: 0, False: 0]
  ------------------
  764|  5.20k|      !Curl_conn_is_connected(conn, SECONDARYSOCKET))) {
  ------------------
  |  |  246|      0|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (764:7): [True: 0, False: 0]
  ------------------
  765|  15.6k|    for(i = 0; (i < 2) && !result && conn; ++i) {
  ------------------
  |  Branch (765:16): [True: 10.4k, False: 5.20k]
  |  Branch (765:27): [True: 10.4k, False: 0]
  |  Branch (765:38): [True: 10.4k, False: 0]
  ------------------
  766|  10.4k|      result = Curl_conn_cf_adjust_pollset(conn->cfilter[i], data, ps);
  767|  10.4k|    }
  768|  5.20k|  }
  769|  5.20k|  return result;
  770|  5.20k|}
Curl_conn_cf_cntrl:
  852|  38.6k|{
  853|  38.6k|  CURLcode result = CURLE_OK;
  854|       |
  855|  78.0k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (855:9): [True: 39.4k, False: 38.6k]
  ------------------
  856|  39.4k|    if(cf->cft->cntrl == Curl_cf_def_cntrl)
  ------------------
  |  Branch (856:8): [True: 18.6k, False: 20.8k]
  ------------------
  857|  18.6k|      continue;
  858|  20.8k|    result = cf->cft->cntrl(cf, data, event, arg1, arg2);
  859|  20.8k|    if(!ignore_result && result)
  ------------------
  |  Branch (859:8): [True: 0, False: 20.8k]
  |  Branch (859:26): [True: 0, False: 0]
  ------------------
  860|      0|      break;
  861|  20.8k|  }
  862|  38.6k|  return result;
  863|  38.6k|}
Curl_conn_cf_get_socket:
  867|  8.80k|{
  868|  8.80k|  curl_socket_t sock;
  869|  8.80k|  if(cf && !cf->cft->query(cf, data, CF_QUERY_SOCKET, NULL, &sock))
  ------------------
  |  |  163|  8.80k|#define CF_QUERY_SOCKET             3  /* -          curl_socket_t */
  ------------------
  |  Branch (869:6): [True: 8.80k, False: 0]
  |  Branch (869:12): [True: 402, False: 8.40k]
  ------------------
  870|    402|    return sock;
  871|  8.40k|  return CURL_SOCKET_BAD;
  ------------------
  |  |  145|  8.40k|#define CURL_SOCKET_BAD (-1)
  ------------------
  872|  8.80k|}
Curl_conn_cf_get_alpn_negotiated:
  885|  1.22k|{
  886|  1.22k|  const char *alpn = NULL;
  887|  1.22k|  CURL_TRC_CF(data, cf, "query ALPN");
  ------------------
  |  |  153|  1.22k|  do {                                          \
  |  |  154|  1.22k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.22k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  2.45k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.22k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.22k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  2.45k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((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.22k|   (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.22k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.22k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.22k]
  |  |  ------------------
  ------------------
  888|  1.22k|  if(cf && !cf->cft->query(cf, data, CF_QUERY_ALPN_NEGOTIATED, NULL,
  ------------------
  |  |  177|  1.22k|#define CF_QUERY_ALPN_NEGOTIATED   15  /* -          const char * */
  ------------------
  |  Branch (888:6): [True: 1.22k, False: 0]
  |  Branch (888:12): [True: 0, False: 1.22k]
  ------------------
  889|  1.22k|                           CURL_UNCONST(&alpn)))
  ------------------
  |  |  862|  1.22k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  890|      0|    return alpn;
  891|  1.22k|  return NULL;
  892|  1.22k|}
Curl_conn_cf_get_ip_info:
  908|      8|{
  909|      8|  CURLcode result = CURLE_UNKNOWN_OPTION;
  910|      8|  if(cf) {
  ------------------
  |  Branch (910:6): [True: 8, False: 0]
  ------------------
  911|      8|    int ipv6 = 0;
  912|      8|    result = cf->cft->query(cf, data, CF_QUERY_IP_INFO, &ipv6, ipquad);
  ------------------
  |  |  168|      8|#define CF_QUERY_IP_INFO            8  /* TRUE/FALSE struct ip_quadruple */
  ------------------
  913|      8|    *is_ipv6 = !!ipv6;
  914|      8|  }
  915|      8|  return result;
  916|      8|}
Curl_conn_get_first_socket:
  919|  1.18k|{
  920|  1.18k|  struct Curl_cfilter *cf;
  921|       |
  922|  1.18k|  if(!data->conn)
  ------------------
  |  Branch (922:6): [True: 0, False: 1.18k]
  ------------------
  923|      0|    return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  924|       |
  925|  1.18k|  cf = data->conn->cfilter[FIRSTSOCKET];
  ------------------
  |  |  245|  1.18k|#define FIRSTSOCKET     0
  ------------------
  926|       |  /* if the top filter has not connected, ask it (and its sub-filters)
  927|       |   * for the socket. Otherwise conn->sock[sockindex] should have it. */
  928|  1.18k|  if(cf && !cf->connected)
  ------------------
  |  Branch (928:6): [True: 1.18k, False: 0]
  |  Branch (928:12): [True: 1.18k, False: 0]
  ------------------
  929|  1.18k|    return Curl_conn_cf_get_socket(cf, data);
  930|      0|  return data->conn->sock[FIRSTSOCKET];
  ------------------
  |  |  245|      0|#define FIRSTSOCKET     0
  ------------------
  931|  1.18k|}
Curl_conn_ev_data_setup:
  943|  7.93k|{
  944|  7.93k|  return cf_cntrl_all(data->conn, data, FALSE, CF_CTRL_DATA_SETUP, 0, NULL);
  ------------------
  |  | 1054|  7.93k|#define FALSE false
  ------------------
                return cf_cntrl_all(data->conn, data, FALSE, CF_CTRL_DATA_SETUP, 0, NULL);
  ------------------
  |  |  115|  7.93k|#define CF_CTRL_DATA_SETUP              4  /* 0          NULL     first fail */
  ------------------
  945|  7.93k|}
Curl_conn_ev_data_done:
  969|  7.93k|{
  970|  7.93k|  cf_cntrl_all(data->conn, data, TRUE, CF_CTRL_DATA_DONE, premature, NULL);
  ------------------
  |  | 1051|  7.93k|#define TRUE true
  ------------------
                cf_cntrl_all(data->conn, data, TRUE, CF_CTRL_DATA_DONE, premature, NULL);
  ------------------
  |  |  118|  7.93k|#define CF_CTRL_DATA_DONE               7  /* premature  NULL     ignored */
  ------------------
  971|  7.93k|}
Curl_conn_get_max_concurrent:
 1002|      2|{
 1003|      2|  struct Curl_cfilter *cf;
 1004|      2|  CURLcode result;
 1005|      2|  int n = -1;
 1006|       |
 1007|      2|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  322|      2|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (322:36): [True: 2, False: 0]
  |  |  |  Branch (322:50): [True: 2, False: 0]
  |  |  ------------------
  ------------------
 1008|      0|    return 0;
 1009|       |
 1010|      2|  cf = conn->cfilter[sockindex];
 1011|      2|  result = cf ? cf->cft->query(cf, data, CF_QUERY_MAX_CONCURRENT,
  ------------------
  |  |  161|      2|#define CF_QUERY_MAX_CONCURRENT     1  /* number     -        */
  ------------------
  |  Branch (1011:12): [True: 2, False: 0]
  ------------------
 1012|      2|                               &n, NULL) : CURLE_UNKNOWN_OPTION;
 1013|       |  /* If no filter answered the query, the default is a non-multiplexed
 1014|       |   * connection with limit 1. Otherwise, the query may return 0
 1015|       |   * for connections that are in shutdown, e.g. server HTTP/2 GOAWAY. */
 1016|      2|  return (result || n < 0) ? 1 : (size_t)n;
  ------------------
  |  Branch (1016:11): [True: 2, False: 0]
  |  Branch (1016:21): [True: 0, False: 0]
  ------------------
 1017|      2|}
Curl_conn_recv:
 1046|  12.3k|{
 1047|  12.3k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  12.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1047:3): [True: 0, False: 12.3k]
  |  Branch (1047:3): [True: 12.3k, False: 0]
  ------------------
 1048|  12.3k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1077|  12.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1048:3): [True: 0, False: 12.3k]
  |  Branch (1048:3): [True: 12.3k, False: 0]
  ------------------
 1049|  12.3k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  322|  12.3k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (322:36): [True: 12.3k, False: 0]
  |  |  |  Branch (322:50): [True: 12.3k, False: 0]
  |  |  ------------------
  ------------------
 1050|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1051|  12.3k|  if(data && data->conn && data->conn->recv[sockindex])
  ------------------
  |  Branch (1051:6): [True: 12.3k, False: 0]
  |  Branch (1051:14): [True: 12.3k, False: 0]
  |  Branch (1051:28): [True: 12.3k, False: 0]
  ------------------
 1052|  12.3k|    return data->conn->recv[sockindex](data, sockindex, buf, len, pnread);
 1053|      0|  *pnread = 0;
 1054|      0|  return CURLE_FAILED_INIT;
 1055|  12.3k|}
cfilters.c:cf_bufq_reader:
  288|    218|{
  289|    218|  struct cf_io_ctx *io = writer_ctx;
  290|    218|  return Curl_conn_cf_recv(io->cf, io->data, (char *)buf, blen, pnread);
  291|    218|}
cfilters.c:cf_bufq_writer:
  313|    118|{
  314|    118|  struct cf_io_ctx *io = writer_ctx;
  315|       |  return Curl_conn_cf_send(io->cf, io->data, buf, buflen, FALSE, pnwritten);
  ------------------
  |  | 1054|    118|#define FALSE false
  ------------------
  316|    118|}
cfilters.c:cf_cntrl_all:
  451|  19.2k|{
  452|  19.2k|  CURLcode result = CURLE_OK;
  453|  19.2k|  size_t i;
  454|       |
  455|  57.8k|  for(i = 0; i < CURL_ARRAYSIZE(conn->cfilter); ++i) {
  ------------------
  |  | 1299|  57.8k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (455:14): [True: 38.5k, False: 19.2k]
  ------------------
  456|  38.5k|    result = Curl_conn_cf_cntrl(conn->cfilter[i], data, ignore_result,
  457|  38.5k|                                event, arg1, arg2);
  458|  38.5k|    if(!ignore_result && result)
  ------------------
  |  Branch (458:8): [True: 15.8k, False: 22.6k]
  |  Branch (458:26): [True: 0, False: 15.8k]
  ------------------
  459|      0|      break;
  460|  38.5k|  }
  461|  19.2k|  return result;
  462|  19.2k|}
cfilters.c:cf_is_ssl:
  552|  5.85k|{
  553|  13.2k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (553:9): [True: 13.2k, False: 0]
  ------------------
  554|       |    /* A tunneling proxy does not offer end2end encryption, even if
  555|       |     * it does SSL itself (e.g. QUIC H3 proxy) */
  556|  13.2k|    if((cf->cft->flags & CF_TYPE_SSL) && !(cf->cft->flags & CF_TYPE_PROXY))
  ------------------
  |  |  203|  13.2k|#define CF_TYPE_SSL         (1 << 1)
  ------------------
                  if((cf->cft->flags & CF_TYPE_SSL) && !(cf->cft->flags & CF_TYPE_PROXY))
  ------------------
  |  |  205|      0|#define CF_TYPE_PROXY       (1 << 3)
  ------------------
  |  Branch (556:8): [True: 0, False: 13.2k]
  |  Branch (556:42): [True: 0, False: 0]
  ------------------
  557|      0|      return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  558|  13.2k|    if(cf->cft->flags & CF_TYPE_IP_CONNECT)
  ------------------
  |  |  202|  13.2k|#define CF_TYPE_IP_CONNECT  (1 << 0)
  ------------------
  |  Branch (558:8): [True: 5.85k, False: 7.38k]
  ------------------
  559|  5.85k|      return FALSE;
  ------------------
  |  | 1054|  5.85k|#define FALSE false
  ------------------
  560|  13.2k|  }
  561|      0|  return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  562|  5.85k|}

Curl_cpool_init:
  117|  13.0k|{
  118|  13.0k|  Curl_hash_init(&cpool->dest2bundle, size, Curl_hash_str,
  119|  13.0k|                 curlx_str_key_compare, cpool_bundle_free_entry);
  120|       |
  121|  13.0k|  DEBUGASSERT(idata);
  ------------------
  |  | 1077|  13.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (121:3): [True: 0, False: 13.0k]
  |  Branch (121:3): [True: 13.0k, False: 0]
  ------------------
  122|       |
  123|  13.0k|  cpool->idata = idata;
  124|  13.0k|  cpool->share = share;
  125|       |  cpool->initialized = TRUE;
  ------------------
  |  | 1051|  13.0k|#define TRUE true
  ------------------
  126|  13.0k|}
Curl_cpool_destroy:
  232|  13.0k|{
  233|  13.0k|  if(cpool && cpool->initialized && cpool->idata) {
  ------------------
  |  Branch (233:6): [True: 13.0k, False: 0]
  |  Branch (233:15): [True: 13.0k, False: 0]
  |  Branch (233:37): [True: 13.0k, False: 0]
  ------------------
  234|  13.0k|    struct connectdata *conn;
  235|  13.0k|    struct Curl_sigpipe_ctx pipe_ctx;
  236|       |
  237|  13.0k|    CURL_TRC_M(cpool->idata, "%s[CPOOL] destroy, %zu connections",
  ------------------
  |  |  148|  13.0k|  do {                                   \
  |  |  149|  13.0k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  13.0k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  13.0k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  26.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 13.0k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 13.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  26.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|  13.0k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  13.0k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|  13.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 13.0k]
  |  |  ------------------
  ------------------
  238|  13.0k|               cpool->share ? "[SHARE] " : "", cpool->num_conn);
  239|       |    /* Move all connections to the shutdown list */
  240|  13.0k|    sigpipe_init(&pipe_ctx);
  241|  13.0k|    CPOOL_LOCK(cpool, cpool->idata);
  ------------------
  |  |   42|  13.0k|  do {                                                                  \
  |  |   43|  13.0k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 13.0k, False: 0]
  |  |  ------------------
  |  |   44|  13.0k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  13.0k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 13.0k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  13.0k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  13.0k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1077|  13.0k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  13.0k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1051|  13.0k|#define TRUE true
  |  |  ------------------
  |  |   49|  13.0k|    }                                                                   \
  |  |   50|  13.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 13.0k]
  |  |  ------------------
  ------------------
  |  Branch (241:5): [True: 0, False: 13.0k]
  |  Branch (241:5): [True: 13.0k, False: 0]
  ------------------
  242|  13.0k|    conn = cpool_get_first(cpool);
  243|  13.0k|    if(conn)
  ------------------
  |  Branch (243:8): [True: 0, False: 13.0k]
  ------------------
  244|      0|      sigpipe_apply(cpool->idata, &pipe_ctx);
  245|  13.0k|    while(conn) {
  ------------------
  |  Branch (245:11): [True: 0, False: 13.0k]
  ------------------
  246|      0|      cpool_remove_conn(cpool, conn);
  247|      0|      cpool_discard_conn(cpool, cpool->idata, conn, FALSE);
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  248|      0|      conn = cpool_get_first(cpool);
  249|      0|    }
  250|  13.0k|    CPOOL_UNLOCK(cpool, cpool->idata);
  ------------------
  |  |   53|  13.0k|  do {                                                                  \
  |  |   54|  13.0k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 13.0k, False: 0]
  |  |  ------------------
  |  |   55|  13.0k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1077|  13.0k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  13.0k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1054|  13.0k|#define FALSE false
  |  |  ------------------
  |  |   57|  13.0k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  13.0k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 13.0k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  13.0k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  13.0k|    }                                                                   \
  |  |   60|  13.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 13.0k]
  |  |  ------------------
  ------------------
  |  Branch (250:5): [True: 0, False: 13.0k]
  |  Branch (250:5): [True: 13.0k, False: 0]
  ------------------
  251|  13.0k|    sigpipe_restore(&pipe_ctx);
  252|  13.0k|    Curl_hash_destroy(&cpool->dest2bundle);
  253|  13.0k|  }
  254|  13.0k|}
Curl_cpool_xfer_init:
  270|  13.6k|{
  271|  13.6k|  struct cpool *cpool = cpool_get_instance(data);
  272|       |
  273|  13.6k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1077|  13.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (273:3): [True: 0, False: 13.6k]
  |  Branch (273:3): [True: 13.6k, False: 0]
  ------------------
  274|  13.6k|  if(cpool) {
  ------------------
  |  Branch (274:6): [True: 13.6k, False: 0]
  ------------------
  275|  13.6k|    CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  13.6k|  do {                                                                  \
  |  |   43|  13.6k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 13.6k, False: 0]
  |  |  ------------------
  |  |   44|  13.6k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  13.6k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 13.6k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  13.6k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  13.6k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1077|  13.6k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  13.6k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1051|  13.6k|#define TRUE true
  |  |  ------------------
  |  |   49|  13.6k|    }                                                                   \
  |  |   50|  13.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 13.6k]
  |  |  ------------------
  ------------------
  |  Branch (275:5): [True: 0, False: 13.6k]
  |  Branch (275:5): [True: 13.6k, False: 0]
  ------------------
  276|       |    /* the identifier inside the connection cache */
  277|  13.6k|    data->id = cpool->next_easy_id++;
  278|  13.6k|    if(cpool->next_easy_id <= 0)
  ------------------
  |  Branch (278:8): [True: 0, False: 13.6k]
  ------------------
  279|      0|      cpool->next_easy_id = 0;
  280|  13.6k|    data->state.lastconnect_id = -1;
  281|       |
  282|  13.6k|    CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  13.6k|  do {                                                                  \
  |  |   54|  13.6k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 13.6k, False: 0]
  |  |  ------------------
  |  |   55|  13.6k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1077|  13.6k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  13.6k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1054|  13.6k|#define FALSE false
  |  |  ------------------
  |  |   57|  13.6k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  13.6k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 13.6k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  13.6k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  13.6k|    }                                                                   \
  |  |   60|  13.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 13.6k]
  |  |  ------------------
  ------------------
  |  Branch (282:5): [True: 0, False: 13.6k]
  |  Branch (282:5): [True: 13.6k, False: 0]
  ------------------
  283|  13.6k|  }
  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|  13.6k|}
Curl_cpool_check_limits:
  388|  7.93k|{
  389|  7.93k|  struct cpool *cpool = cpool_get_instance(data);
  390|  7.93k|  struct cpool_bundle *bundle;
  391|  7.93k|  size_t dest_limit = 0;
  392|  7.93k|  size_t total_limit = 0;
  393|  7.93k|  size_t shutdowns;
  394|  7.93k|  int res = CPOOL_LIMIT_OK;
  ------------------
  |  |   90|  7.93k|#define CPOOL_LIMIT_OK     0
  ------------------
  395|       |
  396|  7.93k|  if(!cpool)
  ------------------
  |  Branch (396:6): [True: 0, False: 7.93k]
  ------------------
  397|      0|    return CPOOL_LIMIT_OK;
  ------------------
  |  |   90|      0|#define CPOOL_LIMIT_OK     0
  ------------------
  398|       |
  399|       |  /* multi determines the limits, no matter who owns the pool */
  400|  7.93k|  if(data->multi) {
  ------------------
  |  Branch (400:6): [True: 7.93k, False: 0]
  ------------------
  401|  7.93k|    dest_limit = data->multi->max_host_connections;
  402|  7.93k|    total_limit = data->multi->max_total_connections;
  403|  7.93k|  }
  404|       |
  405|  7.93k|  if(!dest_limit && !total_limit)
  ------------------
  |  Branch (405:6): [True: 7.93k, False: 0]
  |  Branch (405:21): [True: 7.93k, False: 0]
  ------------------
  406|  7.93k|    return CPOOL_LIMIT_OK;
  ------------------
  |  |   90|  7.93k|#define CPOOL_LIMIT_OK     0
  ------------------
  407|       |
  408|      0|  CPOOL_LOCK(cpool, cpool->idata);
  ------------------
  |  |   42|      0|  do {                                                                  \
  |  |   43|      0|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   44|      0|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|      0|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|      0|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|      0|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|      0|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1051|      0|#define TRUE true
  |  |  ------------------
  |  |   49|      0|    }                                                                   \
  |  |   50|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (408:3): [True: 0, False: 0]
  |  Branch (408:3): [True: 0, False: 0]
  ------------------
  409|      0|  if(dest_limit) {
  ------------------
  |  Branch (409:6): [True: 0, False: 0]
  ------------------
  410|      0|    size_t live;
  411|       |
  412|      0|    bundle = cpool_find_bundle(cpool, conn);
  413|      0|    live = bundle ? Curl_llist_count(&bundle->conns) : 0;
  ------------------
  |  Branch (413:12): [True: 0, False: 0]
  ------------------
  414|      0|    shutdowns = Curl_cshutdn_dest_count(data, conn->destination);
  415|      0|    while((live + shutdowns) >= dest_limit) {
  ------------------
  |  Branch (415:11): [True: 0, False: 0]
  ------------------
  416|      0|      if(shutdowns) {
  ------------------
  |  Branch (416:10): [True: 0, False: 0]
  ------------------
  417|       |        /* close one connection in shutdown right away, if we can */
  418|      0|        if(!Curl_cshutdn_close_oldest(data, conn->destination))
  ------------------
  |  Branch (418:12): [True: 0, False: 0]
  ------------------
  419|      0|          break;
  420|      0|      }
  421|      0|      else if(!bundle)
  ------------------
  |  Branch (421:15): [True: 0, False: 0]
  ------------------
  422|      0|        break;
  423|      0|      else {
  424|      0|        struct connectdata *oldest_idle = NULL;
  425|       |        /* The bundle is full. Extract the oldest connection that may
  426|       |         * be removed now, if there is one. */
  427|      0|        oldest_idle = cpool_bundle_get_oldest_idle(bundle,
  428|      0|                                                   Curl_pgrs_now(data));
  429|      0|        if(!oldest_idle)
  ------------------
  |  Branch (429:12): [True: 0, False: 0]
  ------------------
  430|      0|          break;
  431|       |        /* disconnect the old conn and continue */
  432|      0|        CURL_TRC_M(data, "Discarding connection #%" FMT_OFF_T
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  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]
  |  |  ------------------
  ------------------
  433|      0|                   " from %zu to reach destination limit of %zu",
  434|      0|                   oldest_idle->connection_id,
  435|      0|                   Curl_llist_count(&bundle->conns), dest_limit);
  436|      0|        cpool_evict_conn(cpool, data, oldest_idle);
  437|       |
  438|       |        /* in case the bundle was destroyed in disconnect, look it up again */
  439|      0|        bundle = cpool_find_bundle(cpool, conn);
  440|      0|        live = bundle ? Curl_llist_count(&bundle->conns) : 0;
  ------------------
  |  Branch (440:16): [True: 0, False: 0]
  ------------------
  441|      0|      }
  442|      0|      shutdowns = Curl_cshutdn_dest_count(data, conn->destination);
  443|      0|    }
  444|      0|    if((live + shutdowns) >= dest_limit) {
  ------------------
  |  Branch (444:8): [True: 0, False: 0]
  ------------------
  445|      0|      res = CPOOL_LIMIT_DEST;
  ------------------
  |  |   91|      0|#define CPOOL_LIMIT_DEST   1
  ------------------
  446|      0|      goto out;
  447|      0|    }
  448|      0|  }
  449|       |
  450|      0|  if(total_limit) {
  ------------------
  |  Branch (450:6): [True: 0, False: 0]
  ------------------
  451|      0|    shutdowns = Curl_cshutdn_count(data);
  452|      0|    while((cpool->num_conn + shutdowns) >= total_limit) {
  ------------------
  |  Branch (452:11): [True: 0, False: 0]
  ------------------
  453|      0|      if(shutdowns) {
  ------------------
  |  Branch (453:10): [True: 0, False: 0]
  ------------------
  454|       |        /* close one connection in shutdown right away, if we can */
  455|      0|        if(!Curl_cshutdn_close_oldest(data, NULL))
  ------------------
  |  Branch (455:12): [True: 0, False: 0]
  ------------------
  456|      0|          break;
  457|      0|      }
  458|      0|      else {
  459|      0|        struct connectdata *oldest_idle =
  460|      0|          cpool_get_oldest_idle(cpool, Curl_pgrs_now(data));
  461|      0|        if(!oldest_idle)
  ------------------
  |  Branch (461:12): [True: 0, False: 0]
  ------------------
  462|      0|          break;
  463|       |        /* disconnect the old conn and continue */
  464|      0|        CURL_TRC_M(data, "Discarding connection #%"
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  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]
  |  |  ------------------
  ------------------
  465|      0|                   FMT_OFF_T " from %zu to reach total "
  466|      0|                   "limit of %zu",
  467|      0|                   oldest_idle->connection_id, cpool->num_conn, total_limit);
  468|      0|        cpool_evict_conn(cpool, data, oldest_idle);
  469|      0|      }
  470|      0|      shutdowns = Curl_cshutdn_count(data);
  471|      0|    }
  472|      0|    if((cpool->num_conn + shutdowns) >= total_limit) {
  ------------------
  |  Branch (472:8): [True: 0, False: 0]
  ------------------
  473|      0|      res = CPOOL_LIMIT_TOTAL;
  ------------------
  |  |   92|      0|#define CPOOL_LIMIT_TOTAL  2
  ------------------
  474|      0|      goto out;
  475|      0|    }
  476|      0|  }
  477|       |
  478|      0|out:
  479|      0|  CPOOL_UNLOCK(cpool, cpool->idata);
  ------------------
  |  |   53|      0|  do {                                                                  \
  |  |   54|      0|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|      0|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   57|      0|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|      0|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|      0|    }                                                                   \
  |  |   60|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (479:3): [True: 0, False: 0]
  |  Branch (479:3): [True: 0, False: 0]
  ------------------
  480|      0|  return res;
  481|      0|}
Curl_cpool_add:
  485|  7.93k|{
  486|  7.93k|  CURLcode result = CURLE_OK;
  487|  7.93k|  struct cpool_bundle *bundle = NULL;
  488|  7.93k|  struct cpool *cpool = cpool_get_instance(data);
  489|  7.93k|  DEBUGASSERT(conn);
  ------------------
  |  | 1077|  7.93k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (489:3): [True: 0, False: 7.93k]
  |  Branch (489:3): [True: 7.93k, False: 0]
  ------------------
  490|       |
  491|  7.93k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1077|  7.93k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (491:3): [True: 0, False: 7.93k]
  |  Branch (491:3): [True: 7.93k, False: 0]
  ------------------
  492|  7.93k|  if(!cpool)
  ------------------
  |  Branch (492:6): [True: 0, False: 7.93k]
  ------------------
  493|      0|    return CURLE_FAILED_INIT;
  494|       |
  495|  7.93k|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  7.93k|  do {                                                                  \
  |  |   43|  7.93k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 7.93k, False: 0]
  |  |  ------------------
  |  |   44|  7.93k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  7.93k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 7.93k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  7.93k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  7.93k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1077|  7.93k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  7.93k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1051|  7.93k|#define TRUE true
  |  |  ------------------
  |  |   49|  7.93k|    }                                                                   \
  |  |   50|  7.93k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 7.93k]
  |  |  ------------------
  ------------------
  |  Branch (495:3): [True: 0, False: 7.93k]
  |  Branch (495:3): [True: 7.93k, False: 0]
  ------------------
  496|  7.93k|  bundle = cpool_find_bundle(cpool, conn);
  497|  7.93k|  if(!bundle) {
  ------------------
  |  Branch (497:6): [True: 7.93k, False: 0]
  ------------------
  498|  7.93k|    bundle = cpool_add_bundle(cpool, conn);
  499|  7.93k|    if(!bundle) {
  ------------------
  |  Branch (499:8): [True: 0, False: 7.93k]
  ------------------
  500|      0|      result = CURLE_OUT_OF_MEMORY;
  501|      0|      goto out;
  502|      0|    }
  503|  7.93k|  }
  504|       |
  505|  7.93k|  cpool_bundle_add(bundle, conn);
  506|  7.93k|  conn->connection_id = cpool->next_connection_id++;
  507|  7.93k|  cpool->num_conn++;
  508|  7.93k|  CURL_TRC_M(data, "[CPOOL] added connection %" FMT_OFF_T ". "
  ------------------
  |  |  148|  7.93k|  do {                                   \
  |  |  149|  7.93k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  7.93k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  7.93k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  15.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 7.93k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 7.93k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  15.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|  7.93k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  7.93k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  7.93k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 7.93k]
  |  |  ------------------
  ------------------
  509|  7.93k|             "The cache now contains %zu members",
  510|  7.93k|             conn->connection_id, cpool->num_conn);
  511|  7.93k|out:
  512|  7.93k|  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  7.93k|  do {                                                                  \
  |  |   54|  7.93k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 7.93k, False: 0]
  |  |  ------------------
  |  |   55|  7.93k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1077|  7.93k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  7.93k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1054|  7.93k|#define FALSE false
  |  |  ------------------
  |  |   57|  7.93k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  7.93k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 7.93k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  7.93k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  7.93k|    }                                                                   \
  |  |   60|  7.93k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 7.93k]
  |  |  ------------------
  ------------------
  |  Branch (512:3): [True: 0, False: 7.93k]
  |  Branch (512:3): [True: 7.93k, False: 0]
  ------------------
  513|       |
  514|  7.93k|  return result;
  515|  7.93k|}
Curl_cpool_conn_now_idle:
  572|      2|{
  573|      2|  unsigned int maxconnects;
  574|      2|  struct connectdata *oldest_idle = NULL;
  575|      2|  struct cpool *cpool = cpool_get_instance(data);
  576|      2|  bool kept = TRUE;
  ------------------
  |  | 1051|      2|#define TRUE true
  ------------------
  577|       |
  578|      2|  if(!data || !data->multi)
  ------------------
  |  Branch (578:6): [True: 0, False: 2]
  |  Branch (578:15): [True: 0, False: 2]
  ------------------
  579|      0|    return kept;
  580|       |
  581|      2|  if(!data->multi->maxconnects) {
  ------------------
  |  Branch (581:6): [True: 2, False: 0]
  ------------------
  582|      2|    unsigned int running = Curl_multi_xfers_running(data->multi);
  583|      2|    maxconnects = (running <= UINT_MAX / 4) ? running * 4 : UINT_MAX;
  ------------------
  |  Branch (583:19): [True: 2, False: 0]
  ------------------
  584|      2|  }
  585|      0|  else {
  586|      0|    maxconnects = data->multi->maxconnects;
  587|      0|  }
  588|       |
  589|      2|  conn->lastused = *Curl_pgrs_now(data); /* it was used up until now */
  590|      2|  if(cpool && maxconnects) {
  ------------------
  |  Branch (590:6): [True: 2, False: 0]
  |  Branch (590:15): [True: 2, False: 0]
  ------------------
  591|       |    /* may be called form a callback already under lock */
  592|      2|    bool do_lock = !CPOOL_IS_LOCKED(cpool);
  ------------------
  |  |   39|      2|#define CPOOL_IS_LOCKED(c)    ((c) && (c)->locked)
  |  |  ------------------
  |  |  |  Branch (39:32): [True: 2, False: 0]
  |  |  |  Branch (39:39): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  593|      2|    if(do_lock)
  ------------------
  |  Branch (593:8): [True: 0, False: 2]
  ------------------
  594|      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);                                        \
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|      0|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1051|      0|#define TRUE true
  |  |  ------------------
  |  |   49|      0|    }                                                                   \
  |  |   50|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (594:7): [True: 0, False: 0]
  |  Branch (594:7): [True: 0, False: 0]
  ------------------
  595|      2|    if(cpool->num_conn > maxconnects) {
  ------------------
  |  Branch (595:8): [True: 0, False: 2]
  ------------------
  596|      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]
  |  |  ------------------
  ------------------
  597|      0|            cpool->num_conn, maxconnects);
  598|       |
  599|      0|      oldest_idle = cpool_get_oldest_idle(cpool, Curl_pgrs_now(data));
  600|      0|      kept = (oldest_idle != conn);
  601|      0|      if(oldest_idle) {
  ------------------
  |  Branch (601:10): [True: 0, False: 0]
  ------------------
  602|      0|        cpool_evict_conn(cpool, data, oldest_idle);
  603|      0|      }
  604|      0|    }
  605|      2|    if(do_lock)
  ------------------
  |  Branch (605:8): [True: 0, False: 2]
  ------------------
  606|      0|      CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|      0|  do {                                                                  \
  |  |   54|      0|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|      0|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1054|      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 (606:7): [True: 0, False: 0]
  |  Branch (606:7): [True: 0, False: 0]
  ------------------
  607|      2|  }
  608|       |
  609|      2|  return kept;
  610|      2|}
Curl_cpool_find:
  617|  8.09k|{
  618|  8.09k|  struct cpool *cpool = cpool_get_instance(data);
  619|  8.09k|  struct cpool_bundle *bundle;
  620|  8.09k|  bool found = FALSE;
  ------------------
  |  | 1054|  8.09k|#define FALSE false
  ------------------
  621|       |
  622|  8.09k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1077|  8.09k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (622:3): [True: 0, False: 8.09k]
  |  Branch (622:3): [True: 8.09k, False: 0]
  ------------------
  623|  8.09k|  DEBUGASSERT(conn_cb);
  ------------------
  |  | 1077|  8.09k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (623:3): [True: 0, False: 8.09k]
  |  Branch (623:3): [True: 8.09k, False: 0]
  ------------------
  624|  8.09k|  if(!cpool)
  ------------------
  |  Branch (624:6): [True: 0, False: 8.09k]
  ------------------
  625|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  626|       |
  627|  8.09k|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  8.09k|  do {                                                                  \
  |  |   43|  8.09k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 8.09k, False: 0]
  |  |  ------------------
  |  |   44|  8.09k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  8.09k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 8.09k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  8.09k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  8.09k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1077|  8.09k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  8.09k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1051|  8.09k|#define TRUE true
  |  |  ------------------
  |  |   49|  8.09k|    }                                                                   \
  |  |   50|  8.09k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 8.09k]
  |  |  ------------------
  ------------------
  |  Branch (627:3): [True: 0, False: 8.09k]
  |  Branch (627:3): [True: 8.09k, False: 0]
  ------------------
  628|  8.09k|  bundle = Curl_hash_pick(&cpool->dest2bundle,
  629|  8.09k|                          CURL_UNCONST(destination),
  ------------------
  |  |  862|  8.09k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  630|  8.09k|                          strlen(destination) + 1);
  631|  8.09k|  if(bundle) {
  ------------------
  |  Branch (631:6): [True: 178, False: 7.92k]
  ------------------
  632|    178|    struct Curl_llist_node *curr = Curl_llist_head(&bundle->conns);
  633|    356|    while(curr) {
  ------------------
  |  Branch (633:11): [True: 178, False: 178]
  ------------------
  634|    178|      struct connectdata *conn = Curl_node_elem(curr);
  635|       |      /* Get next node now. callback might discard current */
  636|    178|      curr = Curl_node_next(curr);
  637|       |
  638|    178|      if(conn_cb(conn, userdata)) {
  ------------------
  |  Branch (638:10): [True: 0, False: 178]
  ------------------
  639|      0|        found = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  640|      0|        break;
  641|      0|      }
  642|    178|    }
  643|    178|  }
  644|       |
  645|  8.09k|  if(done_cb) {
  ------------------
  |  Branch (645:6): [True: 8.09k, False: 0]
  ------------------
  646|  8.09k|    found = done_cb(userdata);
  647|  8.09k|  }
  648|  8.09k|  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  8.09k|  do {                                                                  \
  |  |   54|  8.09k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 8.09k, False: 0]
  |  |  ------------------
  |  |   55|  8.09k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1077|  8.09k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  8.09k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1054|  8.09k|#define FALSE false
  |  |  ------------------
  |  |   57|  8.09k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  8.09k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 8.09k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  8.09k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  8.09k|    }                                                                   \
  |  |   60|  8.09k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 8.09k]
  |  |  ------------------
  ------------------
  |  Branch (648:3): [True: 0, False: 8.09k]
  |  Branch (648:3): [True: 8.09k, False: 0]
  ------------------
  649|  8.09k|  return found;
  650|  8.09k|}
Curl_conn_terminate:
  655|  7.93k|{
  656|  7.93k|  struct cpool *cpool = cpool_get_instance(data);
  657|  7.93k|  bool do_lock;
  658|       |
  659|  7.93k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1077|  7.93k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (659:3): [True: 0, False: 7.93k]
  |  Branch (659:3): [True: 7.93k, False: 0]
  ------------------
  660|  7.93k|  DEBUGASSERT(data && !data->conn);
  ------------------
  |  | 1077|  7.93k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (660:3): [True: 0, False: 7.93k]
  |  Branch (660:3): [True: 0, False: 0]
  |  Branch (660:3): [True: 7.93k, False: 0]
  |  Branch (660:3): [True: 7.93k, False: 0]
  ------------------
  661|  7.93k|  if(!cpool)
  ------------------
  |  Branch (661:6): [True: 0, False: 7.93k]
  ------------------
  662|      0|    return;
  663|       |
  664|       |  /* If this connection is not marked to force-close, leave it open if there
  665|       |   * are other users of it */
  666|  7.93k|  if(CONN_INUSE(conn) && !aborted) {
  ------------------
  |  |  284|  15.8k|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  |  |  ------------------
  |  |  |  Branch (284:23): [True: 0, False: 7.93k]
  |  |  ------------------
  ------------------
  |  Branch (666:26): [True: 0, False: 0]
  ------------------
  667|      0|    DEBUGASSERT(0); /* does this ever happen? */
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (667:5): [Folded, False: 0]
  |  Branch (667:5): [Folded, False: 0]
  ------------------
  668|      0|    DEBUGF(infof(data, "conn terminate when inuse: %u", conn->attached_xfers));
  ------------------
  |  | 1063|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  669|      0|    return;
  670|      0|  }
  671|       |
  672|       |  /* This method may be called while we are under lock, e.g. from a
  673|       |   * user callback in find. */
  674|  7.93k|  do_lock = !CPOOL_IS_LOCKED(cpool);
  ------------------
  |  |   39|  7.93k|#define CPOOL_IS_LOCKED(c)    ((c) && (c)->locked)
  |  |  ------------------
  |  |  |  Branch (39:32): [True: 7.93k, False: 0]
  |  |  |  Branch (39:39): [True: 7.93k, False: 2]
  |  |  ------------------
  ------------------
  675|  7.93k|  if(do_lock)
  ------------------
  |  Branch (675:6): [True: 2, False: 7.93k]
  ------------------
  676|      2|    CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|      2|  do {                                                                  \
  |  |   43|      2|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 2, False: 0]
  |  |  ------------------
  |  |   44|      2|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|      2|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 2]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|      2|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|      2|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1077|      2|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|      2|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1051|      2|#define TRUE true
  |  |  ------------------
  |  |   49|      2|    }                                                                   \
  |  |   50|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
  |  Branch (676:5): [True: 0, False: 2]
  |  Branch (676:5): [True: 2, False: 0]
  ------------------
  677|       |
  678|  7.93k|  if(conn->bits.in_cpool) {
  ------------------
  |  Branch (678:6): [True: 7.93k, False: 0]
  ------------------
  679|  7.93k|    cpool_remove_conn(cpool, conn);
  680|  7.93k|    DEBUGASSERT(!conn->bits.in_cpool);
  ------------------
  |  | 1077|  7.93k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (680:5): [True: 0, False: 7.93k]
  |  Branch (680:5): [True: 7.93k, False: 0]
  ------------------
  681|  7.93k|  }
  682|       |
  683|       |  /* treat the connection as aborted in CONNECT_ONLY situations,
  684|       |   * so no graceful shutdown is attempted. */
  685|  7.93k|  if(conn->bits.connect_only)
  ------------------
  |  Branch (685:6): [True: 8, False: 7.92k]
  ------------------
  686|      8|    aborted = TRUE;
  ------------------
  |  | 1051|      8|#define TRUE true
  ------------------
  687|       |
  688|  7.93k|  if(data->multi) {
  ------------------
  |  Branch (688:6): [True: 7.93k, False: 0]
  ------------------
  689|       |    /* Add it to the multi's cpool for shutdown handling */
  690|  7.93k|    infof(data, "%s connection #%" FMT_OFF_T,
  ------------------
  |  |  143|  7.93k|  do {                               \
  |  |  144|  7.93k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  7.93k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 7.93k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 7.93k]
  |  |  |  |  ------------------
  |  |  |  |  320|  7.93k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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.93k|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|  7.93k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 7.93k]
  |  |  ------------------
  ------------------
  691|  7.93k|          aborted ? "closing" : "shutting down", conn->connection_id);
  692|  7.93k|    cpool_discard_conn(&data->multi->cpool, data, conn, aborted);
  693|  7.93k|  }
  694|      0|  else {
  695|       |    /* No multi available, terminate */
  696|      0|    infof(data, "closing connection #%" FMT_OFF_T, conn->connection_id);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  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]
  |  |  ------------------
  ------------------
  697|      0|    Curl_cshutdn_terminate(cpool->idata, conn, !aborted);
  698|      0|  }
  699|       |
  700|  7.93k|  if(do_lock)
  ------------------
  |  Branch (700:6): [True: 2, False: 7.93k]
  ------------------
  701|       |    CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|      2|  do {                                                                  \
  |  |   54|      2|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 2, False: 0]
  |  |  ------------------
  |  |   55|      2|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1077|      2|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|      2|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1054|      2|#define FALSE false
  |  |  ------------------
  |  |   57|      2|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|      2|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 2]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      2|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|      2|    }                                                                   \
  |  |   60|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
  |  Branch (701:5): [True: 0, False: 2]
  |  Branch (701:5): [True: 2, False: 0]
  ------------------
  702|  7.93k|}
Curl_cpool_prune_dead:
  737|  8.11k|{
  738|  8.11k|  struct cpool *cpool = cpool_get_instance(data);
  739|  8.11k|  timediff_t elapsed;
  740|       |
  741|  8.11k|  if(!cpool)
  ------------------
  |  Branch (741:6): [True: 0, False: 8.11k]
  ------------------
  742|      0|    return;
  743|       |
  744|  8.11k|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  8.11k|  do {                                                                  \
  |  |   43|  8.11k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 8.11k, False: 0]
  |  |  ------------------
  |  |   44|  8.11k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  8.11k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 8.11k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  8.11k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  8.11k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1077|  8.11k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  8.11k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1051|  8.11k|#define TRUE true
  |  |  ------------------
  |  |   49|  8.11k|    }                                                                   \
  |  |   50|  8.11k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 8.11k]
  |  |  ------------------
  ------------------
  |  Branch (744:3): [True: 0, False: 8.11k]
  |  Branch (744:3): [True: 8.11k, False: 0]
  ------------------
  745|  8.11k|  elapsed = curlx_ptimediff_ms(Curl_pgrs_now(data), &cpool->last_cleanup);
  746|       |
  747|  8.11k|  if(elapsed >= 1000L) {
  ------------------
  |  Branch (747:6): [True: 7.68k, False: 425]
  ------------------
  748|  7.68k|    struct cpool_reaper_ctx reaper;
  749|       |
  750|  7.68k|    memset(&reaper, 0, sizeof(reaper));
  751|  7.68k|    reaper.now = *Curl_pgrs_now(data);
  752|  7.68k|    while(cpool_foreach(data, cpool, &reaper, cpool_reap_dead_cb))
  ------------------
  |  Branch (752:11): [True: 0, False: 7.68k]
  ------------------
  753|      0|      ;
  754|  7.68k|    cpool->last_cleanup = *Curl_pgrs_now(data);
  755|  7.68k|  }
  756|       |  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  8.11k|  do {                                                                  \
  |  |   54|  8.11k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 8.11k, False: 0]
  |  |  ------------------
  |  |   55|  8.11k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1077|  8.11k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  8.11k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1054|  8.11k|#define FALSE false
  |  |  ------------------
  |  |   57|  8.11k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  8.11k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 8.11k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  8.11k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  8.11k|    }                                                                   \
  |  |   60|  8.11k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 8.11k]
  |  |  ------------------
  ------------------
  |  Branch (756:3): [True: 0, False: 8.11k]
  |  Branch (756:3): [True: 8.11k, False: 0]
  ------------------
  757|  8.11k|}
Curl_cpool_get_conn:
  800|      2|{
  801|      2|  struct cpool *cpool = cpool_get_instance(data);
  802|      2|  struct cpool_find_ctx fctx;
  803|       |
  804|      2|  if(!cpool)
  ------------------
  |  Branch (804:6): [True: 0, False: 2]
  ------------------
  805|      0|    return NULL;
  806|      2|  fctx.id = conn_id;
  807|      2|  fctx.conn = NULL;
  808|      2|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|      2|  do {                                                                  \
  |  |   43|      2|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 2, False: 0]
  |  |  ------------------
  |  |   44|      2|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|      2|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 2]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|      2|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|      2|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1077|      2|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|      2|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1051|      2|#define TRUE true
  |  |  ------------------
  |  |   49|      2|    }                                                                   \
  |  |   50|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
  |  Branch (808:3): [True: 0, False: 2]
  |  Branch (808:3): [True: 2, False: 0]
  ------------------
  809|      2|  cpool_foreach(data, cpool, &fctx, cpool_find_conn);
  810|      2|  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|      2|  do {                                                                  \
  |  |   54|      2|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 2, False: 0]
  |  |  ------------------
  |  |   55|      2|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1077|      2|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|      2|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1054|      2|#define FALSE false
  |  |  ------------------
  |  |   57|      2|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|      2|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 2]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      2|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|      2|    }                                                                   \
  |  |   60|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
  |  Branch (810:3): [True: 0, False: 2]
  |  Branch (810:3): [True: 2, False: 0]
  ------------------
  811|      2|  return fctx.conn;
  812|      2|}
Curl_cpool_do_by_id:
  834|      2|{
  835|      2|  struct cpool *cpool = cpool_get_instance(data);
  836|      2|  struct cpool_do_conn_ctx dctx;
  837|       |
  838|      2|  if(!cpool)
  ------------------
  |  Branch (838:6): [True: 0, False: 2]
  ------------------
  839|      0|    return;
  840|      2|  dctx.id = conn_id;
  841|      2|  dctx.cb = cb;
  842|      2|  dctx.cbdata = cbdata;
  843|      2|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|      2|  do {                                                                  \
  |  |   43|      2|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 2, False: 0]
  |  |  ------------------
  |  |   44|      2|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|      2|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 2]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|      2|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|      2|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1077|      2|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|      2|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1051|      2|#define TRUE true
  |  |  ------------------
  |  |   49|      2|    }                                                                   \
  |  |   50|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
  |  Branch (843:3): [True: 0, False: 2]
  |  Branch (843:3): [True: 2, False: 0]
  ------------------
  844|      2|  cpool_foreach(data, cpool, &dctx, cpool_do_conn);
  845|       |  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|      2|  do {                                                                  \
  |  |   54|      2|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 2, False: 0]
  |  |  ------------------
  |  |   55|      2|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1077|      2|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|      2|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1054|      2|#define FALSE false
  |  |  ------------------
  |  |   57|      2|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|      2|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 2]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      2|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|      2|    }                                                                   \
  |  |   60|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
  |  Branch (845:3): [True: 0, False: 2]
  |  Branch (845:3): [True: 2, False: 0]
  ------------------
  846|      2|}
Curl_cpool_do_locked:
  851|  7.93k|{
  852|  7.93k|  struct cpool *cpool = cpool_get_instance(data);
  853|  7.93k|  if(cpool) {
  ------------------
  |  Branch (853:6): [True: 7.93k, False: 0]
  ------------------
  854|  7.93k|    CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  7.93k|  do {                                                                  \
  |  |   43|  7.93k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 7.93k, False: 0]
  |  |  ------------------
  |  |   44|  7.93k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  7.93k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 7.93k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  7.93k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  7.93k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1077|  7.93k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  7.93k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1051|  7.93k|#define TRUE true
  |  |  ------------------
  |  |   49|  7.93k|    }                                                                   \
  |  |   50|  7.93k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 7.93k]
  |  |  ------------------
  ------------------
  |  Branch (854:5): [True: 0, False: 7.93k]
  |  Branch (854:5): [True: 7.93k, False: 0]
  ------------------
  855|  7.93k|    cb(conn, data, cbdata);
  856|  7.93k|    CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  7.93k|  do {                                                                  \
  |  |   54|  7.93k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 7.93k, False: 0]
  |  |  ------------------
  |  |   55|  7.93k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1077|  7.93k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  7.93k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1054|  7.93k|#define FALSE false
  |  |  ------------------
  |  |   57|  7.93k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  7.93k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 7.93k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  7.93k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  7.93k|    }                                                                   \
  |  |   60|  7.93k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 7.93k]
  |  |  ------------------
  ------------------
  |  Branch (856:5): [True: 0, False: 7.93k]
  |  Branch (856:5): [True: 7.93k, False: 0]
  ------------------
  857|  7.93k|  }
  858|      0|  else
  859|      0|    cb(conn, data, cbdata);
  860|  7.93k|}
conncache.c:cpool_bundle_free_entry:
  109|  7.93k|{
  110|  7.93k|  cpool_bundle_destroy((struct cpool_bundle *)freethis);
  111|  7.93k|}
conncache.c:cpool_bundle_destroy:
   84|  7.93k|{
   85|  7.93k|  DEBUGASSERT(!Curl_llist_count(&bundle->conns));
  ------------------
  |  | 1077|  7.93k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (85:3): [True: 0, False: 7.93k]
  |  Branch (85:3): [True: 7.93k, False: 0]
  ------------------
   86|  7.93k|  curlx_free(bundle);
  ------------------
  |  | 1488|  7.93k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   87|  7.93k|}
conncache.c:cpool_get_first:
  130|  13.0k|{
  131|  13.0k|  struct Curl_hash_iterator iter;
  132|  13.0k|  struct Curl_hash_element *he;
  133|  13.0k|  struct cpool_bundle *bundle;
  134|  13.0k|  struct Curl_llist_node *conn_node;
  135|       |
  136|  13.0k|  Curl_hash_start_iterate(&cpool->dest2bundle, &iter);
  137|  13.0k|  for(he = Curl_hash_next_element(&iter); he;
  ------------------
  |  Branch (137:43): [True: 0, False: 13.0k]
  ------------------
  138|  13.0k|      he = Curl_hash_next_element(&iter)) {
  139|      0|    bundle = he->ptr;
  140|      0|    conn_node = Curl_llist_head(&bundle->conns);
  141|      0|    if(conn_node)
  ------------------
  |  Branch (141:8): [True: 0, False: 0]
  ------------------
  142|      0|      return Curl_node_elem(conn_node);
  143|      0|  }
  144|  13.0k|  return NULL;
  145|  13.0k|}
conncache.c:cpool_remove_conn:
  164|  7.93k|{
  165|  7.93k|  struct Curl_llist *list = Curl_node_llist(&conn->cpool_node);
  166|  7.93k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1077|  7.93k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (166:3): [True: 0, False: 7.93k]
  |  Branch (166:3): [True: 7.93k, False: 0]
  ------------------
  167|  7.93k|  if(list) {
  ------------------
  |  Branch (167:6): [True: 7.93k, False: 0]
  ------------------
  168|       |    /* The connection is certainly in the pool, but where? */
  169|  7.93k|    struct cpool_bundle *bundle = cpool_find_bundle(cpool, conn);
  170|  7.93k|    if(bundle && (list == &bundle->conns)) {
  ------------------
  |  Branch (170:8): [True: 7.93k, False: 0]
  |  Branch (170:18): [True: 7.93k, False: 0]
  ------------------
  171|  7.93k|      cpool_bundle_remove(bundle, conn);
  172|  7.93k|      if(!Curl_llist_count(&bundle->conns))
  ------------------
  |  Branch (172:10): [True: 7.93k, False: 0]
  ------------------
  173|  7.93k|        cpool_remove_bundle(cpool, bundle);
  174|  7.93k|      conn->bits.in_cpool = FALSE;
  ------------------
  |  | 1054|  7.93k|#define FALSE false
  ------------------
  175|  7.93k|      cpool->num_conn--;
  176|  7.93k|    }
  177|      0|    else {
  178|       |      /* Should have been in the bundle list */
  179|       |      DEBUGASSERT(NULL);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:7): [True: 0, False: 0]
  |  Branch (179:7): [True: 0, False: 0]
  ------------------
  180|      0|    }
  181|  7.93k|  }
  182|  7.93k|}
conncache.c:cpool_bundle_remove:
  101|  7.93k|{
  102|  7.93k|  (void)bundle;
  103|  7.93k|  DEBUGASSERT(Curl_node_llist(&conn->cpool_node) == &bundle->conns);
  ------------------
  |  | 1077|  7.93k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (103:3): [True: 0, False: 7.93k]
  |  Branch (103:3): [True: 7.93k, False: 0]
  ------------------
  104|  7.93k|  Curl_node_remove(&conn->cpool_node);
  105|       |  conn->bits.in_cpool = FALSE;
  ------------------
  |  | 1054|  7.93k|#define FALSE false
  ------------------
  106|  7.93k|}
conncache.c:cpool_remove_bundle:
  156|  7.93k|{
  157|  7.93k|  if(!cpool)
  ------------------
  |  Branch (157:6): [True: 0, False: 7.93k]
  ------------------
  158|      0|    return;
  159|  7.93k|  Curl_hash_delete(&cpool->dest2bundle, bundle->dest, bundle->dest_len);
  160|  7.93k|}
conncache.c:cpool_discard_conn:
  188|  7.93k|{
  189|  7.93k|  bool done = FALSE;
  ------------------
  |  | 1054|  7.93k|#define FALSE false
  ------------------
  190|       |
  191|  7.93k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  7.93k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (191:3): [True: 0, False: 7.93k]
  |  Branch (191:3): [True: 7.93k, False: 0]
  ------------------
  192|  7.93k|  DEBUGASSERT(!data->conn);
  ------------------
  |  | 1077|  7.93k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (192:3): [True: 0, False: 7.93k]
  |  Branch (192:3): [True: 7.93k, False: 0]
  ------------------
  193|  7.93k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1077|  7.93k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (193:3): [True: 0, False: 7.93k]
  |  Branch (193:3): [True: 7.93k, False: 0]
  ------------------
  194|  7.93k|  DEBUGASSERT(!conn->bits.in_cpool);
  ------------------
  |  | 1077|  7.93k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (194:3): [True: 0, False: 7.93k]
  |  Branch (194:3): [True: 7.93k, 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|  7.93k|  if(CONN_INUSE(conn) && !aborted) {
  ------------------
  |  |  284|  15.8k|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  |  |  ------------------
  |  |  |  Branch (284:23): [True: 0, False: 7.93k]
  |  |  ------------------
  ------------------
  |  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|  7.93k|  if(conn->bits.connect_only)
  ------------------
  |  Branch (209:6): [True: 8, False: 7.92k]
  ------------------
  210|      8|    aborted = TRUE;
  ------------------
  |  | 1051|      8|#define TRUE true
  ------------------
  211|  7.93k|  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|  7.93k|  if(aborted)
  ------------------
  |  Branch (218:6): [True: 7.49k, False: 434]
  ------------------
  219|  7.49k|    done = TRUE;
  ------------------
  |  | 1051|  7.49k|#define TRUE true
  ------------------
  220|  7.93k|  if(!done) {
  ------------------
  |  Branch (220:6): [True: 434, False: 7.49k]
  ------------------
  221|       |    /* Attempt to shutdown the connection right away. */
  222|    434|    Curl_cshutdn_run_once(cpool->idata, conn, &done);
  223|    434|  }
  224|       |
  225|  7.93k|  if(done || !data->multi)
  ------------------
  |  Branch (225:6): [True: 7.93k, False: 0]
  |  Branch (225:14): [True: 0, False: 0]
  ------------------
  226|  7.93k|    Curl_cshutdn_terminate(cpool->idata, conn, FALSE);
  ------------------
  |  | 1054|  7.93k|#define FALSE false
  ------------------
  227|      0|  else
  228|      0|    Curl_cshutdn_add(&data->multi->cshutdn, conn, cpool->num_conn);
  229|  7.93k|}
conncache.c:cpool_get_instance:
  257|  61.6k|{
  258|  61.6k|  if(data) {
  ------------------
  |  Branch (258:6): [True: 61.6k, False: 0]
  ------------------
  259|  61.6k|    if(CURL_SHARE_KEEP_CONNECT(data->share))
  ------------------
  |  |   41|  61.6k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  ------------------
  |  |  |  Branch (41:4): [True: 0, False: 61.6k]
  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  260|      0|      return &data->share->cpool;
  261|  61.6k|    else if(data->multi_easy)
  ------------------
  |  Branch (261:13): [True: 0, False: 61.6k]
  ------------------
  262|      0|      return &data->multi_easy->cpool;
  263|  61.6k|    else if(data->multi)
  ------------------
  |  Branch (263:13): [True: 61.6k, False: 0]
  ------------------
  264|  61.6k|      return &data->multi->cpool;
  265|  61.6k|  }
  266|      0|  return NULL;
  267|  61.6k|}
conncache.c:cpool_find_bundle:
  149|  15.8k|{
  150|  15.8k|  return Curl_hash_pick(&cpool->dest2bundle,
  151|  15.8k|                        conn->destination, strlen(conn->destination) + 1);
  152|  15.8k|}
conncache.c:cpool_add_bundle:
  293|  7.93k|{
  294|  7.93k|  struct cpool_bundle *bundle;
  295|       |
  296|  7.93k|  bundle = cpool_bundle_create(conn->destination);
  297|  7.93k|  if(!bundle)
  ------------------
  |  Branch (297:6): [True: 0, False: 7.93k]
  ------------------
  298|      0|    return NULL;
  299|       |
  300|  7.93k|  if(!Curl_hash_add(&cpool->dest2bundle,
  ------------------
  |  Branch (300:6): [True: 0, False: 7.93k]
  ------------------
  301|  7.93k|                    bundle->dest, bundle->dest_len, bundle)) {
  302|      0|    cpool_bundle_destroy(bundle);
  303|      0|    return NULL;
  304|      0|  }
  305|  7.93k|  return bundle;
  306|  7.93k|}
conncache.c:cpool_bundle_create:
   70|  7.93k|{
   71|  7.93k|  struct cpool_bundle *bundle;
   72|  7.93k|  size_t dest_len = strlen(dest) + 1;
   73|       |
   74|  7.93k|  bundle = curlx_calloc(1, sizeof(*bundle) + dest_len - 1);
  ------------------
  |  | 1485|  7.93k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   75|  7.93k|  if(!bundle)
  ------------------
  |  Branch (75:6): [True: 0, False: 7.93k]
  ------------------
   76|      0|    return NULL;
   77|  7.93k|  Curl_llist_init(&bundle->conns, NULL);
   78|  7.93k|  bundle->dest_len = dest_len;
   79|  7.93k|  memcpy(bundle->dest, dest, bundle->dest_len);
   80|  7.93k|  return bundle;
   81|  7.93k|}
conncache.c:cpool_bundle_add:
   92|  7.93k|{
   93|  7.93k|  DEBUGASSERT(!Curl_node_llist(&conn->cpool_node));
  ------------------
  |  | 1077|  7.93k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (93:3): [True: 0, False: 7.93k]
  |  Branch (93:3): [True: 7.93k, False: 0]
  ------------------
   94|  7.93k|  Curl_llist_append(&bundle->conns, conn, &conn->cpool_node);
   95|       |  conn->bits.in_cpool = TRUE;
  ------------------
  |  | 1051|  7.93k|#define TRUE true
  ------------------
   96|  7.93k|}
conncache.c:cpool_foreach:
  534|  7.68k|{
  535|  7.68k|  struct Curl_hash_iterator iter;
  536|  7.68k|  struct Curl_hash_element *he;
  537|       |
  538|  7.68k|  if(!cpool)
  ------------------
  |  Branch (538:6): [True: 0, False: 7.68k]
  ------------------
  539|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  540|       |
  541|  7.68k|  Curl_hash_start_iterate(&cpool->dest2bundle, &iter);
  542|       |
  543|  7.68k|  he = Curl_hash_next_element(&iter);
  544|  7.68k|  while(he) {
  ------------------
  |  Branch (544:9): [True: 2, False: 7.68k]
  ------------------
  545|      2|    struct Curl_llist_node *curr;
  546|      2|    struct cpool_bundle *bundle = he->ptr;
  547|      2|    he = Curl_hash_next_element(&iter);
  548|       |
  549|      2|    curr = Curl_llist_head(&bundle->conns);
  550|      2|    while(curr) {
  ------------------
  |  Branch (550:11): [True: 2, False: 0]
  ------------------
  551|       |      /* Yes, we need to update curr before calling func(), because func()
  552|       |         might decide to remove the connection */
  553|      2|      struct connectdata *conn = Curl_node_elem(curr);
  554|      2|      curr = Curl_node_next(curr);
  555|       |
  556|      2|      if(func(data, conn, param) == 1) {
  ------------------
  |  Branch (556:10): [True: 2, False: 0]
  ------------------
  557|      2|        return TRUE;
  ------------------
  |  | 1051|      2|#define TRUE true
  ------------------
  558|      2|      }
  559|      2|    }
  560|      2|  }
  561|  7.68k|  return FALSE;
  ------------------
  |  | 1054|  7.68k|#define FALSE false
  ------------------
  562|  7.68k|}
conncache.c:cpool_find_conn:
  788|      2|{
  789|      2|  struct cpool_find_ctx *fctx = param;
  790|      2|  (void)data;
  791|      2|  if(conn->connection_id == fctx->id) {
  ------------------
  |  Branch (791:6): [True: 2, False: 0]
  ------------------
  792|      2|    fctx->conn = conn;
  793|      2|    return 1;
  794|      2|  }
  795|      0|  return 0;
  796|      2|}

timeleft_now_ms:
   74|  56.3k|{
   75|  56.3k|  timediff_t timeleft_ms = 0;
   76|  56.3k|  timediff_t ctimeleft_ms = 0;
   77|       |
   78|  56.3k|  if(Curl_shutdown_started(data, FIRSTSOCKET))
  ------------------
  |  |  245|  56.3k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (78:6): [True: 0, False: 56.3k]
  ------------------
   79|      0|    return Curl_shutdown_timeleft(data, data->conn, FIRSTSOCKET);
  ------------------
  |  |  245|      0|#define FIRSTSOCKET     0
  ------------------
   80|  56.3k|  else if(Curl_is_connecting(data)) {
  ------------------
  |  Branch (80:11): [True: 52.0k, False: 4.27k]
  ------------------
   81|  52.0k|    timediff_t ctimeout_ms = (data->set.connecttimeout > 0) ?
  ------------------
  |  Branch (81:30): [True: 773, False: 51.2k]
  ------------------
   82|  51.2k|      data->set.connecttimeout : DEFAULT_CONNECT_TIMEOUT;
  ------------------
  |  |   40|  51.2k|#define DEFAULT_CONNECT_TIMEOUT 300000 /* milliseconds == five minutes */
  ------------------
   83|  52.0k|    ctimeleft_ms = ctimeout_ms -
   84|  52.0k|      curlx_ptimediff_ms(pnow, &data->progress.t_startsingle);
   85|  52.0k|    if(!ctimeleft_ms)
  ------------------
  |  Branch (85:8): [True: 1, False: 52.0k]
  ------------------
   86|      1|      ctimeleft_ms = -1; /* 0 is "no limit", fake 1 ms expiry */
   87|  52.0k|  }
   88|  4.27k|  else if(!data->set.timeout || data->set.connect_only) {
  ------------------
  |  Branch (88:11): [True: 0, False: 4.27k]
  |  Branch (88:33): [True: 16, False: 4.26k]
  ------------------
   89|     16|    return 0; /* no timeout in place or checked, return "no limit" */
   90|     16|  }
   91|       |
   92|  56.3k|  if(data->set.timeout) {
  ------------------
  |  Branch (92:6): [True: 56.3k, False: 0]
  ------------------
   93|  56.3k|    timeleft_ms = data->set.timeout -
   94|  56.3k|      curlx_ptimediff_ms(pnow, &data->progress.t_startop);
   95|  56.3k|    if(!timeleft_ms)
  ------------------
  |  Branch (95:8): [True: 0, False: 56.3k]
  ------------------
   96|      0|      timeleft_ms = -1; /* 0 is "no limit", fake 1 ms expiry */
   97|  56.3k|  }
   98|       |
   99|  56.3k|  if(!ctimeleft_ms)
  ------------------
  |  Branch (99:6): [True: 4.26k, False: 52.0k]
  ------------------
  100|  4.26k|    return timeleft_ms;
  101|  52.0k|  else if(!timeleft_ms)
  ------------------
  |  Branch (101:11): [True: 0, False: 52.0k]
  ------------------
  102|      0|    return ctimeleft_ms;
  103|  52.0k|  return CURLMIN(ctimeleft_ms, timeleft_ms);
  ------------------
  |  | 1292|  52.0k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1292:24): [True: 277, False: 51.7k]
  |  |  ------------------
  ------------------
  104|  56.3k|}
Curl_timeleft_ms:
  107|  56.3k|{
  108|  56.3k|  return timeleft_now_ms(data, Curl_pgrs_now(data));
  109|  56.3k|}
Curl_shutdown_start:
  113|    434|{
  114|    434|  struct connectdata *conn = data->conn;
  115|       |
  116|    434|  DEBUGASSERT(conn);
  ------------------
  |  | 1077|    434|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (116:3): [True: 0, False: 434]
  |  Branch (116:3): [True: 434, False: 0]
  ------------------
  117|    434|  conn->shutdown.start[sockindex] = *Curl_pgrs_now(data);
  118|    434|  conn->shutdown.timeout_ms = (timeout_ms > 0) ?
  ------------------
  |  Branch (118:31): [True: 0, False: 434]
  ------------------
  119|      0|    (timediff_t)timeout_ms :
  120|    434|    ((data->set.shutdowntimeout > 0) ?
  ------------------
  |  Branch (120:6): [True: 0, False: 434]
  ------------------
  121|    434|     data->set.shutdowntimeout : DEFAULT_SHUTDOWN_TIMEOUT_MS);
  ------------------
  |  |   42|    434|#define DEFAULT_SHUTDOWN_TIMEOUT_MS   (2 * 1000)
  ------------------
  122|       |  /* Set a timer, unless we operate on the admin handle */
  123|    434|  if(data->mid)
  ------------------
  |  Branch (123:6): [True: 0, False: 434]
  ------------------
  124|      0|    Curl_expire_ex(data, conn->shutdown.timeout_ms, EXPIRE_SHUTDOWN);
  125|    434|  CURL_TRC_M(data, "shutdown start on%s connection",
  ------------------
  |  |  148|    434|  do {                                   \
  |  |  149|    434|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|    434|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    434|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|    868|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 434, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 434]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|    868|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((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|    434|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|    434|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|    434|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 434]
  |  |  ------------------
  ------------------
  126|    434|             sockindex ? " secondary" : "");
  127|    434|}
Curl_shutdown_timeleft:
  132|    434|{
  133|    434|  timediff_t left_ms;
  134|       |
  135|    434|  if(!conn->shutdown.start[sockindex].tv_sec ||
  ------------------
  |  Branch (135:6): [True: 0, False: 434]
  ------------------
  136|    434|     (conn->shutdown.timeout_ms <= 0))
  ------------------
  |  Branch (136:6): [True: 0, False: 434]
  ------------------
  137|      0|    return 0; /* not started or no limits */
  138|       |
  139|    434|  left_ms = conn->shutdown.timeout_ms -
  140|    434|            curlx_ptimediff_ms(Curl_pgrs_now(data),
  141|    434|                               &conn->shutdown.start[sockindex]);
  142|    434|  return left_ms ? left_ms : -1;
  ------------------
  |  Branch (142:10): [True: 434, False: 0]
  ------------------
  143|    434|}
Curl_shutdown_started:
  168|  58.5k|{
  169|  58.5k|  if(data->conn) {
  ------------------
  |  Branch (169:6): [True: 47.0k, False: 11.4k]
  ------------------
  170|  47.0k|    struct curltime *pt = &data->conn->shutdown.start[sockindex];
  171|  47.0k|    return (pt->tv_sec > 0) || (pt->tv_usec > 0);
  ------------------
  |  Branch (171:12): [True: 434, False: 46.6k]
  |  Branch (171:32): [True: 0, False: 46.6k]
  ------------------
  172|  47.0k|  }
  173|  11.4k|  return FALSE;
  ------------------
  |  | 1054|  11.4k|#define FALSE false
  ------------------
  174|  58.5k|}
Curl_getconnectinfo:
  184|      9|{
  185|      9|  DEBUGASSERT(data);
  ------------------
  |  | 1077|      9|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (185:3): [True: 0, False: 9]
  |  Branch (185:3): [True: 9, False: 0]
  ------------------
  186|       |
  187|       |  /* this works for an easy handle:
  188|       |   * - that has been used for curl_easy_perform()
  189|       |   * - that is associated with a multi handle, and whose connection
  190|       |   *   was detached with CURLOPT_CONNECT_ONLY
  191|       |   */
  192|      9|  if(data->state.lastconnect_id != -1) {
  ------------------
  |  Branch (192:6): [True: 2, False: 7]
  ------------------
  193|      2|    struct connectdata *conn;
  194|       |
  195|      2|    conn = Curl_cpool_get_conn(data, data->state.lastconnect_id);
  196|      2|    if(!conn) {
  ------------------
  |  Branch (196:8): [True: 0, False: 2]
  ------------------
  197|      0|      data->state.lastconnect_id = -1;
  198|      0|      return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  199|      0|    }
  200|       |
  201|      2|    if(connp)
  ------------------
  |  Branch (201:8): [True: 2, False: 0]
  ------------------
  202|       |      /* only store this if the caller cares for it */
  203|      2|      *connp = conn;
  204|      2|    return conn->sock[FIRSTSOCKET];
  ------------------
  |  |  245|      2|#define FIRSTSOCKET     0
  ------------------
  205|      2|  }
  206|      7|  return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      7|#define CURL_SOCKET_BAD (-1)
  ------------------
  207|      9|}
Curl_conncontrol:
  218|  8.77k|{
  219|       |  /* close if a connection, or a stream that is not multiplexed. */
  220|       |  /* This function will be called both before and after this connection is
  221|       |     associated with a transfer. */
  222|  8.77k|  bool closeit, is_multiplex;
  223|  8.77k|  DEBUGASSERT(conn);
  ------------------
  |  | 1077|  8.77k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (223:3): [True: 0, False: 8.77k]
  |  Branch (223:3): [True: 8.77k, False: 0]
  ------------------
  224|  8.77k|#if defined(DEBUGBUILD) && defined(CURLVERBOSE)
  225|  8.77k|  (void)reason; /* useful for debugging */
  226|  8.77k|#endif
  227|  8.77k|  is_multiplex = Curl_conn_is_multiplex(conn, FIRSTSOCKET);
  ------------------
  |  |  245|  8.77k|#define FIRSTSOCKET     0
  ------------------
  228|  8.77k|  closeit = (ctrl == CONNCTRL_CONNECTION) ||
  ------------------
  |  |   85|  8.77k|#define CONNCTRL_CONNECTION 1
  ------------------
  |  Branch (228:13): [True: 7.93k, False: 846]
  ------------------
  229|    846|            ((ctrl == CONNCTRL_STREAM) && !is_multiplex);
  ------------------
  |  |   86|    846|#define CONNCTRL_STREAM     2
  ------------------
  |  Branch (229:14): [True: 846, False: 0]
  |  Branch (229:43): [True: 846, False: 0]
  ------------------
  230|  8.77k|  if((ctrl == CONNCTRL_STREAM) && is_multiplex)
  ------------------
  |  |   86|  8.77k|#define CONNCTRL_STREAM     2
  ------------------
  |  Branch (230:6): [True: 846, False: 7.93k]
  |  Branch (230:35): [True: 0, False: 846]
  ------------------
  231|      0|    ;  /* stream signal on multiplex conn never affects close state */
  232|  8.77k|  else if((curl_bit)closeit != conn->bits.close) {
  ------------------
  |  Branch (232:11): [True: 7.93k, False: 846]
  ------------------
  233|  7.93k|    conn->bits.close = closeit; /* the only place in the source code that
  234|       |                                   should assign this bit */
  235|  7.93k|  }
  236|  8.77k|}
Curl_conn_setup:
  242|  7.93k|{
  243|  7.93k|  CURLcode result = CURLE_OK;
  244|  7.93k|  struct Curl_peer *peer = Curl_conn_get_first_peer(conn, sockindex);
  245|  7.93k|  uint8_t dns_queries;
  246|       |
  247|  7.93k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  7.93k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (247:3): [True: 0, False: 7.93k]
  |  Branch (247:3): [True: 7.93k, False: 0]
  ------------------
  248|  7.93k|  DEBUGASSERT(conn->scheme);
  ------------------
  |  | 1077|  7.93k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (248:3): [True: 0, False: 7.93k]
  |  Branch (248:3): [True: 7.93k, False: 0]
  ------------------
  249|  7.93k|  DEBUGASSERT(!conn->cfilter[sockindex]);
  ------------------
  |  | 1077|  7.93k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (249:3): [True: 0, False: 7.93k]
  |  Branch (249:3): [True: 7.93k, False: 0]
  ------------------
  250|       |
  251|  7.93k|  if(!peer)
  ------------------
  |  Branch (251:6): [True: 0, False: 7.93k]
  ------------------
  252|      0|    return CURLE_FAILED_INIT;
  253|       |
  254|  7.93k|#ifndef CURL_DISABLE_HTTP
  255|  7.93k|  if(!conn->cfilter[sockindex] &&
  ------------------
  |  Branch (255:6): [True: 7.93k, False: 0]
  ------------------
  256|  7.93k|     conn->scheme->protocol == CURLPROTO_HTTPS) {
  ------------------
  |  | 1079|  7.93k|#define CURLPROTO_HTTPS   (1L << 1)
  ------------------
  |  Branch (256:6): [True: 240, False: 7.69k]
  ------------------
  257|    240|    DEBUGASSERT(ssl_mode != CURL_CF_SSL_DISABLE);
  ------------------
  |  | 1077|    240|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (257:5): [True: 0, False: 240]
  |  Branch (257:5): [True: 240, False: 0]
  ------------------
  258|    240|    result = Curl_cf_https_setup(data, conn, sockindex);
  259|    240|    if(result)
  ------------------
  |  Branch (259:8): [True: 0, False: 240]
  ------------------
  260|      0|      goto out;
  261|    240|  }
  262|  7.93k|#endif /* !CURL_DISABLE_HTTP */
  263|       |
  264|       |  /* Still no cfilter set, apply default. */
  265|  7.93k|  if(!conn->cfilter[sockindex]) {
  ------------------
  |  Branch (265:6): [True: 7.69k, False: 240]
  ------------------
  266|  7.69k|    result = Curl_cf_setup_add(data, conn, sockindex,
  267|  7.69k|                               conn->transport_wanted, ssl_mode);
  268|  7.69k|    if(result)
  ------------------
  |  Branch (268:8): [True: 0, False: 7.69k]
  ------------------
  269|      0|      goto out;
  270|  7.69k|  }
  271|       |
  272|  7.93k|  dns_queries = Curl_resolv_dns_queries(data, conn->ip_version);
  273|       |#ifdef USE_HTTPSRR
  274|       |  if(sockindex == FIRSTSOCKET)
  275|       |    dns_queries |= CURL_DNSQ_HTTPS;
  276|       |#endif
  277|  7.93k|  result = Curl_cf_dns_add(data, conn, sockindex, peer, dns_queries,
  278|  7.93k|                           conn->transport_wanted);
  279|  7.93k|  DEBUGASSERT(conn->cfilter[sockindex]);
  ------------------
  |  | 1077|  7.93k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (279:3): [True: 0, False: 7.93k]
  |  Branch (279:3): [True: 7.93k, False: 0]
  ------------------
  280|  7.93k|out:
  281|  7.93k|  return result;
  282|  7.93k|}
Curl_conn_connect:
  333|  8.67k|{
  334|  8.67k|#define CF_CONN_NUM_POLLS_ON_STACK 5
  335|  8.67k|  struct pollfd a_few_on_stack[CF_CONN_NUM_POLLS_ON_STACK];
  336|  8.67k|  struct easy_pollset ps;
  337|  8.67k|  struct curl_pollfds cpfds;
  338|  8.67k|  struct Curl_cfilter *cf;
  339|  8.67k|  CURLcode result = CURLE_OK;
  340|       |
  341|  8.67k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  8.67k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (341:3): [True: 0, False: 8.67k]
  |  Branch (341:3): [True: 8.67k, False: 0]
  ------------------
  342|  8.67k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1077|  8.67k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (342:3): [True: 0, False: 8.67k]
  |  Branch (342:3): [True: 8.67k, False: 0]
  ------------------
  343|  8.67k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  322|  8.67k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (322:36): [True: 8.67k, False: 0]
  |  |  |  Branch (322:50): [True: 8.67k, False: 0]
  |  |  ------------------
  ------------------
  344|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  345|       |
  346|  8.67k|  if(data->conn->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  215|  8.67k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (346:6): [True: 0, False: 8.67k]
  ------------------
  347|      0|    *done = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  348|      0|    return CURLE_OK;
  349|      0|  }
  350|       |
  351|  8.67k|  cf = data->conn->cfilter[sockindex];
  352|  8.67k|  if(!cf) {
  ------------------
  |  Branch (352:6): [True: 0, False: 8.67k]
  ------------------
  353|      0|    *done = FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  354|      0|    return CURLE_FAILED_INIT;
  355|      0|  }
  356|       |
  357|  8.67k|  *done = (bool)cf->connected;
  358|  8.67k|  if(*done)
  ------------------
  |  Branch (358:6): [True: 0, False: 8.67k]
  ------------------
  359|      0|    return CURLE_OK;
  360|       |
  361|  8.67k|  Curl_pollset_init(&ps);
  362|  8.67k|  Curl_pollfds_init(&cpfds, a_few_on_stack, CF_CONN_NUM_POLLS_ON_STACK);
  ------------------
  |  |  334|  8.67k|#define CF_CONN_NUM_POLLS_ON_STACK 5
  ------------------
  363|  8.67k|  while(!*done) {
  ------------------
  |  Branch (363:9): [True: 8.67k, False: 0]
  ------------------
  364|  8.67k|    if(Curl_conn_needs_flush(data, sockindex)) {
  ------------------
  |  Branch (364:8): [True: 0, False: 8.67k]
  ------------------
  365|      0|      DEBUGF(infof(data, "Curl_conn_connect(index=%d), flush", sockindex));
  ------------------
  |  | 1063|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  366|      0|      result = Curl_conn_flush(data, sockindex);
  367|      0|      if(result && (result != CURLE_AGAIN))
  ------------------
  |  Branch (367:10): [True: 0, False: 0]
  |  Branch (367:20): [True: 0, False: 0]
  ------------------
  368|      0|        goto out;
  369|      0|    }
  370|       |
  371|  8.67k|    result = cf->cft->do_connect(cf, data, done);
  372|  8.67k|    CURL_TRC_CF(data, cf, "Curl_conn_connect(block=%d) -> %d, done=%d",
  ------------------
  |  |  153|  8.67k|  do {                                          \
  |  |  154|  8.67k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  8.67k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  17.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 8.67k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 8.67k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  17.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|  8.67k|   (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.67k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  8.67k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 8.67k]
  |  |  ------------------
  ------------------
  373|  8.67k|                blocking, (int)result, *done);
  374|  8.67k|    if(!result && *done) {
  ------------------
  |  Branch (374:8): [True: 4.59k, False: 4.07k]
  |  Branch (374:19): [True: 3.40k, False: 1.18k]
  ------------------
  375|       |      /* A final sanity check on connection security */
  376|  3.40k|      if((data->state.origin->scheme->flags & PROTOPT_SSL) &&
  ------------------
  |  |  207|  3.40k|#define PROTOPT_SSL (1 << 0)       /* uses SSL */
  ------------------
  |  Branch (376:10): [True: 0, False: 3.40k]
  ------------------
  377|      0|         (sockindex == FIRSTSOCKET) &&
  ------------------
  |  |  245|      0|#define FIRSTSOCKET     0
  ------------------
  |  Branch (377:10): [True: 0, False: 0]
  ------------------
  378|      0|         !Curl_conn_is_ssl(data->conn, FIRSTSOCKET)) {
  ------------------
  |  |  245|      0|#define FIRSTSOCKET     0
  ------------------
  |  Branch (378:10): [True: 0, False: 0]
  ------------------
  379|      0|        DEBUGASSERT(0);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (379:9): [Folded, False: 0]
  |  Branch (379:9): [Folded, False: 0]
  ------------------
  380|      0|        failf(data, "transfer requires SSL, but not connected via SSL");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  381|      0|        result = CURLE_FAILED_INIT;
  382|      0|        goto out;
  383|      0|      }
  384|       |      /* Now that the complete filter chain is connected, let all filters
  385|       |       * persist information at the connection. E.g. cf-socket sets the
  386|       |       * socket and ip related information. */
  387|  3.40k|      Curl_conn_cntrl_update_info(data, data->conn);
  388|  3.40k|      conn_report_connect_stats(cf, data);
  389|  3.40k|      data->conn->keepalive = *Curl_pgrs_now(data);
  390|  3.40k|      VERBOSE(result = conn_connect_trace(data, cf));
  ------------------
  |  | 1623|  3.40k|#define VERBOSE(x) x
  ------------------
  391|  3.40k|      VERBOSE(Curl_conn_trc_filters(data, sockindex, "connected"));
  ------------------
  |  | 1623|  3.40k|#define VERBOSE(x) x
  ------------------
  392|  3.40k|      Curl_conn_remove_setup_filters(data, sockindex);
  393|  3.40k|      VERBOSE(Curl_conn_trc_filters(data, sockindex, "reduced to"));
  ------------------
  |  | 1623|  3.40k|#define VERBOSE(x) x
  ------------------
  394|  3.40k|      goto out;
  395|  3.40k|    }
  396|  5.26k|    else if(result) {
  ------------------
  |  Branch (396:13): [True: 4.07k, False: 1.18k]
  ------------------
  397|  4.07k|      CURL_TRC_CF(data, cf, "Curl_conn_connect(), filter returned %d",
  ------------------
  |  |  153|  4.07k|  do {                                          \
  |  |  154|  4.07k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  4.07k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  8.15k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 4.07k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.07k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  8.15k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((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.07k|   (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.07k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  4.07k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 4.07k]
  |  |  ------------------
  ------------------
  398|  4.07k|                  (int)result);
  399|  4.07k|      VERBOSE(Curl_conn_trc_filters(data, sockindex, "failed to connect"));
  ------------------
  |  | 1623|  4.07k|#define VERBOSE(x) x
  ------------------
  400|  4.07k|      conn_report_connect_stats(cf, data);
  401|  4.07k|      goto out;
  402|  4.07k|    }
  403|       |
  404|  1.18k|    if(!blocking)
  ------------------
  |  Branch (404:8): [True: 1.18k, False: 0]
  ------------------
  405|  1.18k|      goto out;
  406|      0|    else {
  407|       |      /* check allowed time left */
  408|      0|      const timediff_t timeout_ms = Curl_timeleft_ms(data);
  409|      0|      curl_socket_t sockfd = Curl_conn_cf_get_socket(cf, data);
  410|      0|      int rc;
  411|       |
  412|      0|      if(timeout_ms < 0) {
  ------------------
  |  Branch (412:10): [True: 0, False: 0]
  ------------------
  413|       |        /* no need to continue if time already is up */
  414|      0|        failf(data, "connect timeout");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  415|      0|        result = CURLE_OPERATION_TIMEDOUT;
  416|      0|        goto out;
  417|      0|      }
  418|       |
  419|      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]
  |  |  ------------------
  ------------------
  420|      0|      Curl_pollset_reset(&ps);
  421|      0|      Curl_pollfds_reset(&cpfds);
  422|       |      /* In general, we want to send after connect, wait on that. */
  423|      0|      if(sockfd != CURL_SOCKET_BAD)
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (423:10): [True: 0, False: 0]
  ------------------
  424|      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
  |  |  ------------------
  ------------------
  425|      0|      if(!result)
  ------------------
  |  Branch (425:10): [True: 0, False: 0]
  ------------------
  426|      0|        result = Curl_conn_adjust_pollset(data, data->conn, &ps);
  427|      0|      if(result)
  ------------------
  |  Branch (427:10): [True: 0, False: 0]
  ------------------
  428|      0|        goto out;
  429|      0|      result = Curl_pollfds_add_ps(&cpfds, &ps);
  430|      0|      if(result)
  ------------------
  |  Branch (430:10): [True: 0, False: 0]
  ------------------
  431|      0|        goto out;
  432|       |
  433|      0|      rc = Curl_poll(cpfds.pfds, cpfds.n,
  434|      0|                     CURLMIN(timeout_ms, (cpfds.n ? 1000 : 10)));
  ------------------
  |  | 1292|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1292:24): [True: 0, False: 0]
  |  |  |  Branch (1292:31): [True: 0, False: 0]
  |  |  |  Branch (1292:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  435|      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]
  |  |  ------------------
  ------------------
  436|      0|                  rc);
  437|      0|      if(rc < 0) {
  ------------------
  |  Branch (437:10): [True: 0, False: 0]
  ------------------
  438|      0|        result = CURLE_COULDNT_CONNECT;
  439|      0|        goto out;
  440|      0|      }
  441|       |      /* continue iterating */
  442|      0|    }
  443|  1.18k|  }
  444|       |
  445|  8.67k|out:
  446|  8.67k|  Curl_pollset_cleanup(&ps);
  447|  8.67k|  Curl_pollfds_cleanup(&cpfds);
  448|  8.67k|  return result;
  449|  8.67k|}
Curl_conn_get_origin:
  463|  2.01k|{
  464|  2.01k|  return (sockindex == SECONDARYSOCKET) ?
  ------------------
  |  |  246|  2.01k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (464:10): [True: 0, False: 2.01k]
  ------------------
  465|  2.01k|    conn->origin2 : conn->origin;
  466|  2.01k|}
Curl_conn_get_destination:
  470|  13.6k|{
  471|  13.6k|  return (sockindex == SECONDARYSOCKET) ?
  ------------------
  |  |  246|  13.6k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (471:10): [True: 0, False: 13.6k]
  ------------------
  472|      0|    (conn->via_peer2 ? conn->via_peer2 : conn->origin2) :
  ------------------
  |  Branch (472:6): [True: 0, False: 0]
  ------------------
  473|  13.6k|    (conn->via_peer ? conn->via_peer : conn->origin);
  ------------------
  |  Branch (473:6): [True: 13.1k, False: 425]
  ------------------
  474|  13.6k|}
Curl_conn_get_first_peer:
  478|  23.6k|{
  479|  23.6k|#ifndef CURL_DISABLE_PROXY
  480|  23.6k|  if(conn->socks_proxy.peer)
  ------------------
  |  Branch (480:6): [True: 670, False: 22.9k]
  ------------------
  481|    670|    return conn->socks_proxy.peer;
  482|  22.9k|  if(conn->http_proxy.peer)
  ------------------
  |  Branch (482:6): [True: 5.53k, False: 17.4k]
  ------------------
  483|  5.53k|    return conn->http_proxy.peer;
  484|  17.4k|#endif
  485|  17.4k|  return (sockindex == SECONDARYSOCKET) ?
  ------------------
  |  |  246|  17.4k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (485:10): [True: 0, False: 17.4k]
  ------------------
  486|      0|    (conn->via_peer2 ? conn->via_peer2 : conn->origin2) :
  ------------------
  |  Branch (486:6): [True: 0, False: 0]
  ------------------
  487|  17.4k|    (conn->via_peer ? conn->via_peer : conn->origin);
  ------------------
  |  Branch (487:6): [True: 16.6k, False: 821]
  ------------------
  488|  22.9k|}
connect.c:conn_report_connect_stats:
  312|  7.48k|{
  313|  7.48k|  if(cf) {
  ------------------
  |  Branch (313:6): [True: 7.48k, False: 0]
  ------------------
  314|  7.48k|    struct curltime connected;
  315|  7.48k|    struct curltime appconnected;
  316|       |
  317|  7.48k|    memset(&connected, 0, sizeof(connected));
  318|  7.48k|    cf->cft->query(cf, data, CF_QUERY_TIMER_CONNECT, NULL, &connected);
  ------------------
  |  |  164|  7.48k|#define CF_QUERY_TIMER_CONNECT      4  /* -          struct curltime */
  ------------------
  319|  7.48k|    if(connected.tv_sec || connected.tv_usec)
  ------------------
  |  Branch (319:8): [True: 7.16k, False: 324]
  |  Branch (319:28): [True: 0, False: 324]
  ------------------
  320|  7.16k|      Curl_pgrsTimeWas(data, TIMER_CONNECT, connected);
  321|       |
  322|  7.48k|    memset(&appconnected, 0, sizeof(appconnected));
  323|  7.48k|    cf->cft->query(cf, data, CF_QUERY_TIMER_APPCONNECT, NULL, &appconnected);
  ------------------
  |  |  165|  7.48k|#define CF_QUERY_TIMER_APPCONNECT   5  /* -          struct curltime */
  ------------------
  324|  7.48k|    if(appconnected.tv_sec || appconnected.tv_usec)
  ------------------
  |  Branch (324:8): [True: 0, False: 7.48k]
  |  Branch (324:31): [True: 0, False: 7.48k]
  ------------------
  325|      0|      Curl_pgrsTimeWas(data, TIMER_APPCONNECT, appconnected);
  326|  7.48k|  }
  327|  7.48k|}
connect.c:conn_connect_trace:
  287|  3.40k|{
  288|  3.40k|  if(Curl_trc_is_verbose(data)) {
  ------------------
  |  |  319|  3.40k|  ((data) && (data)->set.verbose &&                        \
  |  |  ------------------
  |  |  |  Branch (319:4): [True: 3.40k, False: 0]
  |  |  |  Branch (319:14): [True: 0, False: 3.40k]
  |  |  ------------------
  |  |  320|  3.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]
  |  |  ------------------
  ------------------
  289|      0|    struct ip_quadruple ipquad;
  290|      0|    bool is_ipv6;
  291|      0|    CURLcode result;
  292|       |
  293|      0|    result = Curl_conn_cf_get_ip_info(cf, data, &is_ipv6, &ipquad);
  294|      0|    if(result)
  ------------------
  |  Branch (294:8): [True: 0, False: 0]
  ------------------
  295|      0|      return result;
  296|       |
  297|      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]
  |  |  ------------------
  ------------------
  298|      0|          (cf->sockindex == SECONDARYSOCKET) ? "2nd " : "",
  299|      0|          CURL_CONN_HOST_DISPNAME(data->conn),
  300|      0|          ipquad.remote_ip, ipquad.remote_port,
  301|      0|          ipquad.local_ip, ipquad.local_port);
  302|      0|  }
  303|  3.40k|  return CURLE_OK;
  304|  3.40k|}

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

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

Curl_creds_create:
   41|  10.5k|{
   42|  10.5k|  struct Curl_creds *creds = NULL;
   43|  10.5k|  size_t ulen = user ? strlen(user) : 0;
  ------------------
  |  Branch (43:17): [True: 1.90k, False: 8.68k]
  ------------------
   44|  10.5k|  size_t plen = passwd ? strlen(passwd) : 0;
  ------------------
  |  Branch (44:17): [True: 423, False: 10.1k]
  ------------------
   45|  10.5k|  size_t olen = oauth_bearer ? strlen(oauth_bearer) : 0;
  ------------------
  |  Branch (45:17): [True: 31, False: 10.5k]
  ------------------
   46|  10.5k|  size_t salen = sasl_authzid ? strlen(sasl_authzid) : 0;
  ------------------
  |  Branch (46:18): [True: 34, False: 10.5k]
  ------------------
   47|  10.5k|  size_t sslen = sasl_service ? strlen(sasl_service) : 0;
  ------------------
  |  Branch (47:18): [True: 53, False: 10.5k]
  ------------------
   48|  10.5k|  char *s, *buf;
   49|  10.5k|  CURLcode result = CURLE_OK;
   50|       |
   51|  10.5k|  Curl_creds_unlink(pcreds);
   52|       |
   53|       |  /* Everything empty/NULL, this is the NULL credential */
   54|  10.5k|  if(!user && !passwd && !olen && !salen && !sslen)
  ------------------
  |  Branch (54:6): [True: 8.68k, False: 1.90k]
  |  Branch (54:15): [True: 8.67k, False: 14]
  |  Branch (54:26): [True: 8.67k, False: 2]
  |  Branch (54:35): [True: 8.66k, False: 7]
  |  Branch (54:45): [True: 8.65k, False: 5]
  ------------------
   55|  8.65k|    goto out;
   56|       |
   57|  1.93k|  if((ulen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|  1.93k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (57:6): [True: 0, False: 1.93k]
  ------------------
   58|  1.93k|     (plen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|  1.93k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (58:6): [True: 0, False: 1.93k]
  ------------------
   59|  1.93k|     (olen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|  1.93k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (59:6): [True: 0, False: 1.93k]
  ------------------
   60|  1.93k|     (salen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|  1.93k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (60:6): [True: 0, False: 1.93k]
  ------------------
   61|  1.93k|     (sslen > CURL_MAX_INPUT_LENGTH)) {
  ------------------
  |  |   45|  1.93k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (61:6): [True: 0, False: 1.93k]
  ------------------
   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.93k|  creds = curlx_calloc(1, sizeof(*creds) +
  ------------------
  |  | 1485|  1.93k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   68|  1.93k|                       ulen + plen + 1 + olen + 1 + salen + 1 + sslen + 1);
   69|  1.93k|  if(!creds) {
  ------------------
  |  Branch (69:6): [True: 0, False: 1.93k]
  ------------------
   70|      0|    result = CURLE_OUT_OF_MEMORY;
   71|      0|    goto out;
   72|      0|  }
   73|       |
   74|  1.93k|  creds->refcount = 1;
   75|  1.93k|  creds->source = source;
   76|       |  /* Some compilers try to be too smart about our dynamic struct size */
   77|  1.93k|  buf = ((char *)creds) + offsetof(struct Curl_creds, buf);
   78|  1.93k|  creds->user = s = buf;
   79|  1.93k|  if(ulen)
  ------------------
  |  Branch (79:6): [True: 1.50k, False: 434]
  ------------------
   80|  1.50k|    memcpy(s, user, ulen + 1);
   81|  1.93k|  creds->passwd = s = buf + ulen + 1;
   82|  1.93k|  if(plen)
  ------------------
  |  Branch (82:6): [True: 308, False: 1.62k]
  ------------------
   83|    308|    memcpy(s, passwd, plen + 1);
   84|  1.93k|  creds->oauth_bearer = s = buf + ulen + 1 + plen + 1;
   85|  1.93k|  if(olen)
  ------------------
  |  Branch (85:6): [True: 6, False: 1.92k]
  ------------------
   86|      6|    memcpy(s, oauth_bearer, olen + 1);
   87|  1.93k|  creds->sasl_authzid = s = buf + ulen + 1 + plen + 1 + olen + 1;
   88|  1.93k|  if(salen)
  ------------------
  |  Branch (88:6): [True: 15, False: 1.92k]
  ------------------
   89|     15|    memcpy(s, sasl_authzid, salen + 1);
   90|  1.93k|  creds->sasl_service = s = buf + ulen + 1 + plen + 1 + olen + 1 + salen + 1;
   91|  1.93k|  if(sslen)
  ------------------
  |  Branch (91:6): [True: 27, False: 1.90k]
  ------------------
   92|     27|    memcpy(s, sasl_service, sslen + 1);
   93|       |
   94|  10.5k|out:
   95|  10.5k|  if(!result)
  ------------------
  |  Branch (95:6): [True: 10.5k, False: 0]
  ------------------
   96|  10.5k|    *pcreds = creds;
   97|      0|  else
   98|      0|    Curl_creds_unlink(&creds);
   99|  10.5k|  return result;
  100|  1.93k|}
Curl_creds_merge:
  107|  8.79k|{
  108|  8.79k|  struct Curl_creds *creds_out = NULL;
  109|  8.79k|  CURLcode result;
  110|       |
  111|  8.79k|  if(!creds_in) {
  ------------------
  |  Branch (111:6): [True: 8.76k, False: 26]
  ------------------
  112|  8.76k|    result = Curl_creds_create(user, passwd, NULL, NULL, NULL,
  113|  8.76k|                               source, &creds_out);
  114|  8.76k|  }
  115|     26|  else {
  116|     26|    result = Curl_creds_create(user ? user : Curl_creds_user(creds_in),
  ------------------
  |  |   80|     23|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (80:43): [True: 23, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (116:32): [True: 3, False: 23]
  ------------------
  117|     26|                               passwd ? passwd : Curl_creds_passwd(creds_in),
  ------------------
  |  |   81|     25|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (81:43): [True: 25, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (117:32): [True: 1, False: 25]
  ------------------
  118|     26|                               Curl_creds_oauth_bearer(creds_in),
  ------------------
  |  |   82|     26|#define Curl_creds_oauth_bearer(c)       ((c) ? (c)->oauth_bearer : "")
  |  |  ------------------
  |  |  |  Branch (82:43): [True: 26, False: 0]
  |  |  ------------------
  ------------------
  119|     26|                               Curl_creds_sasl_authzid(creds_in),
  ------------------
  |  |   83|     26|#define Curl_creds_sasl_authzid(c)       ((c) ? (c)->sasl_authzid : "")
  |  |  ------------------
  |  |  |  Branch (83:43): [True: 26, False: 0]
  |  |  ------------------
  ------------------
  120|     26|                               Curl_creds_sasl_service(creds_in),
  ------------------
  |  |   84|     26|#define Curl_creds_sasl_service(c)       ((c) ? (c)->sasl_service : "")
  |  |  ------------------
  |  |  |  Branch (84:43): [True: 26, False: 0]
  |  |  ------------------
  ------------------
  121|     26|                               source, &creds_out);
  122|     26|  }
  123|  8.79k|  Curl_creds_link(pcreds_out, creds_out);
  124|  8.79k|  Curl_creds_unlink(&creds_out);
  125|  8.79k|  return result;
  126|  8.79k|}
Curl_creds_link:
  129|  17.0k|{
  130|  17.0k|  if(*pdest != src) {
  ------------------
  |  Branch (130:6): [True: 651, False: 16.3k]
  ------------------
  131|    651|    Curl_creds_unlink(pdest);
  132|    651|    *pdest = src;
  133|    651|    if(src) {
  ------------------
  |  Branch (133:8): [True: 651, False: 0]
  ------------------
  134|    651|      DEBUGASSERT(src->refcount < UINT32_MAX);
  ------------------
  |  | 1077|    651|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (134:7): [True: 0, False: 651]
  |  Branch (134:7): [True: 651, False: 0]
  ------------------
  135|    651|      src->refcount++;
  136|    651|    }
  137|    651|  }
  138|  17.0k|}
Curl_creds_unlink:
  141|   154k|{
  142|   154k|  if(*pcreds) {
  ------------------
  |  Branch (142:6): [True: 2.58k, False: 152k]
  ------------------
  143|  2.58k|    struct Curl_creds *creds = *pcreds;
  144|       |
  145|  2.58k|    DEBUGASSERT(creds->refcount);
  ------------------
  |  | 1077|  2.58k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (145:5): [True: 0, False: 2.58k]
  |  Branch (145:5): [True: 2.58k, False: 0]
  ------------------
  146|  2.58k|    *pcreds = NULL;
  147|  2.58k|    if(creds->refcount)
  ------------------
  |  Branch (147:8): [True: 2.58k, False: 0]
  ------------------
  148|  2.58k|      creds->refcount--;
  149|  2.58k|    if(!creds->refcount) {
  ------------------
  |  Branch (149:8): [True: 1.93k, False: 651]
  ------------------
  150|  1.93k|      curlx_free(creds);
  ------------------
  |  | 1488|  1.93k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  151|  1.93k|    }
  152|  2.58k|  }
  153|   154k|}
Curl_creds_same:
  156|  8.94k|{
  157|  8.94k|  return (c1 == c2) ||
  ------------------
  |  Branch (157:10): [True: 8.65k, False: 291]
  ------------------
  158|    291|         (c1 && c2 &&
  ------------------
  |  Branch (158:11): [True: 4, False: 287]
  |  Branch (158:17): [True: 4, False: 0]
  ------------------
  159|      4|          !Curl_timestrcmp(c1->user, c2->user) &&
  ------------------
  |  Branch (159:11): [True: 4, False: 0]
  ------------------
  160|      4|          !Curl_timestrcmp(c1->passwd, c2->passwd) &&
  ------------------
  |  Branch (160:11): [True: 4, False: 0]
  ------------------
  161|      4|          !Curl_timestrcmp(c1->oauth_bearer, c2->oauth_bearer) &&
  ------------------
  |  Branch (161:11): [True: 4, False: 0]
  ------------------
  162|      4|          !Curl_timestrcmp(c1->sasl_authzid, c2->sasl_authzid) &&
  ------------------
  |  Branch (162:11): [True: 4, False: 0]
  ------------------
  163|      4|          !Curl_timestrcmp(c1->sasl_service, c2->sasl_service));
  ------------------
  |  Branch (163:11): [True: 4, False: 0]
  ------------------
  164|  8.94k|}
Curl_creds_equal:
  167|  8.94k|{
  168|  8.94k|  return Curl_creds_same(c1, c2) &&
  ------------------
  |  Branch (168:10): [True: 8.65k, False: 287]
  ------------------
  169|  8.65k|         ((c1 == c2) || (c1 && c2 && (c1->source == c2->source)));
  ------------------
  |  Branch (169:11): [True: 8.65k, False: 4]
  |  Branch (169:26): [True: 4, False: 0]
  |  Branch (169:32): [True: 4, False: 0]
  |  Branch (169:38): [True: 4, False: 0]
  ------------------
  170|  8.94k|}
Curl_creds_trace:
  175|  8.94k|{
  176|  8.94k|  if(creds) {
  ------------------
  |  Branch (176:6): [True: 4, False: 8.93k]
  ------------------
  177|      4|    CURL_TRC_M(data, "%s: user=%s, passwd=%s, "
  ------------------
  |  |  148|      4|  do {                                   \
  |  |  149|      4|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      4|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      4|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      8|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      8|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((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|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      4|      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|      4|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 4]
  |  |  ------------------
  ------------------
  178|      4|               "sasl_authzid=%s, oauth_bearer=%s, source=%d",
  179|      4|               msg,
  180|      4|               Curl_creds_user(creds),
  181|      4|               Curl_creds_has_passwd(creds) ? "***" : "",
  182|      4|               Curl_creds_sasl_authzid(creds),
  183|      4|               Curl_creds_has_oauth_bearer(creds) ? "***" : "",
  184|      4|               creds->source);
  185|      4|  }
  186|  8.93k|  else
  187|  8.93k|    CURL_TRC_M(data, "%s: -", msg);
  ------------------
  |  |  148|  8.93k|  do {                                   \
  |  |  149|  8.93k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  8.93k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  8.93k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  17.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 8.93k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 8.93k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  17.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|  8.93k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  8.93k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  8.93k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 8.93k]
  |  |  ------------------
  ------------------
  188|  8.94k|}

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

Curl_fopen:
   87|  35.2k|{
   88|  35.2k|  CURLcode result = CURLE_WRITE_ERROR;
   89|  35.2k|  unsigned char randbuf[41];
   90|  35.2k|  char *tempstore = NULL;
   91|  35.2k|#ifndef _WIN32
   92|  35.2k|  curlx_struct_stat sb;
  ------------------
  |  |   63|  35.2k|#define curlx_struct_stat       struct stat
  ------------------
   93|  35.2k|#endif
   94|  35.2k|  int fd = -1;
   95|  35.2k|  char *dir = NULL;
   96|  35.2k|  *tempname = NULL;
   97|       |
   98|  35.2k|#ifndef _WIN32
   99|  35.2k|  *fh = curlx_fopen(filename, FOPEN_WRITETEXT);
  ------------------
  |  |   74|  35.2k|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
  100|  35.2k|  if(!*fh)
  ------------------
  |  Branch (100:6): [True: 0, False: 35.2k]
  ------------------
  101|      0|    goto fail;
  102|  35.2k|  if(curlx_fstat(fileno(*fh), &sb) == -1 || !S_ISREG(sb.st_mode)) {
  ------------------
  |  |   62|  35.2k|#define curlx_fstat             fstat
  ------------------
  |  Branch (102:6): [True: 0, False: 35.2k]
  |  Branch (102:45): [True: 35.2k, False: 0]
  ------------------
  103|  35.2k|    return CURLE_OK;
  104|  35.2k|  }
  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);
  ------------------
  |  | 1488|      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);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  162|      0|  return result;
  163|      0|}

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

Curl_sasl_decode_mech:
   83|    167|{
   84|    167|  unsigned int i;
   85|    167|  char c;
   86|       |
   87|  1.97k|  for(i = 0; mechtable[i].name; i++) {
  ------------------
  |  Branch (87:14): [True: 1.81k, False: 163]
  ------------------
   88|  1.81k|    if(maxlen >= mechtable[i].len &&
  ------------------
  |  Branch (88:8): [True: 78, False: 1.73k]
  ------------------
   89|     78|       curl_strnequal(ptr, mechtable[i].name, mechtable[i].len)) {
  ------------------
  |  Branch (89:8): [True: 8, False: 70]
  ------------------
   90|      8|      if(len)
  ------------------
  |  Branch (90:10): [True: 8, False: 0]
  ------------------
   91|      8|        *len = mechtable[i].len;
   92|       |
   93|      8|      if(maxlen == mechtable[i].len)
  ------------------
  |  Branch (93:10): [True: 1, False: 7]
  ------------------
   94|      1|        return mechtable[i].bit;
   95|       |
   96|      7|      c = ptr[mechtable[i].len];
   97|      7|      if(!ISUPPER(c) && !ISDIGIT(c) && c != '-' && c != '_')
  ------------------
  |  |   42|     14|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 2, False: 5]
  |  |  |  Branch (42:38): [True: 1, False: 1]
  |  |  ------------------
  ------------------
                    if(!ISUPPER(c) && !ISDIGIT(c) && c != '-' && c != '_')
  ------------------
  |  |   44|     13|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 2, False: 4]
  |  |  |  Branch (44:38): [True: 1, False: 1]
  |  |  ------------------
  ------------------
  |  Branch (97:40): [True: 4, False: 1]
  |  Branch (97:52): [True: 3, False: 1]
  ------------------
   98|      3|        return mechtable[i].bit;
   99|      7|    }
  100|  1.81k|  }
  101|       |
  102|    163|  return 0;
  103|    167|}
Curl_sasl_init:
  144|  3.40k|{
  145|  3.40k|  unsigned long auth = data->set.httpauth;
  146|       |
  147|  3.40k|  sasl->params = params;           /* Set protocol dependent parameters */
  148|  3.40k|  sasl->state = SASL_STOP;         /* Not yet running */
  149|  3.40k|  sasl->curmech = NULL;            /* No mechanism yet. */
  150|  3.40k|  sasl->authmechs = SASL_AUTH_NONE; /* No known authentication mechanism yet */
  ------------------
  |  |   45|  3.40k|#define SASL_AUTH_NONE          0
  ------------------
  151|  3.40k|  sasl->prefmech = params->defmechs; /* Default preferred mechanisms */
  152|  3.40k|  sasl->authused = SASL_AUTH_NONE; /* The authentication mechanism used */
  ------------------
  |  |   45|  3.40k|#define SASL_AUTH_NONE          0
  ------------------
  153|  3.40k|  sasl->resetprefs = TRUE;         /* Reset prefmech upon AUTH parsing. */
  ------------------
  |  | 1051|  3.40k|#define TRUE true
  ------------------
  154|  3.40k|  sasl->mutual_auth = FALSE;       /* No mutual authentication (GSSAPI only) */
  ------------------
  |  | 1054|  3.40k|#define FALSE false
  ------------------
  155|  3.40k|  sasl->force_ir = FALSE;          /* Respect external option */
  ------------------
  |  | 1054|  3.40k|#define FALSE false
  ------------------
  156|       |
  157|  3.40k|  if(auth != CURLAUTH_BASIC) {
  ------------------
  |  |  831|  3.40k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  |  Branch (157:6): [True: 304, False: 3.10k]
  ------------------
  158|    304|    unsigned short mechs = SASL_AUTH_NONE;
  ------------------
  |  |   45|    304|#define SASL_AUTH_NONE          0
  ------------------
  159|       |
  160|       |    /* If some usable http authentication options have been set, determine
  161|       |       new defaults from them. */
  162|    304|    if(auth & CURLAUTH_BASIC)
  ------------------
  |  |  831|    304|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  |  Branch (162:8): [True: 194, False: 110]
  ------------------
  163|    194|      mechs |= SASL_MECH_PLAIN | SASL_MECH_LOGIN;
  ------------------
  |  |   33|    194|#define SASL_MECH_PLAIN             (1 << 1)
  ------------------
                    mechs |= SASL_MECH_PLAIN | SASL_MECH_LOGIN;
  ------------------
  |  |   32|    194|#define SASL_MECH_LOGIN             (1 << 0)
  ------------------
  164|    304|    if(auth & CURLAUTH_DIGEST)
  ------------------
  |  |  832|    304|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  |  Branch (164:8): [True: 187, False: 117]
  ------------------
  165|    187|      mechs |= SASL_MECH_DIGEST_MD5;
  ------------------
  |  |   35|    187|#define SASL_MECH_DIGEST_MD5        (1 << 3)
  ------------------
  166|    304|    if(auth & CURLAUTH_NTLM)
  ------------------
  |  |  838|    304|#define CURLAUTH_NTLM         (((unsigned long)1) << 3)
  ------------------
  |  Branch (166:8): [True: 0, False: 304]
  ------------------
  167|      0|      mechs |= SASL_MECH_NTLM;
  ------------------
  |  |   38|      0|#define SASL_MECH_NTLM              (1 << 6)
  ------------------
  168|    304|    if(auth & CURLAUTH_BEARER)
  ------------------
  |  |  844|    304|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  |  Branch (168:8): [True: 159, False: 145]
  ------------------
  169|    159|      mechs |= SASL_MECH_OAUTHBEARER | SASL_MECH_XOAUTH2;
  ------------------
  |  |   40|    159|#define SASL_MECH_OAUTHBEARER       (1 << 8)
  ------------------
                    mechs |= SASL_MECH_OAUTHBEARER | SASL_MECH_XOAUTH2;
  ------------------
  |  |   39|    159|#define SASL_MECH_XOAUTH2           (1 << 7)
  ------------------
  170|    304|    if(auth & CURLAUTH_GSSAPI)
  ------------------
  |  |  837|    304|#define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
  |  |  ------------------
  |  |  |  |  833|    304|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  |  |  ------------------
  ------------------
  |  Branch (170:8): [True: 0, False: 304]
  ------------------
  171|      0|      mechs |= SASL_MECH_GSSAPI;
  ------------------
  |  |   36|      0|#define SASL_MECH_GSSAPI            (1 << 4)
  ------------------
  172|       |
  173|    304|    if(mechs != SASL_AUTH_NONE)
  ------------------
  |  |   45|    304|#define SASL_AUTH_NONE          0
  ------------------
  |  Branch (173:8): [True: 283, False: 21]
  ------------------
  174|    283|      sasl->prefmech = mechs;
  175|    304|  }
  176|  3.40k|}
Curl_sasl_can_authenticate:
  275|      4|{
  276|       |  /* Have credentials been provided? */
  277|      4|  if(data->conn->creds)
  ------------------
  |  Branch (277:6): [True: 0, False: 4]
  ------------------
  278|      0|    return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  279|       |
  280|       |  /* EXTERNAL can authenticate without a username and/or password */
  281|      4|  if(sasl->authmechs & sasl->prefmech & SASL_MECH_EXTERNAL)
  ------------------
  |  |   37|      4|#define SASL_MECH_EXTERNAL          (1 << 5)
  ------------------
  |  Branch (281:6): [True: 0, False: 4]
  ------------------
  282|      0|    return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  283|       |
  284|      4|  return FALSE;
  ------------------
  |  | 1054|      4|#define FALSE false
  ------------------
  285|      4|}

Curl_share_lock:
  373|  58.1k|{
  374|  58.1k|  struct Curl_share *share = data->share;
  375|       |
  376|  58.1k|  if(!share)
  ------------------
  |  Branch (376:6): [True: 58.1k, False: 0]
  ------------------
  377|  58.1k|    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|  58.1k|}
Curl_share_unlock:
  389|  58.1k|{
  390|  58.1k|  struct Curl_share *share = data->share;
  391|       |
  392|  58.1k|  if(!share)
  ------------------
  |  Branch (392:6): [True: 58.1k, False: 0]
  ------------------
  393|  58.1k|    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|  58.1k|}
Curl_share_easy_unlink:
  404|  28.9k|{
  405|  28.9k|  struct Curl_share *share = data->share;
  406|       |
  407|  28.9k|  if(share) {
  ------------------
  |  Branch (407:6): [True: 0, False: 28.9k]
  ------------------
  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|  28.9k|  return CURLE_OK;
  431|  28.9k|}

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

Curl_debug:
  129|  1.85k|{
  130|  1.85k|  if(data->set.verbose) {
  ------------------
  |  Branch (130:6): [True: 0, False: 1.85k]
  ------------------
  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|      uint8_t 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);
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  143|      0|        Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1051|      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);
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  149|      0|        (void)(*data->set.fdebug)(data, type, CURL_UNCONST(ptr),
  ------------------
  |  |  862|      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|  1.85k|}
Curl_failf:
  179|  14.3k|{
  180|  14.3k|  DEBUGASSERT(!strchr(fmt, '\n'));
  ------------------
  |  | 1077|  14.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (180:3): [True: 0, False: 14.3k]
  |  Branch (180:3): [True: 14.3k, False: 0]
  ------------------
  181|  14.3k|  if(data->set.verbose || data->set.errorbuffer) {
  ------------------
  |  Branch (181:6): [True: 0, False: 14.3k]
  |  Branch (181:27): [True: 0, False: 14.3k]
  ------------------
  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 */
  ------------------
  |  | 1051|      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|  14.3k|}
Curl_reset_fail:
  200|  14.8k|{
  201|  14.8k|  if(data->set.errorbuffer)
  ------------------
  |  Branch (201:6): [True: 0, False: 14.8k]
  ------------------
  202|      0|    data->set.errorbuffer[0] = 0;
  203|       |  data->state.errorbuf = FALSE;
  ------------------
  |  | 1054|  14.8k|#define FALSE false
  ------------------
  204|  14.8k|}
Curl_trc_opt:
  670|      1|{
  671|      1|  CURLcode result = config ? trc_opt(config) : CURLE_OK;
  ------------------
  |  Branch (671:21): [True: 0, False: 1]
  ------------------
  672|      1|#ifdef DEBUGBUILD
  673|       |  /* CURL_DEBUG can override anything */
  674|      1|  if(!result) {
  ------------------
  |  Branch (674:6): [True: 1, False: 0]
  ------------------
  675|      1|    const char *dbg_config = getenv("CURL_DEBUG");
  676|      1|    if(dbg_config)
  ------------------
  |  Branch (676:8): [True: 0, False: 1]
  ------------------
  677|      0|      result = trc_opt(dbg_config);
  678|      1|  }
  679|      1|#endif /* DEBUGBUILD */
  680|      1|  return result;
  681|      1|}
Curl_trc_init:
  684|      1|{
  685|      1|#ifdef DEBUGBUILD
  686|      1|  return Curl_trc_opt(NULL);
  687|       |#else
  688|       |  return CURLE_OK;
  689|       |#endif
  690|      1|}

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

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

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

curlx_inet_pton:
  207|  34.6k|{
  208|  34.6k|  switch(af) {
  209|  29.0k|  case AF_INET:
  ------------------
  |  Branch (209:3): [True: 29.0k, False: 5.57k]
  ------------------
  210|  29.0k|    return inet_pton4(src, (unsigned char *)dst);
  211|  5.57k|  case AF_INET6:
  ------------------
  |  Branch (211:3): [True: 5.57k, False: 29.0k]
  ------------------
  212|  5.57k|    return inet_pton6(src, (unsigned char *)dst);
  213|      0|  default:
  ------------------
  |  Branch (213:3): [True: 0, False: 34.6k]
  ------------------
  214|      0|    errno = SOCKEAFNOSUPPORT;
  ------------------
  |  | 1120|      0|#define SOCKEAFNOSUPPORT  EAFNOSUPPORT
  ------------------
  215|      0|    return -1;
  216|  34.6k|  }
  217|       |  /* NOTREACHED */
  218|  34.6k|}
inet_pton.c:inet_pton4:
   63|  29.7k|{
   64|  29.7k|  int saw_digit, octets, ch;
   65|  29.7k|  unsigned char tmp[INADDRSZ], *tp;
   66|       |
   67|  29.7k|  saw_digit = 0;
   68|  29.7k|  octets = 0;
   69|  29.7k|  tp = tmp;
   70|  29.7k|  *tp = 0;
   71|   267k|  while((ch = (unsigned char)*src++) != '\0') {
  ------------------
  |  Branch (71:9): [True: 243k, False: 24.0k]
  ------------------
   72|   243k|    if(ISDIGIT(ch)) {
  ------------------
  |  |   44|   243k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 171k, False: 71.9k]
  |  |  |  Branch (44:38): [True: 167k, False: 4.07k]
  |  |  ------------------
  ------------------
   73|   167k|      unsigned int val = (*tp * 10) + (ch - '0');
   74|       |
   75|   167k|      if(saw_digit && *tp == 0)
  ------------------
  |  Branch (75:10): [True: 72.4k, False: 95.2k]
  |  Branch (75:23): [True: 103, False: 72.3k]
  ------------------
   76|    103|        return 0;
   77|   167k|      if(val > 255)
  ------------------
  |  Branch (77:10): [True: 408, False: 167k]
  ------------------
   78|    408|        return 0;
   79|   167k|      *tp = (unsigned char)val;
   80|   167k|      if(!saw_digit) {
  ------------------
  |  Branch (80:10): [True: 95.2k, False: 71.9k]
  ------------------
   81|  95.2k|        if(++octets > 4)
  ------------------
  |  Branch (81:12): [True: 0, False: 95.2k]
  ------------------
   82|      0|          return 0;
   83|  95.2k|        saw_digit = 1;
   84|  95.2k|      }
   85|   167k|    }
   86|  75.9k|    else if(ch == '.' && saw_digit) {
  ------------------
  |  Branch (86:13): [True: 71.5k, False: 4.40k]
  |  Branch (86:26): [True: 70.9k, False: 680]
  ------------------
   87|  70.9k|      if(octets == 4)
  ------------------
  |  Branch (87:10): [True: 59, False: 70.8k]
  ------------------
   88|     59|        return 0;
   89|  70.8k|      *++tp = 0;
   90|  70.8k|      saw_digit = 0;
   91|  70.8k|    }
   92|  5.08k|    else
   93|  5.08k|      return 0;
   94|   243k|  }
   95|  24.0k|  if(octets < 4)
  ------------------
  |  Branch (95:6): [True: 743, False: 23.3k]
  ------------------
   96|    743|    return 0;
   97|  23.3k|  memcpy(dst, tmp, INADDRSZ);
  ------------------
  |  |   36|  23.3k|#define INADDRSZ         4
  ------------------
   98|  23.3k|  return 1;
   99|  24.0k|}
inet_pton.c:inet_pton6:
  114|  5.57k|{
  115|  5.57k|  unsigned char tmp[IN6ADDRSZ], *tp, *endp, *colonp;
  116|  5.57k|  const char *curtok;
  117|  5.57k|  int ch, saw_xdigit;
  118|  5.57k|  size_t val;
  119|       |
  120|  5.57k|  memset((tp = tmp), 0, IN6ADDRSZ);
  ------------------
  |  |   35|  5.57k|#define IN6ADDRSZ       16
  ------------------
  121|  5.57k|  endp = tp + IN6ADDRSZ;
  ------------------
  |  |   35|  5.57k|#define IN6ADDRSZ       16
  ------------------
  122|  5.57k|  colonp = NULL;
  123|       |  /* Leading :: requires some special handling. */
  124|  5.57k|  if(*src == ':')
  ------------------
  |  Branch (124:6): [True: 733, False: 4.84k]
  ------------------
  125|    733|    if(*++src != ':')
  ------------------
  |  Branch (125:8): [True: 49, False: 684]
  ------------------
  126|     49|      return 0;
  127|  5.52k|  curtok = src;
  128|  5.52k|  saw_xdigit = 0;
  129|  5.52k|  val = 0;
  130|  12.4k|  while((ch = (unsigned char)*src++) != '\0') {
  ------------------
  |  Branch (130:9): [True: 10.0k, False: 2.39k]
  ------------------
  131|  10.0k|    if(ISXDIGIT(ch)) {
  ------------------
  |  |   39|  10.0k|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  20.0k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 9.05k, False: 968]
  |  |  |  |  |  Branch (44:38): [True: 2.78k, False: 6.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  17.2k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 2.29k, False: 4.94k]
  |  |  |  |  |  Branch (27:43): [True: 1.10k, False: 1.19k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  6.13k|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 3.38k, False: 2.75k]
  |  |  |  |  |  Branch (28:43): [True: 1.34k, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  132|  5.23k|      val <<= 4;
  133|  5.23k|      val |= curlx_hexval(ch);
  ------------------
  |  |  112|  5.23k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  134|  5.23k|      if(++saw_xdigit > 4)
  ------------------
  |  Branch (134:10): [True: 76, False: 5.15k]
  ------------------
  135|     76|        return 0;
  136|  5.15k|      continue;
  137|  5.23k|    }
  138|  4.79k|    if(ch == ':') {
  ------------------
  |  Branch (138:8): [True: 1.75k, False: 3.03k]
  ------------------
  139|  1.75k|      curtok = src;
  140|  1.75k|      if(!saw_xdigit) {
  ------------------
  |  Branch (140:10): [True: 898, False: 860]
  ------------------
  141|    898|        if(colonp)
  ------------------
  |  Branch (141:12): [True: 14, False: 884]
  ------------------
  142|     14|          return 0;
  143|    884|        colonp = tp;
  144|    884|        continue;
  145|    898|      }
  146|    860|      if(tp + INT16SZ > endp)
  ------------------
  |  |   37|    860|#define INT16SZ          2
  ------------------
  |  Branch (146:10): [True: 8, False: 852]
  ------------------
  147|      8|        return 0;
  148|    852|      *tp++ = (unsigned char)((val >> 8) & 0xff);
  149|    852|      *tp++ = (unsigned char)(val & 0xff);
  150|    852|      saw_xdigit = 0;
  151|    852|      val = 0;
  152|    852|      continue;
  153|    860|    }
  154|  3.03k|    if(ch == '.' && ((tp + INADDRSZ) <= endp) &&
  ------------------
  |  |   36|    674|#define INADDRSZ         4
  ------------------
  |  Branch (154:8): [True: 674, False: 2.36k]
  |  Branch (154:21): [True: 669, False: 5]
  ------------------
  155|    669|       inet_pton4(curtok, tp) > 0) {
  ------------------
  |  Branch (155:8): [True: 11, False: 658]
  ------------------
  156|     11|      tp += INADDRSZ;
  ------------------
  |  |   36|     11|#define INADDRSZ         4
  ------------------
  157|     11|      saw_xdigit = 0;
  158|     11|      break;    /* '\0' was seen by inet_pton4(). */
  159|     11|    }
  160|  3.02k|    return 0;
  161|  3.03k|  }
  162|  2.40k|  if(saw_xdigit) {
  ------------------
  |  Branch (162:6): [True: 1.19k, False: 1.21k]
  ------------------
  163|  1.19k|    if(tp + INT16SZ > endp)
  ------------------
  |  |   37|  1.19k|#define INT16SZ          2
  ------------------
  |  Branch (163:8): [True: 11, False: 1.18k]
  ------------------
  164|     11|      return 0;
  165|  1.18k|    *tp++ = (unsigned char)((val >> 8) & 0xff);
  166|  1.18k|    *tp++ = (unsigned char)(val & 0xff);
  167|  1.18k|  }
  168|  2.39k|  if(colonp) {
  ------------------
  |  Branch (168:6): [True: 833, False: 1.55k]
  ------------------
  169|       |    /*
  170|       |     * Since some memmove()'s erroneously fail to handle
  171|       |     * overlapping regions, we do the shift by hand.
  172|       |     */
  173|    833|    const ssize_t n = tp - colonp;
  174|    833|    ssize_t i;
  175|       |
  176|    833|    if(tp == endp)
  ------------------
  |  Branch (176:8): [True: 11, False: 822]
  ------------------
  177|     11|      return 0;
  178|  1.67k|    for(i = 1; i <= n; i++) {
  ------------------
  |  Branch (178:16): [True: 848, False: 822]
  ------------------
  179|    848|      *(endp - i) = *(colonp + n - i);
  180|    848|      *(colonp + n - i) = 0;
  181|    848|    }
  182|    822|    tp = endp;
  183|    822|  }
  184|  2.38k|  if(tp != endp)
  ------------------
  |  Branch (184:6): [True: 1.54k, False: 832]
  ------------------
  185|  1.54k|    return 0;
  186|    832|  memcpy(dst, tmp, IN6ADDRSZ);
  ------------------
  |  |   35|    832|#define IN6ADDRSZ       16
  ------------------
  187|    832|  return 1;
  188|  2.38k|}

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

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

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

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

curlx_str_init:
   27|  24.1k|{
   28|       |  out->str = NULL;
   29|  24.1k|  out->len = 0;
   30|  24.1k|}
curlx_str_assign:
   33|    837|{
   34|    837|  out->str = str;
   35|    837|  out->len = len;
   36|    837|}
curlx_str_until:
   51|  17.0k|{
   52|  17.0k|  const char *s;
   53|  17.0k|  size_t len = 0;
   54|  17.0k|  DEBUGASSERT(linep);
  ------------------
  |  | 1077|  17.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (54:3): [True: 0, False: 17.0k]
  |  Branch (54:3): [True: 17.0k, False: 0]
  ------------------
   55|  17.0k|  DEBUGASSERT(*linep);
  ------------------
  |  | 1077|  17.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (55:3): [True: 0, False: 17.0k]
  |  Branch (55:3): [True: 17.0k, False: 0]
  ------------------
   56|  17.0k|  DEBUGASSERT(out);
  ------------------
  |  | 1077|  17.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (56:3): [True: 0, False: 17.0k]
  |  Branch (56:3): [True: 17.0k, False: 0]
  ------------------
   57|  17.0k|  DEBUGASSERT(delim);
  ------------------
  |  | 1077|  17.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (57:3): [True: 0, False: 17.0k]
  |  Branch (57:3): [True: 17.0k, False: 0]
  ------------------
   58|  17.0k|  s = *linep;
   59|       |
   60|  17.0k|  curlx_str_init(out);
   61|  41.5k|  while(*s && (*s != delim)) {
  ------------------
  |  Branch (61:9): [True: 27.5k, False: 14.0k]
  |  Branch (61:15): [True: 24.4k, False: 3.03k]
  ------------------
   62|  24.4k|    s++;
   63|  24.4k|    if(++len > max) {
  ------------------
  |  Branch (63:8): [True: 1, False: 24.4k]
  ------------------
   64|      1|      return STRE_BIG;
  ------------------
  |  |   29|      1|#define STRE_BIG      1
  ------------------
   65|      1|    }
   66|  24.4k|  }
   67|  17.0k|  if(!len)
  ------------------
  |  Branch (67:6): [True: 43, False: 16.9k]
  ------------------
   68|     43|    return STRE_SHORT;
  ------------------
  |  |   30|     43|#define STRE_SHORT    2
  ------------------
   69|  16.9k|  out->str = *linep;
   70|  16.9k|  out->len = len;
   71|  16.9k|  *linep = s; /* point to the first byte after the word */
   72|  16.9k|  return STRE_OK;
  ------------------
  |  |   28|  16.9k|#define STRE_OK       0
  ------------------
   73|  17.0k|}
curlx_str_word:
   78|  13.0k|{
   79|  13.0k|  return curlx_str_until(linep, out, max, ' ');
   80|  13.0k|}
curlx_str_single:
  139|  92.5k|{
  140|  92.5k|  DEBUGASSERT(linep && *linep);
  ------------------
  |  | 1077|  92.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (140:3): [True: 0, False: 92.5k]
  |  Branch (140:3): [True: 0, False: 0]
  |  Branch (140:3): [True: 92.5k, False: 0]
  |  Branch (140:3): [True: 92.5k, False: 0]
  ------------------
  141|  92.5k|  if(**linep != byte)
  ------------------
  |  Branch (141:6): [True: 46.1k, False: 46.4k]
  ------------------
  142|  46.1k|    return STRE_BYTE;
  ------------------
  |  |   33|  46.1k|#define STRE_BYTE     5
  ------------------
  143|  46.4k|  (*linep)++; /* move over it */
  144|  46.4k|  return STRE_OK;
  ------------------
  |  |   28|  46.4k|#define STRE_OK       0
  ------------------
  145|  92.5k|}
curlx_str_singlespace:
  150|  13.0k|{
  151|  13.0k|  return curlx_str_single(linep, ' ');
  152|  13.0k|}
curlx_str_number:
  209|   162k|{
  210|   162k|  return str_num_base(linep, nump, max, 10);
  211|   162k|}
curlx_str_hex:
  216|     69|{
  217|     69|  return str_num_base(linep, nump, max, 16);
  218|     69|}
curlx_str_octal:
  223|  1.35k|{
  224|  1.35k|  return str_num_base(linep, nump, max, 8);
  225|  1.35k|}
curlx_str_casecompare:
  253|  82.3k|{
  254|  82.3k|  size_t clen = check ? strlen(check) : 0;
  ------------------
  |  Branch (254:17): [True: 82.3k, False: 0]
  ------------------
  255|  82.3k|  return ((str->len == clen) && curl_strnequal(str->str, check, clen));
  ------------------
  |  Branch (255:11): [True: 31.2k, False: 51.1k]
  |  Branch (255:33): [True: 11.1k, False: 20.1k]
  ------------------
  256|  82.3k|}
curlx_str_cmp:
  261|  2.50k|{
  262|  2.50k|  if(check) {
  ------------------
  |  Branch (262:6): [True: 2.50k, False: 0]
  ------------------
  263|  2.50k|    size_t clen = strlen(check);
  264|  2.50k|    return ((str->len == clen) && !strncmp(str->str, check, clen));
  ------------------
  |  Branch (264:13): [True: 15, False: 2.48k]
  |  Branch (264:35): [True: 5, False: 10]
  ------------------
  265|  2.50k|  }
  266|      0|  return !!(str->len);
  267|  2.50k|}
curlx_str_nudge:
  272|    857|{
  273|    857|  if(num <= str->len) {
  ------------------
  |  Branch (273:6): [True: 857, False: 0]
  ------------------
  274|    857|    str->str += num;
  275|    857|    str->len -= num;
  276|    857|    return STRE_OK;
  ------------------
  |  |   28|    857|#define STRE_OK       0
  ------------------
  277|    857|  }
  278|      0|  return STRE_OVERFLOW;
  ------------------
  |  |   35|      0|#define STRE_OVERFLOW 7
  ------------------
  279|    857|}
curlx_str_cspn:
  285|  46.2k|{
  286|  46.2k|  const char *s = *linep;
  287|  46.2k|  size_t len;
  288|  46.2k|  DEBUGASSERT(linep && *linep);
  ------------------
  |  | 1077|  46.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (288:3): [True: 0, False: 46.2k]
  |  Branch (288:3): [True: 0, False: 0]
  |  Branch (288:3): [True: 46.2k, False: 0]
  |  Branch (288:3): [True: 46.2k, False: 0]
  ------------------
  289|       |
  290|  46.2k|  len = strcspn(s, reject);
  291|  46.2k|  if(len) {
  ------------------
  |  Branch (291:6): [True: 42.6k, False: 3.61k]
  ------------------
  292|  42.6k|    out->str = s;
  293|  42.6k|    out->len = len;
  294|  42.6k|    *linep = &s[len];
  295|  42.6k|    return STRE_OK;
  ------------------
  |  |   28|  42.6k|#define STRE_OK       0
  ------------------
  296|  42.6k|  }
  297|  3.61k|  curlx_str_init(out);
  298|  3.61k|  return STRE_SHORT;
  ------------------
  |  |   30|  3.61k|#define STRE_SHORT    2
  ------------------
  299|  46.2k|}
curlx_str_trimblanks:
  303|  40.4k|{
  304|  41.3k|  while(out->len && ISBLANK(*out->str))
  ------------------
  |  |   45|  41.0k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 637, False: 40.4k]
  |  |  |  Branch (45:38): [True: 220, False: 40.2k]
  |  |  ------------------
  ------------------
  |  Branch (304:9): [True: 41.0k, False: 284]
  ------------------
  305|    857|    curlx_str_nudge(out, 1);
  306|       |
  307|       |  /* trim trailing spaces and tabs */
  308|  41.1k|  while(out->len && ISBLANK(out->str[out->len - 1]))
  ------------------
  |  |   45|  40.8k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 476, False: 40.4k]
  |  |  |  Branch (45:38): [True: 210, False: 40.2k]
  |  |  ------------------
  ------------------
  |  Branch (308:9): [True: 40.8k, False: 284]
  ------------------
  309|    686|    out->len--;
  310|  40.4k|}
curlx_str_passblanks:
  314|  51.1k|{
  315|  52.3k|  while(ISBLANK(**linep))
  ------------------
  |  |   45|  52.3k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 496, False: 51.8k]
  |  |  |  Branch (45:38): [True: 684, False: 51.1k]
  |  |  ------------------
  ------------------
  316|  1.18k|    (*linep)++; /* move over it */
  317|  51.1k|}
strparse.c:str_num_base:
  172|   163k|{
  173|   163k|  curl_off_t num = 0;
  174|   163k|  const char *p;
  175|   163k|  int m = (base == 10) ? '9' :   /* the largest digit possible */
  ------------------
  |  Branch (175:11): [True: 162k, False: 1.42k]
  ------------------
  176|   163k|    (base == 16) ? 'f' : '7';
  ------------------
  |  Branch (176:5): [True: 69, False: 1.35k]
  ------------------
  177|   163k|  DEBUGASSERT(linep && *linep && nump);
  ------------------
  |  | 1077|   163k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (177:3): [True: 0, False: 163k]
  |  Branch (177:3): [True: 0, False: 0]
  |  Branch (177:3): [True: 0, False: 0]
  |  Branch (177:3): [True: 163k, False: 4]
  |  Branch (177:3): [True: 163k, False: 0]
  |  Branch (177:3): [True: 163k, False: 0]
  ------------------
  178|   163k|  DEBUGASSERT((base == 8) || (base == 10) || (base == 16));
  ------------------
  |  | 1077|   163k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (178:3): [True: 163k, False: 0]
  |  Branch (178:3): [True: 0, False: 0]
  |  Branch (178:3): [True: 0, False: 0]
  |  Branch (178:3): [True: 1.35k, False: 162k]
  |  Branch (178:3): [True: 162k, False: 69]
  |  Branch (178:3): [True: 69, False: 0]
  ------------------
  179|   163k|  DEBUGASSERT(max >= 0); /* mostly to catch SIZE_MAX, which is too large */
  ------------------
  |  | 1077|   163k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 0, False: 163k]
  |  Branch (179:3): [True: 163k, False: 0]
  ------------------
  180|   163k|  *nump = 0;
  181|   163k|  p = *linep;
  182|   163k|  if(!valid_digit(*p, m))
  ------------------
  |  |  156|   163k|  (((x) >= '0') && ((x) <= (m)) && curlx_hexasciitable[(x) - '0'])
  |  |  ------------------
  |  |  |  Branch (156:4): [True: 142k, False: 21.1k]
  |  |  |  Branch (156:20): [True: 43.2k, False: 99.3k]
  |  |  |  Branch (156:36): [True: 43.2k, False: 10]
  |  |  ------------------
  ------------------
  183|   120k|    return STRE_NO_NUM;
  ------------------
  |  |   36|   120k|#define STRE_NO_NUM   8
  ------------------
  184|  43.2k|  if(max < base) {
  ------------------
  |  Branch (184:6): [True: 0, False: 43.2k]
  ------------------
  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|  43.2k|  else {
  194|  94.5k|    do {
  195|  94.5k|      int n = curlx_hexval(*p++);
  ------------------
  |  |  112|  94.5k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  196|  94.5k|      if(num > ((max - n) / base))
  ------------------
  |  Branch (196:10): [True: 192, False: 94.3k]
  ------------------
  197|    192|        return STRE_OVERFLOW;
  ------------------
  |  |   35|    192|#define STRE_OVERFLOW 7
  ------------------
  198|  94.3k|      num = (num * base) + n;
  199|  94.3k|    } while(valid_digit(*p, m));
  ------------------
  |  |  156|  94.3k|  (((x) >= '0') && ((x) <= (m)) && curlx_hexasciitable[(x) - '0'])
  |  |  ------------------
  |  |  |  Branch (156:4): [True: 82.9k, False: 11.3k]
  |  |  |  Branch (156:20): [True: 51.3k, False: 31.6k]
  |  |  |  Branch (156:36): [True: 51.3k, False: 3]
  |  |  ------------------
  ------------------
  200|  43.2k|  }
  201|  43.0k|  *nump = num;
  202|  43.0k|  *linep = p;
  203|  43.0k|  return STRE_OK;
  ------------------
  |  |   28|  43.0k|#define STRE_OK       0
  ------------------
  204|  43.2k|}

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

curlx_pnow:
   54|  1.28M|{
   55|       |  /*
   56|       |   * clock_gettime() is granted to be increased monotonically when the
   57|       |   * monotonic clock is queried. Time starting point is unspecified, it
   58|       |   * could be the system start-up time, the Epoch, or something else,
   59|       |   * in any case the time starting point does not change once that the
   60|       |   * system has started up.
   61|       |   */
   62|  1.28M|  struct timespec tsnow;
   63|       |
   64|       |  /*
   65|       |   * clock_gettime() may be defined by Apple's SDK as weak symbol thus
   66|       |   * code compiles but fails during runtime if clock_gettime() is
   67|       |   * called on unsupported OS version.
   68|       |   */
   69|       |#if defined(__APPLE__) && defined(HAVE_BUILTIN_AVAILABLE) && \
   70|       |  (HAVE_BUILTIN_AVAILABLE == 1)
   71|       |  bool have_clock_gettime = FALSE;
   72|       |  if(__builtin_available(macOS 10.12, iOS 10, tvOS 10, watchOS 3, *))
   73|       |    have_clock_gettime = TRUE;
   74|       |#endif
   75|       |
   76|  1.28M|#ifdef HAVE_CLOCK_GETTIME_MONOTONIC_RAW
   77|  1.28M|  if(
   78|       |#if defined(__APPLE__) && defined(HAVE_BUILTIN_AVAILABLE) && \
   79|       |  (HAVE_BUILTIN_AVAILABLE == 1)
   80|       |    have_clock_gettime &&
   81|       |#endif
   82|  1.28M|    (clock_gettime(CLOCK_MONOTONIC_RAW, &tsnow) == 0)) {
  ------------------
  |  Branch (82:5): [True: 1.28M, False: 18.4E]
  ------------------
   83|  1.28M|    pnow->tv_sec = tsnow.tv_sec;
   84|  1.28M|    pnow->tv_usec = (int)(tsnow.tv_nsec / 1000);
   85|  1.28M|  }
   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|  1.28M|}
curlx_now:
  176|  1.90k|{
  177|  1.90k|  struct curltime now;
  178|  1.90k|  curlx_pnow(&now);
  179|  1.90k|  return now;
  180|  1.90k|}
curlx_ptimediff_ms:
  190|  1.09M|{
  191|  1.09M|  timediff_t diff = (timediff_t)newer->tv_sec - older->tv_sec;
  192|  1.09M|  if(diff >= (TIMEDIFF_T_MAX / 1000))
  ------------------
  |  |   33|  1.09M|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  590|  1.09M|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
  |  Branch (192:6): [True: 0, False: 1.09M]
  ------------------
  193|      0|    return TIMEDIFF_T_MAX;
  ------------------
  |  |   33|      0|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  590|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
  194|  1.09M|  else if(diff <= (TIMEDIFF_T_MIN / 1000))
  ------------------
  |  |   34|  1.09M|#define TIMEDIFF_T_MIN CURL_OFF_T_MIN
  |  |  ------------------
  |  |  |  |  592|  1.09M|#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  590|  1.09M|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (194:11): [True: 0, False: 1.09M]
  ------------------
  195|      0|    return TIMEDIFF_T_MIN;
  ------------------
  |  |   34|      0|#define TIMEDIFF_T_MIN CURL_OFF_T_MIN
  |  |  ------------------
  |  |  |  |  592|      0|#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  590|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  196|  1.09M|  return (diff * 1000) + ((newer->tv_usec - older->tv_usec) / 1000);
  197|  1.09M|}
curlx_ptimediff_us:
  225|   143k|{
  226|   143k|  timediff_t diff = (timediff_t)newer->tv_sec - older->tv_sec;
  227|   143k|  if(diff >= (TIMEDIFF_T_MAX / 1000000))
  ------------------
  |  |   33|   143k|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  590|   143k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
  |  Branch (227:6): [True: 0, False: 143k]
  ------------------
  228|      0|    return TIMEDIFF_T_MAX;
  ------------------
  |  |   33|      0|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  590|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
  229|   143k|  else if(diff <= (TIMEDIFF_T_MIN / 1000000))
  ------------------
  |  |   34|   143k|#define TIMEDIFF_T_MIN CURL_OFF_T_MIN
  |  |  ------------------
  |  |  |  |  592|   143k|#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  590|   143k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (229:11): [True: 0, False: 143k]
  ------------------
  230|      0|    return TIMEDIFF_T_MIN;
  ------------------
  |  |   34|      0|#define TIMEDIFF_T_MIN CURL_OFF_T_MIN
  |  |  ------------------
  |  |  |  |  592|      0|#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  590|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  231|   143k|  return (diff * 1000000) + newer->tv_usec - older->tv_usec;
  232|   143k|}
curlx_gmtime:
  253|    838|{
  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|    838|  tm = gmtime_r(&intime, store); /* thread-safe */
  260|    838|  if(!tm)
  ------------------
  |  Branch (260:6): [True: 0, False: 838]
  ------------------
  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|    838|  return CURLE_OK;
  273|    838|}

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

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

Curl_cw_out_is_paused:
  490|  6.98k|{
  491|  6.98k|  struct Curl_cwriter *cw_out;
  492|  6.98k|  struct cw_out_ctx *ctx;
  493|       |
  494|  6.98k|  cw_out = Curl_cwriter_get_by_type(data, &Curl_cwt_out);
  495|  6.98k|  if(!cw_out)
  ------------------
  |  Branch (495:6): [True: 2, False: 6.98k]
  ------------------
  496|      2|    return FALSE;
  ------------------
  |  | 1054|      2|#define FALSE false
  ------------------
  497|       |
  498|  6.98k|  ctx = (struct cw_out_ctx *)cw_out;
  499|  6.98k|  return (bool)ctx->paused;
  500|  6.98k|}
Curl_cw_out_done:
  517|  7.93k|{
  518|  7.93k|  struct Curl_cwriter *cw_out;
  519|  7.93k|  CURLcode result = CURLE_OK;
  520|       |
  521|  7.93k|  cw_out = Curl_cwriter_get_by_type(data, &Curl_cwt_out);
  522|  7.93k|  if(cw_out) {
  ------------------
  |  Branch (522:6): [True: 694, False: 7.23k]
  ------------------
  523|    694|    CURL_TRC_WRITE(data, "[OUT] done");
  ------------------
  |  |  158|    694|  do {                                                     \
  |  |  159|    694|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|    694|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.38k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 694, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 694]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.38k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((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|    694|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|    694|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|    694|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 694]
  |  |  ------------------
  ------------------
  524|    694|    result = Curl_client_flush(data);
  525|    694|    if(!result)
  ------------------
  |  Branch (525:8): [True: 694, False: 0]
  ------------------
  526|    694|      result = cw_out_do_flush(data, cw_out, TRUE);
  ------------------
  |  | 1051|    694|#define TRUE true
  ------------------
  527|    694|  }
  528|  7.93k|  return result;
  529|  7.93k|}
cw-out.c:cw_out_init:
  106|    699|{
  107|    699|  struct cw_out_ctx *ctx = writer->ctx;
  108|    699|  (void)data;
  109|       |  ctx->buf = NULL;
  110|    699|  return CURLE_OK;
  111|    699|}
cw-out.c:cw_out_write:
  426|  6.92k|{
  427|  6.92k|  struct cw_out_ctx *ctx = writer->ctx;
  428|  6.92k|  CURLcode result;
  429|  6.92k|  bool flush_all = !!(type & CLIENTWRITE_EOS);
  ------------------
  |  |   49|  6.92k|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  430|       |
  431|  6.92k|  CURL_TRC_WRITE(data, "[OUT] write %zu bytes, type=%x",
  ------------------
  |  |  158|  6.92k|  do {                                                     \
  |  |  159|  6.92k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|  6.92k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  13.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 6.92k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 6.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  13.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|  6.92k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  6.92k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  6.92k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 6.92k]
  |  |  ------------------
  ------------------
  432|  6.92k|                 blen, (unsigned int)type);
  433|  6.92k|  if((type & CLIENTWRITE_BODY) ||
  ------------------
  |  |   42|  6.92k|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (433:6): [True: 6.33k, False: 598]
  ------------------
  434|  6.34k|     ((type & CLIENTWRITE_HEADER) && data->set.include_header)) {
  ------------------
  |  |   44|    598|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
  |  Branch (434:7): [True: 598, False: 0]
  |  Branch (434:38): [True: 10, False: 588]
  ------------------
  435|  6.34k|    cw_out_type otype = (!blen && (type & CLIENTWRITE_0LEN)) ?
  ------------------
  |  |   50|     58|#define CLIENTWRITE_0LEN    (1 << 8) /* write even 0-length buffers */
  ------------------
  |  Branch (435:26): [True: 58, False: 6.28k]
  |  Branch (435:35): [True: 0, False: 58]
  ------------------
  436|  6.34k|                        CW_OUT_BODY_0LEN : CW_OUT_BODY;
  437|  6.34k|    result = cw_out_do_write(ctx, data, otype, flush_all, buf, blen);
  438|  6.34k|    if(result)
  ------------------
  |  Branch (438:8): [True: 0, False: 6.34k]
  ------------------
  439|      0|      return result;
  440|  6.34k|  }
  441|       |
  442|  6.92k|  if(type & (CLIENTWRITE_HEADER | CLIENTWRITE_INFO)) {
  ------------------
  |  |   44|  6.92k|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
                if(type & (CLIENTWRITE_HEADER | CLIENTWRITE_INFO)) {
  ------------------
  |  |   43|  6.92k|#define CLIENTWRITE_INFO    (1 << 1) /* meta information, not a HEADER */
  ------------------
  |  Branch (442:6): [True: 598, False: 6.33k]
  ------------------
  443|    598|    result = cw_out_do_write(ctx, data, CW_OUT_HDS, flush_all, buf, blen);
  444|    598|    if(result)
  ------------------
  |  Branch (444:8): [True: 0, False: 598]
  ------------------
  445|      0|      return result;
  446|    598|  }
  447|       |
  448|  6.92k|  return CURLE_OK;
  449|  6.92k|}
cw-out.c:cw_out_do_write:
  376|  6.93k|{
  377|  6.93k|  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|  6.93k|  if(ctx->buf && ctx->buf->type != otype) {
  ------------------
  |  Branch (381:6): [True: 0, False: 6.93k]
  |  Branch (381:18): [True: 0, False: 0]
  ------------------
  382|      0|    result = cw_out_flush_chain(ctx, data, &ctx->buf, TRUE);
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  383|      0|    if(result)
  ------------------
  |  Branch (383:8): [True: 0, False: 0]
  ------------------
  384|      0|      goto out;
  385|      0|  }
  386|       |
  387|  6.93k|  if(ctx->buf) {
  ------------------
  |  Branch (387:6): [True: 0, False: 6.93k]
  ------------------
  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|  6.93k|  else {
  397|       |    /* nothing buffered, try direct write */
  398|  6.93k|    size_t consumed;
  399|  6.93k|    result = cw_out_ptr_flush(ctx, data, otype, flush_all,
  400|  6.93k|                              buf, blen, &consumed);
  401|  6.93k|    if(result && (result != CURLE_AGAIN))
  ------------------
  |  Branch (401:8): [True: 0, False: 6.93k]
  |  Branch (401:18): [True: 0, False: 0]
  ------------------
  402|      0|      return result;
  403|  6.93k|    result = CURLE_OK;
  404|  6.93k|    if(consumed < blen) {
  ------------------
  |  Branch (404:8): [True: 0, False: 6.93k]
  ------------------
  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|  6.93k|  }
  412|       |
  413|  6.93k|out:
  414|  6.93k|  if(result) {
  ------------------
  |  Branch (414:6): [True: 0, False: 6.93k]
  ------------------
  415|       |    /* We do not want to invoked client callbacks a second time after
  416|       |     * encountering an error. See issue #13337 */
  417|       |    ctx->errored = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  418|      0|    cw_out_bufs_free(ctx);
  419|      0|  }
  420|  6.93k|  return result;
  421|  6.93k|}
cw-out.c:cw_out_flush_chain:
  311|  1.38k|{
  312|  1.38k|  struct cw_out_buf *cwbuf = *pcwbuf;
  313|  1.38k|  CURLcode result;
  314|       |
  315|  1.38k|  if(!cwbuf)
  ------------------
  |  Branch (315:6): [True: 1.38k, False: 0]
  ------------------
  316|  1.38k|    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);
  ------------------
  |  | 1077|      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|  6.93k|{
  228|  6.93k|  curl_write_callback wcb = NULL;
  229|  6.93k|  void *wcb_data;
  230|  6.93k|  size_t max_write, min_write;
  231|  6.93k|  size_t wlen, nwritten = 0;
  232|  6.93k|  CURLcode result = CURLE_OK;
  233|       |
  234|       |  /* If we errored once, we do not invoke the client callback again */
  235|  6.93k|  if(ctx->errored)
  ------------------
  |  Branch (235:6): [True: 0, False: 6.93k]
  ------------------
  236|      0|    return CURLE_WRITE_ERROR;
  237|       |
  238|       |  /* write callbacks may get NULLed by the client between calls. */
  239|  6.93k|  cw_get_writefunc(data, otype, &wcb, &wcb_data, &max_write, &min_write);
  240|  6.93k|  if(!wcb) {
  ------------------
  |  Branch (240:6): [True: 598, False: 6.34k]
  ------------------
  241|    598|    *pconsumed = blen;
  242|    598|    return CURLE_OK;
  243|    598|  }
  244|       |
  245|  6.34k|  *pconsumed = 0;
  246|  6.34k|  if(otype == CW_OUT_BODY_0LEN) {
  ------------------
  |  Branch (246:6): [True: 0, False: 6.34k]
  ------------------
  247|      0|    DEBUGASSERT(!blen);
  ------------------
  |  | 1077|      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|  6.34k|  else {
  252|  12.6k|    while(blen && !ctx->paused) {
  ------------------
  |  Branch (252:11): [True: 6.28k, False: 6.34k]
  |  Branch (252:19): [True: 6.28k, False: 0]
  ------------------
  253|  6.28k|      if(!flush_all && blen < min_write)
  ------------------
  |  Branch (253:10): [True: 6.28k, False: 0]
  |  Branch (253:24): [True: 0, False: 6.28k]
  ------------------
  254|      0|        break;
  255|  6.28k|      wlen = max_write ? CURLMIN(blen, max_write) : blen;
  ------------------
  |  | 1292|  6.28k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1292:24): [True: 6.28k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (255:14): [True: 6.28k, False: 0]
  ------------------
  256|  6.28k|      if(otype == CW_OUT_BODY)
  ------------------
  |  Branch (256:10): [True: 6.28k, False: 0]
  ------------------
  257|  6.28k|        result = Curl_pgrs_deliver_check(data, wlen);
  258|  6.28k|      if(!result)
  ------------------
  |  Branch (258:10): [True: 6.28k, False: 0]
  ------------------
  259|  6.28k|        result = cw_out_cb_write(ctx, data, wcb, wcb_data, otype,
  260|  6.28k|                                 buf, wlen, &nwritten);
  261|  6.28k|      if(result)
  ------------------
  |  Branch (261:10): [True: 0, False: 6.28k]
  ------------------
  262|      0|        return result;
  263|  6.28k|      if(otype == CW_OUT_BODY)
  ------------------
  |  Branch (263:10): [True: 6.28k, False: 0]
  ------------------
  264|  6.28k|        Curl_pgrs_deliver_inc(data, nwritten);
  265|  6.28k|      *pconsumed += nwritten;
  266|  6.28k|      blen -= nwritten;
  267|  6.28k|      buf += nwritten;
  268|  6.28k|    }
  269|  6.34k|  }
  270|  6.34k|  return CURLE_OK;
  271|  6.34k|}
cw-out.c:cw_get_writefunc:
  147|  6.93k|{
  148|  6.93k|  switch(otype) {
  149|  6.34k|  case CW_OUT_BODY:
  ------------------
  |  Branch (149:3): [True: 6.34k, False: 598]
  ------------------
  150|  6.34k|  case CW_OUT_BODY_0LEN:
  ------------------
  |  Branch (150:3): [True: 0, False: 6.93k]
  ------------------
  151|  6.34k|    *pwcb = data->set.fwrite_func;
  152|  6.34k|    *pwcb_data = data->set.out;
  153|  6.34k|    *pmax_write = CURL_MAX_WRITE_SIZE;
  ------------------
  |  |  265|  6.34k|#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|  6.34k|    *pmin_write = 0;
  158|  6.34k|    break;
  159|    598|  case CW_OUT_HDS:
  ------------------
  |  Branch (159:3): [True: 598, False: 6.34k]
  ------------------
  160|    598|    *pwcb = data->set.fwrite_header ? data->set.fwrite_header :
  ------------------
  |  Branch (160:13): [True: 0, False: 598]
  ------------------
  161|    598|             (data->set.writeheader ? data->set.fwrite_func : NULL);
  ------------------
  |  Branch (161:15): [True: 0, False: 598]
  ------------------
  162|    598|    *pwcb_data = data->set.writeheader;
  163|    598|    *pmax_write = 0; /* do not chunk-write headers, write them as they are */
  164|    598|    *pmin_write = 0;
  165|    598|    break;
  166|      0|  default:
  ------------------
  |  Branch (166:3): [True: 0, False: 6.93k]
  ------------------
  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|  6.93k|  }
  172|  6.93k|}
cw-out.c:cw_out_cb_write:
  181|  6.28k|{
  182|  6.28k|  size_t nwritten;
  183|  6.28k|  CURLcode result;
  184|       |
  185|  6.28k|  NOVERBOSE((void)otype);
  ------------------
  |  | 1624|  6.28k|#define NOVERBOSE(x) Curl_nop_stmt
  |  |  ------------------
  |  |  |  | 1185|  6.28k|#define Curl_nop_stmt do {} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1185:35): [Folded, False: 6.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|       |
  187|  6.28k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1077|  6.28k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (187:3): [True: 0, False: 6.28k]
  |  Branch (187:3): [True: 6.28k, False: 0]
  ------------------
  188|  6.28k|  *pnwritten = 0;
  189|  6.28k|  Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1051|  6.28k|#define TRUE true
  ------------------
  190|  6.28k|  nwritten = wcb((char *)CURL_UNCONST(buf), 1, blen, wcb_data);
  ------------------
  |  |  862|  6.28k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  191|  6.28k|  Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1054|  6.28k|#define FALSE false
  ------------------
  192|  6.28k|  CURL_TRC_WRITE(data, "[OUT] wrote %zu %s bytes -> %zu",
  ------------------
  |  |  158|  6.28k|  do {                                                     \
  |  |  159|  6.28k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|  6.28k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  12.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 6.28k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 6.28k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  12.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|  6.28k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  6.28k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  ------------------
  |  |  |  Branch (160:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  161|  6.28k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 6.28k]
  |  |  ------------------
  ------------------
  193|  6.28k|                 blen, (otype == CW_OUT_HDS) ? "header" : "body",
  194|  6.28k|                 nwritten);
  195|  6.28k|  if(nwritten == CURL_WRITEFUNC_PAUSE) {
  ------------------
  |  |  277|  6.28k|#define CURL_WRITEFUNC_PAUSE 0x10000001
  ------------------
  |  Branch (195:6): [True: 0, False: 6.28k]
  ------------------
  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;
  ------------------
  |  | 1051|      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);
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  206|      0|    return result ? result : CURLE_AGAIN;
  ------------------
  |  Branch (206:12): [True: 0, False: 0]
  ------------------
  207|      0|  }
  208|  6.28k|  else if(nwritten == CURL_WRITEFUNC_ERROR) {
  ------------------
  |  |  281|  6.28k|#define CURL_WRITEFUNC_ERROR 0xFFFFFFFF
  ------------------
  |  Branch (208:11): [True: 0, False: 6.28k]
  ------------------
  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|  6.28k|  else if(nwritten != blen) {
  ------------------
  |  Branch (212:11): [True: 0, False: 6.28k]
  ------------------
  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|  6.28k|  *pnwritten = nwritten;
  218|  6.28k|  return CURLE_OK;
  219|  6.28k|}
cw-out.c:cw_out_bufs_free:
  114|    699|{
  115|    699|  while(ctx->buf) {
  ------------------
  |  Branch (115:9): [True: 0, False: 699]
  ------------------
  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|    699|}
cw-out.c:cw_out_flush:
  474|    694|{
  475|    694|  CURL_TRC_WRITE(data, "[OUT] flush");
  ------------------
  |  |  158|    694|  do {                                                     \
  |  |  159|    694|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|    694|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.38k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 694, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 694]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.38k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((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|    694|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|    694|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|    694|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 694]
  |  |  ------------------
  ------------------
  476|       |  return cw_out_do_flush(data, writer, FALSE);
  ------------------
  |  | 1054|    694|#define FALSE false
  ------------------
  477|    694|}
cw-out.c:cw_out_close:
  134|    699|{
  135|    699|  struct cw_out_ctx *ctx = writer->ctx;
  136|       |
  137|    699|  (void)data;
  138|    699|  cw_out_bufs_free(ctx);
  139|    699|}
cw-out.c:cw_out_do_flush:
  454|  1.38k|{
  455|  1.38k|  struct cw_out_ctx *ctx = (struct cw_out_ctx *)cw_out;
  456|  1.38k|  CURLcode result = CURLE_OK;
  457|       |
  458|  1.38k|  if(ctx->errored)
  ------------------
  |  Branch (458:6): [True: 0, False: 1.38k]
  ------------------
  459|      0|    return CURLE_WRITE_ERROR;
  460|  1.38k|  if(ctx->paused)
  ------------------
  |  Branch (460:6): [True: 0, False: 1.38k]
  ------------------
  461|      0|    return CURLE_OK;  /* not doing it */
  462|       |
  463|  1.38k|  result = cw_out_flush_chain(ctx, data, &ctx->buf, flush_all);
  464|  1.38k|  if(result) {
  ------------------
  |  Branch (464:6): [True: 0, False: 1.38k]
  ------------------
  465|      0|    ctx->errored = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  466|      0|    cw_out_bufs_free(ctx);
  467|      0|    return result;
  468|      0|  }
  469|  1.38k|  return result;
  470|  1.38k|}

cw-pause.c:cw_pause_init:
   75|    699|{
   76|    699|  struct cw_pause_ctx *ctx = writer->ctx;
   77|    699|  (void)data;
   78|       |  ctx->buf = NULL;
   79|    699|  return CURLE_OK;
   80|    699|}
cw-pause.c:cw_pause_write:
  150|  6.92k|{
  151|  6.92k|  struct cw_pause_ctx *ctx = writer->ctx;
  152|  6.92k|  CURLcode result = CURLE_OK;
  153|  6.92k|  size_t wlen = 0;
  154|  6.92k|  bool decoding = Curl_cwriter_is_content_decoding(data);
  155|       |
  156|  6.92k|  if(ctx->buf && !Curl_cwriter_is_paused(data)) {
  ------------------
  |  Branch (156:6): [True: 0, False: 6.92k]
  |  Branch (156:18): [True: 0, False: 0]
  ------------------
  157|      0|    result = cw_pause_flush(data, writer);
  158|      0|    if(result)
  ------------------
  |  Branch (158:8): [True: 0, False: 0]
  ------------------
  159|      0|      return result;
  160|      0|  }
  161|       |
  162|  6.92k|  while(!ctx->buf && !Curl_cwriter_is_paused(data)) {
  ------------------
  |  Branch (162:9): [True: 6.92k, False: 0]
  |  Branch (162:22): [True: 6.92k, False: 0]
  ------------------
  163|  6.92k|    int wtype = type;
  164|  6.92k|    DEBUGASSERT(!ctx->buf);
  ------------------
  |  | 1077|  6.92k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (164:5): [True: 0, False: 6.92k]
  |  Branch (164:5): [True: 6.92k, False: 0]
  ------------------
  165|       |    /* content decoding might blow up size considerably, write smaller
  166|       |     * chunks to make pausing need buffer less. */
  167|  6.92k|    wlen = (decoding && (type & CLIENTWRITE_BODY)) ?
  ------------------
  |  |   42|      0|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (167:13): [True: 0, False: 6.92k]
  |  Branch (167:25): [True: 0, False: 0]
  ------------------
  168|  6.92k|           CURLMIN(blen, CW_PAUSE_DEC_WRITE_CHUNK) : blen;
  ------------------
  |  | 1292|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1292:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  169|  6.92k|    if(wlen < blen)
  ------------------
  |  Branch (169:8): [True: 0, False: 6.92k]
  ------------------
  170|      0|      wtype &= ~CLIENTWRITE_EOS;
  ------------------
  |  |   49|      0|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  171|  6.92k|    result = Curl_cwriter_write(data, writer->next, wtype, buf, wlen);
  172|  6.92k|    if(result)
  ------------------
  |  Branch (172:8): [True: 0, False: 6.92k]
  ------------------
  173|      0|      return result;
  174|  6.92k|    buf += wlen;
  175|  6.92k|    blen -= wlen;
  176|  6.92k|    if(!blen)
  ------------------
  |  Branch (176:8): [True: 6.92k, False: 0]
  ------------------
  177|  6.92k|      return result;
  178|  6.92k|  }
  179|       |
  180|      0|  do {
  181|      0|    size_t nwritten = 0;
  182|      0|    if(ctx->buf && (ctx->buf->type == type) && (type & CLIENTWRITE_BODY)) {
  ------------------
  |  |   42|      0|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (182:8): [True: 0, False: 0]
  |  Branch (182:20): [True: 0, False: 0]
  |  Branch (182:48): [True: 0, False: 0]
  ------------------
  183|       |      /* same type and body, append to current buffer which has a soft
  184|       |       * limit and should take everything up to OOM. */
  185|      0|      result = Curl_bufq_cwrite(&ctx->buf->b, buf, blen, &nwritten);
  186|      0|    }
  187|      0|    else {
  188|       |      /* Need a new buf, type changed */
  189|      0|      struct cw_pause_buf *cwbuf = cw_pause_buf_create(type, blen);
  190|      0|      if(!cwbuf)
  ------------------
  |  Branch (190:10): [True: 0, False: 0]
  ------------------
  191|      0|        return CURLE_OUT_OF_MEMORY;
  192|      0|      cwbuf->next = ctx->buf;
  193|      0|      ctx->buf = cwbuf;
  194|      0|      result = Curl_bufq_cwrite(&ctx->buf->b, buf, blen, &nwritten);
  195|      0|    }
  196|      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]
  |  |  ------------------
  ------------------
  197|      0|                   "total=%zu -> %d", nwritten, (unsigned int)type,
  198|      0|                   ctx->buf_total + wlen, (int)result);
  199|      0|    if(result)
  ------------------
  |  Branch (199:8): [True: 0, False: 0]
  ------------------
  200|      0|      return result;
  201|      0|    buf += nwritten;
  202|      0|    blen -= nwritten;
  203|      0|    ctx->buf_total += nwritten;
  204|      0|  } while(blen);
  ------------------
  |  Branch (204:11): [True: 0, False: 0]
  ------------------
  205|       |
  206|      0|  return result;
  207|      0|}
cw-pause.c:cw_pause_flush:
  101|    694|{
  102|    694|  struct cw_pause_ctx *ctx = (struct cw_pause_ctx *)cw_pause;
  103|    694|  bool decoding = Curl_cwriter_is_content_decoding(data);
  104|    694|  CURLcode result = CURLE_OK;
  105|       |
  106|       |  /* write the end of the chain until it blocks or gets empty */
  107|    694|  while(ctx->buf && !Curl_cwriter_is_paused(data)) {
  ------------------
  |  Branch (107:9): [True: 0, False: 694]
  |  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;
  ------------------
  |  | 1292|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1292: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, (unsigned int)(*plast)->type,
  121|      0|                     (int)result);
  122|      0|      Curl_bufq_skip(&(*plast)->b, wlen);
  123|      0|      DEBUGASSERT(ctx->buf_total >= wlen);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (123:7): [True: 0, False: 0]
  |  Branch (123:7): [True: 0, False: 0]
  ------------------
  124|      0|      ctx->buf_total -= wlen;
  125|      0|      if(result)
  ------------------
  |  Branch (125:10): [True: 0, False: 0]
  ------------------
  126|      0|        return result;
  127|      0|    }
  128|      0|    else if((*plast)->type & CLIENTWRITE_EOS) {
  ------------------
  |  |   49|      0|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  |  Branch (128:13): [True: 0, False: 0]
  ------------------
  129|      0|      result = Curl_cwriter_write(data, cw_pause->next, (*plast)->type,
  130|      0|                                  (const char *)buf, 0);
  131|      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]
  |  |  ------------------
  ------------------
  132|      0|                     ctx->buf_total, (unsigned int)(*plast)->type,
  133|      0|                     (int)result);
  134|      0|    }
  135|       |
  136|      0|    if(Curl_bufq_is_empty(&(*plast)->b)) {
  ------------------
  |  Branch (136:8): [True: 0, False: 0]
  ------------------
  137|      0|      cw_pause_buf_free(*plast);
  138|      0|      *plast = NULL;
  139|      0|    }
  140|      0|  }
  141|       |
  142|    694|  if(!result)
  ------------------
  |  Branch (142:6): [True: 694, False: 0]
  ------------------
  143|    694|    result = Curl_cwriter_flush(data, cw_pause->next);
  144|    694|  return result;
  145|    694|}
cw-pause.c:cw_pause_close:
   92|    699|{
   93|    699|  struct cw_pause_ctx *ctx = writer->ctx;
   94|       |
   95|    699|  (void)data;
   96|    699|  cw_pause_bufs_free(ctx);
   97|    699|}
cw-pause.c:cw_pause_bufs_free:
   83|    699|{
   84|    699|  while(ctx->buf) {
  ------------------
  |  Branch (84:9): [True: 0, False: 699]
  ------------------
   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|    699|}

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

doh_req_encode:
   86|    622|{
   87|    622|  const size_t hostlen = strlen(host);
   88|    622|  unsigned char *orig = dnsp;
   89|    622|  const char *hostp = host;
   90|       |
   91|       |  /* The expected output length is 16 bytes more than the length of
   92|       |   * the QNAME-encoding of the hostname.
   93|       |   *
   94|       |   * A valid DNS name may not contain a zero-length label, except at
   95|       |   * the end. For this reason, a name beginning with a dot, or
   96|       |   * containing a sequence of two or more consecutive dots, is invalid
   97|       |   * and cannot be encoded as a QNAME.
   98|       |   *
   99|       |   * If the hostname ends with a trailing dot, the corresponding
  100|       |   * QNAME-encoding is one byte longer than the hostname. If (as is
  101|       |   * also valid) the hostname is shortened by the omission of the
  102|       |   * trailing dot, then its QNAME-encoding will be two bytes longer
  103|       |   * than the hostname.
  104|       |   *
  105|       |   * Each [ label, dot ] pair is encoded as [ length, label ],
  106|       |   * preserving overall length. A final [ label ] without a dot is
  107|       |   * also encoded as [ length, label ], increasing overall length
  108|       |   * by one. The encoding is completed by appending a zero byte,
  109|       |   * representing the zero-length root label, again increasing
  110|       |   * the overall length by one.
  111|       |   */
  112|       |
  113|    622|  size_t expected_len;
  114|    622|  DEBUGASSERT(hostlen);
  ------------------
  |  | 1077|    622|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (114:3): [True: 0, False: 622]
  |  Branch (114:3): [True: 622, False: 0]
  ------------------
  115|    622|  expected_len = 12 + 1 + hostlen + 4;
  116|    622|  if(host[hostlen - 1] != '.')
  ------------------
  |  Branch (116:6): [True: 581, False: 41]
  ------------------
  117|    581|    expected_len++;
  118|       |
  119|    622|  if(expected_len > DOH_MAX_DNSREQ_SIZE)
  ------------------
  |  |   88|    622|#define DOH_MAX_DNSREQ_SIZE (256 + 16)
  ------------------
  |  Branch (119:6): [True: 0, False: 622]
  ------------------
  120|      0|    return DOH_DNS_NAME_TOO_LONG;
  121|       |
  122|    622|  if(len < expected_len)
  ------------------
  |  Branch (122:6): [True: 0, False: 622]
  ------------------
  123|      0|    return DOH_TOO_SMALL_BUFFER;
  124|       |
  125|    622|  *dnsp++ = 0; /* 16-bit id */
  126|    622|  *dnsp++ = 0;
  127|    622|  *dnsp++ = 0x01; /* |QR|   Opcode  |AA|TC|RD| Set the RD bit */
  128|    622|  *dnsp++ = '\0'; /* |RA|   Z    |   RCODE   |                */
  129|    622|  *dnsp++ = '\0';
  130|    622|  *dnsp++ = 1;    /* QDCOUNT (number of entries in the question section) */
  131|    622|  *dnsp++ = '\0';
  132|    622|  *dnsp++ = '\0'; /* ANCOUNT */
  133|    622|  *dnsp++ = '\0';
  134|    622|  *dnsp++ = '\0'; /* NSCOUNT */
  135|    622|  *dnsp++ = '\0';
  136|    622|  *dnsp++ = '\0'; /* ARCOUNT */
  137|       |
  138|       |  /* encode each label and store it in the QNAME */
  139|  1.36k|  while(*hostp) {
  ------------------
  |  Branch (139:9): [True: 756, False: 613]
  ------------------
  140|    756|    size_t labellen;
  141|    756|    const char *dot = strchr(hostp, '.');
  142|    756|    if(dot)
  ------------------
  |  Branch (142:8): [True: 180, False: 576]
  ------------------
  143|    180|      labellen = dot - hostp;
  144|    576|    else
  145|    576|      labellen = strlen(hostp);
  146|    756|    if((labellen > 63) || (!labellen)) {
  ------------------
  |  Branch (146:8): [True: 1, False: 755]
  |  Branch (146:27): [True: 8, False: 747]
  ------------------
  147|       |      /* label is too long or too short, error out */
  148|      9|      *olen = 0;
  149|      9|      return DOH_DNS_BAD_LABEL;
  150|      9|    }
  151|       |    /* label is non-empty, process it */
  152|    747|    *dnsp++ = (unsigned char)labellen;
  153|    747|    memcpy(dnsp, hostp, labellen);
  154|    747|    dnsp += labellen;
  155|    747|    hostp += labellen;
  156|       |    /* advance past dot, but only if there is one */
  157|    747|    if(dot)
  ------------------
  |  Branch (157:8): [True: 172, False: 575]
  ------------------
  158|    172|      hostp++;
  159|    747|  } /* next label */
  160|       |
  161|    613|  *dnsp++ = 0; /* append zero-length label for root */
  162|       |
  163|       |  /* There are assigned TYPE codes beyond 255: use range [1..65535] */
  164|    613|  *dnsp++ = (unsigned char)(255 & (dnstype >> 8)); /* upper 8-bit TYPE */
  165|    613|  *dnsp++ = (unsigned char)(255 & dnstype);        /* lower 8-bit TYPE */
  166|       |
  167|    613|  *dnsp++ = '\0'; /* upper 8-bit CLASS */
  168|    613|  *dnsp++ = DNS_CLASS_IN; /* IN - "the Internet" */
  ------------------
  |  |   41|    613|#define DNS_CLASS_IN 0x01
  ------------------
  169|       |
  170|    613|  *olen = dnsp - orig;
  171|       |
  172|       |  /* verify that our estimation of length is valid, since
  173|       |   * this has led to buffer overflows in this function */
  174|    613|  DEBUGASSERT(*olen == expected_len);
  ------------------
  |  | 1077|    613|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (174:3): [True: 0, False: 613]
  |  Branch (174:3): [True: 613, False: 0]
  ------------------
  175|    613|  return DOH_OK;
  176|    613|}
Curl_doh:
  458|    326|{
  459|    326|  CURLcode result = CURLE_OK;
  460|    326|  struct doh_probes *dohp = NULL;
  461|    326|  size_t i;
  462|       |
  463|    326|  DEBUGASSERT(!async->doh);
  ------------------
  |  | 1077|    326|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (463:3): [True: 0, False: 326]
  |  Branch (463:3): [True: 326, False: 0]
  ------------------
  464|    326|  DEBUGASSERT(async->hostname[0]);
  ------------------
  |  | 1077|    326|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (464:3): [True: 0, False: 326]
  |  Branch (464:3): [True: 326, False: 0]
  ------------------
  465|    326|  if(async->doh) {
  ------------------
  |  Branch (465:6): [True: 0, False: 326]
  ------------------
  466|      0|    DEBUGASSERT(0); /* should not happen */
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (466:5): [Folded, False: 0]
  |  Branch (466:5): [Folded, False: 0]
  ------------------
  467|      0|    Curl_doh_cleanup(data, async);
  468|      0|  }
  469|       |
  470|       |  /* start clean, consider allocating this struct on demand */
  471|    326|  async->doh = dohp = curlx_calloc(1, sizeof(struct doh_probes));
  ------------------
  |  | 1485|    326|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  472|    326|  if(!dohp)
  ------------------
  |  Branch (472:6): [True: 0, False: 326]
  ------------------
  473|      0|    return CURLE_OUT_OF_MEMORY;
  474|       |
  475|    978|  for(i = 0; i < DOH_SLOT_COUNT; ++i) {
  ------------------
  |  Branch (475:14): [True: 652, False: 326]
  ------------------
  476|    652|    dohp->probe_resp[i].probe_mid = UINT32_MAX;
  477|    652|    curlx_dyn_init(&dohp->probe_resp[i].body, DYN_DOH_RESPONSE);
  ------------------
  |  |   65|    652|#define DYN_DOH_RESPONSE    3000
  ------------------
  478|    652|  }
  479|       |
  480|    326|  dohp->host = async->hostname;
  481|    326|  dohp->port = async->port;
  482|       |  /* We are making sub easy handles and want to be called back when
  483|       |   * one is done. */
  484|    326|  data->sub_xfer_done = doh_probe_done;
  485|       |
  486|       |  /* create IPv4 DoH request */
  487|    326|  if(async->dns_queries & CURL_DNSQ_A) {
  ------------------
  |  |   51|    326|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (487:6): [True: 321, False: 5]
  ------------------
  488|    321|    result = doh_probe_run(data, CURL_DNS_TYPE_A,
  489|    321|                           async->hostname, data->set.str[STRING_DOH],
  490|    321|                           data->multi, async->id,
  491|    321|                           &dohp->probe_resp[DOH_SLOT_IPV4].probe_mid);
  492|    321|    if(result)
  ------------------
  |  Branch (492:8): [True: 8, False: 313]
  ------------------
  493|      8|      goto error;
  494|    313|    dohp->pending++;
  495|    313|  }
  496|       |
  497|    318|#ifdef USE_IPV6
  498|    318|  if(async->dns_queries & CURL_DNSQ_AAAA) {
  ------------------
  |  |   52|    318|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (498:6): [True: 301, False: 17]
  ------------------
  499|       |    /* create IPv6 DoH request */
  500|    301|    result = doh_probe_run(data, CURL_DNS_TYPE_AAAA,
  501|    301|                           async->hostname, data->set.str[STRING_DOH],
  502|    301|                           data->multi, async->id,
  503|    301|                           &dohp->probe_resp[DOH_SLOT_IPV6].probe_mid);
  504|    301|    if(result)
  ------------------
  |  Branch (504:8): [True: 1, False: 300]
  ------------------
  505|      1|      goto error;
  506|    300|    dohp->pending++;
  507|    300|  }
  508|    317|#endif
  509|       |
  510|       |#ifdef USE_HTTPSRR
  511|       |  if(async->dns_queries & CURL_DNSQ_HTTPS) {
  512|       |    char *qname = NULL;
  513|       |    if(async->port != PORT_HTTPS) {
  514|       |      qname = curl_maprintf("_%d._https.%s", async->port, async->hostname);
  515|       |      if(!qname)
  516|       |        goto error;
  517|       |    }
  518|       |    result = doh_probe_run(data, CURL_DNS_TYPE_HTTPS,
  519|       |                           qname ? qname : async->hostname,
  520|       |                           data->set.str[STRING_DOH], data->multi,
  521|       |                           async->id,
  522|       |                           &dohp->probe_resp[DOH_SLOT_HTTPS_RR].probe_mid);
  523|       |    curlx_free(qname);
  524|       |    if(result)
  525|       |      goto error;
  526|       |    dohp->pending++;
  527|       |  }
  528|       |#endif
  529|    317|  return CURLE_OK;
  530|       |
  531|      9|error:
  532|      9|  Curl_doh_cleanup(data, async);
  533|      9|  return result;
  534|    318|}
de_init:
  720|    120|{
  721|    120|  int i;
  722|    120|  memset(de, 0, sizeof(*de));
  723|    120|  de->ttl = INT_MAX;
  724|    600|  for(i = 0; i < DOH_MAX_CNAME; i++)
  ------------------
  |  |  129|    600|#define DOH_MAX_CNAME 4
  ------------------
  |  Branch (724:14): [True: 480, False: 120]
  ------------------
  725|    480|    curlx_dyn_init(&de->cname[i], DYN_DOH_CNAME);
  ------------------
  |  |   66|    480|#define DYN_DOH_CNAME       256
  ------------------
  726|    120|}
de_cleanup:
 1059|    120|{
 1060|    120|  int i = 0;
 1061|    120|  for(i = 0; i < d->numcname; i++) {
  ------------------
  |  Branch (1061:14): [True: 0, False: 120]
  ------------------
 1062|      0|    curlx_dyn_free(&d->cname[i]);
 1063|      0|  }
 1064|       |#ifdef USE_HTTPSRR
 1065|       |  for(i = 0; i < d->numhttps_rrs; i++)
 1066|       |    curlx_safefree(d->https_rrs[i].val);
 1067|       |#endif
 1068|    120|}
Curl_doh_take_result:
 1237|    630|{
 1238|    630|  struct doh_probes *dohp = async->doh;
 1239|    630|  CURLcode result = CURLE_OK;
 1240|    630|  struct dohentry de;
 1241|       |
 1242|    630|  *pdns = NULL; /* defaults to no response */
 1243|    630|  if(!dohp)
  ------------------
  |  Branch (1243:6): [True: 0, False: 630]
  ------------------
 1244|      0|    return CURLE_OUT_OF_MEMORY;
 1245|       |
 1246|    630|  if(dohp->probe_resp[DOH_SLOT_IPV4].probe_mid == UINT32_MAX &&
  ------------------
  |  Branch (1246:6): [True: 8, False: 622]
  ------------------
 1247|      8|     dohp->probe_resp[DOH_SLOT_IPV6].probe_mid == UINT32_MAX) {
  ------------------
  |  Branch (1247:6): [True: 0, False: 8]
  ------------------
 1248|      0|    failf(data, "Could not DoH-resolve: %s", dohp->host);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1249|      0|    return async->for_proxy ?
  ------------------
  |  Branch (1249:12): [True: 0, False: 0]
  ------------------
 1250|      0|      CURLE_COULDNT_RESOLVE_PROXY : CURLE_COULDNT_RESOLVE_HOST;
 1251|      0|  }
 1252|    630|  else if(!dohp->pending) {
  ------------------
  |  Branch (1252:11): [True: 120, False: 510]
  ------------------
 1253|    120|    DOHcode rc[DOH_SLOT_COUNT];
 1254|    120|    bool negative = TRUE;
  ------------------
  |  | 1051|    120|#define TRUE true
  ------------------
 1255|    120|    int slot;
 1256|       |
 1257|    120|    memset(rc, 0, sizeof(rc));
 1258|       |    /* remove DoH handles from multi handle and close them */
 1259|    120|    doh_close(data, async);
 1260|       |    /* parse the responses, create the struct and return it! */
 1261|    120|    de_init(&de);
 1262|    360|    for(slot = 0; slot < DOH_SLOT_COUNT; slot++) {
  ------------------
  |  Branch (1262:19): [True: 240, False: 120]
  ------------------
 1263|    240|      struct doh_response *p = &dohp->probe_resp[slot];
 1264|    240|      if(!p->dnstype)
  ------------------
  |  Branch (1264:10): [True: 240, False: 0]
  ------------------
 1265|    240|        continue;
 1266|      0|      rc[slot] = doh_resp_decode(curlx_dyn_uptr(&p->body),
 1267|      0|                                 curlx_dyn_len(&p->body),
 1268|      0|                                 p->dnstype, &de);
 1269|       |      /* Failing without an NXDOMAIN answer - a SERVFAIL-class rcode or
 1270|       |         an undecodable response - says nothing about the name. Such a
 1271|       |         failure must not be cached as a negative entry. */
 1272|      0|      if(rc[slot] && (rc[slot] != DOH_DNS_NXDOMAIN))
  ------------------
  |  Branch (1272:10): [True: 0, False: 0]
  |  Branch (1272:22): [True: 0, False: 0]
  ------------------
 1273|      0|        negative = FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1274|      0|      if(rc[slot]) {
  ------------------
  |  Branch (1274:10): [True: 0, False: 0]
  ------------------
 1275|      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]
  |  |  ------------------
  ------------------
 1276|      0|                     doh_type2name(p->dnstype), dohp->host);
 1277|      0|      }
 1278|      0|    } /* next slot */
 1279|       |
 1280|    120|    if(!rc[DOH_SLOT_IPV4] || !rc[DOH_SLOT_IPV6]) {
  ------------------
  |  Branch (1280:8): [True: 120, False: 0]
  |  Branch (1280:30): [True: 0, False: 0]
  ------------------
 1281|       |      /* we have an address, of one kind or other */
 1282|    120|      struct Curl_dns_entry *dns;
 1283|    120|      struct Curl_addrinfo *ai;
 1284|       |
 1285|    120|      if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)) {
  ------------------
  |  |  326|    120|  (Curl_trc_is_verbose(data) &&          \
  |  |  ------------------
  |  |  |  |  319|    240|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 120, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 120]
  |  |  |  |  ------------------
  |  |  |  |  320|    240|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|    120|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1286|      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]
  |  |  ------------------
  ------------------
 1287|      0|        doh_show(data, &de);
 1288|      0|      }
 1289|       |
 1290|    120|      result = doh2ai(&de, dohp->host, dohp->port, &ai);
 1291|    120|      if(result) {
  ------------------
  |  Branch (1291:10): [True: 120, False: 0]
  ------------------
 1292|       |        /* a decoded response without any usable address, e.g. only
 1293|       |           CNAME records, is an authoritative "no data" answer */
 1294|    120|        if((result == CURLE_COULDNT_RESOLVE_HOST) && negative)
  ------------------
  |  Branch (1294:12): [True: 120, False: 0]
  |  Branch (1294:54): [True: 120, False: 0]
  ------------------
 1295|    120|          async->negative_answer = TRUE;
  ------------------
  |  | 1051|    120|#define TRUE true
  ------------------
 1296|    120|        goto error;
 1297|    120|      }
 1298|       |
 1299|       |      /* we got a response, create a dns entry. */
 1300|      0|      dns = Curl_dnscache_mk_entry(data, async->dns_queries,
 1301|      0|                                   &ai, dohp->host, dohp->port);
 1302|      0|      if(!dns) {
  ------------------
  |  Branch (1302:10): [True: 0, False: 0]
  ------------------
 1303|      0|        result = CURLE_OUT_OF_MEMORY;
 1304|      0|        goto error;
 1305|      0|      }
 1306|       |
 1307|       |      /* Now add and HTTPSRR information if we have */
 1308|       |#ifdef USE_HTTPSRR
 1309|       |      if(de.numhttps_rrs > 0 && result == CURLE_OK) {
 1310|       |        struct Curl_https_rrinfo *hrr = NULL;
 1311|       |        result = doh_resp_decode_httpsrr(data, de.https_rrs->val,
 1312|       |                                         de.https_rrs->len, &hrr);
 1313|       |        if(result) {
 1314|       |          infof(data, "Failed to decode HTTPS RR");
 1315|       |          Curl_dns_entry_unlink(data, &dns);
 1316|       |          goto error;
 1317|       |        }
 1318|       |        infof(data, "Some HTTPS RR to process");
 1319|       |#if defined(DEBUGBUILD) && defined(CURLVERBOSE)
 1320|       |        doh_print_httpsrr(data, hrr);
 1321|       |#endif
 1322|       |        Curl_dns_entry_set_https_rr(dns, hrr);
 1323|       |      }
 1324|       |#endif /* USE_HTTPSRR */
 1325|       |
 1326|       |      /* and add the entry to the cache */
 1327|      0|      result = Curl_dnscache_add(data, dns);
 1328|      0|      *pdns = dns;
 1329|      0|    } /* address processing done */
 1330|      0|    else {
 1331|       |      /* every query failed. Only NXDOMAIN answers for all of them
 1332|       |         make this a negative answer, eligible for caching. */
 1333|      0|      async->negative_answer = negative;
 1334|      0|      result = async->for_proxy ?
  ------------------
  |  Branch (1334:16): [True: 0, False: 0]
  ------------------
 1335|      0|        CURLE_COULDNT_RESOLVE_PROXY : CURLE_COULDNT_RESOLVE_HOST;
 1336|      0|    }
 1337|       |
 1338|    120|  } /* !dohp->pending */
 1339|    510|  else
 1340|       |    /* wait for pending DoH transactions to complete */
 1341|    510|    return CURLE_AGAIN;
 1342|       |
 1343|    120|error:
 1344|    120|  de_cleanup(&de);
 1345|    120|  Curl_doh_cleanup(data, async);
 1346|    120|  return result;
 1347|    630|}
Curl_doh_cleanup:
 1380|  1.32k|{
 1381|  1.32k|  struct doh_probes *dohp = async->doh;
 1382|  1.32k|  if(dohp) {
  ------------------
  |  Branch (1382:6): [True: 326, False: 1.00k]
  ------------------
 1383|    326|    int i;
 1384|    326|    doh_close(data, async);
 1385|    978|    for(i = 0; i < DOH_SLOT_COUNT; ++i) {
  ------------------
  |  Branch (1385:16): [True: 652, False: 326]
  ------------------
 1386|    652|      curlx_dyn_free(&dohp->probe_resp[i].body);
 1387|    652|    }
 1388|       |    curlx_safefree(async->doh);
  ------------------
  |  | 1332|    326|  do {                      \
  |  | 1333|    326|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|    326|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|    326|    (ptr) = NULL;           \
  |  | 1335|    326|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 326]
  |  |  ------------------
  ------------------
 1389|    326|  }
 1390|  1.32k|}
doh.c:doh_probe_done:
  222|    278|{
  223|    278|  struct Curl_resolv_async *async = NULL;
  224|    278|  struct doh_probes *dohp = NULL;
  225|    278|  struct doh_request *doh_req = NULL;
  226|    278|  int i;
  227|       |
  228|    278|  doh_req = Curl_meta_get(doh, CURL_EZM_DOH_PROBE);
  ------------------
  |  |   85|    278|#define CURL_EZM_DOH_PROBE   "ezm:doh-p"
  ------------------
  229|    278|  if(!doh_req) {
  ------------------
  |  Branch (229:6): [True: 0, False: 278]
  ------------------
  230|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (230:5): [Folded, False: 0]
  |  Branch (230:5): [Folded, False: 0]
  ------------------
  231|      0|    return;
  232|      0|  }
  233|       |
  234|    278|  async = Curl_async_get(data, doh_req->resolv_id);
  235|    278|  if(!async) {
  ------------------
  |  Branch (235:6): [True: 0, False: 278]
  ------------------
  236|      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]
  |  |  ------------------
  ------------------
  237|      0|                 doh_req->resolv_id);
  238|      0|    return;
  239|      0|  }
  240|    278|  dohp = async->doh;
  241|       |
  242|    407|  for(i = 0; i < DOH_SLOT_COUNT; ++i) {
  ------------------
  |  Branch (242:14): [True: 407, False: 0]
  ------------------
  243|    407|    if(dohp->probe_resp[i].probe_mid == doh->mid)
  ------------------
  |  Branch (243:8): [True: 278, False: 129]
  ------------------
  244|    278|      break;
  245|    407|  }
  246|       |  /* We really should have found the slot where to store the response */
  247|    278|  if(i >= DOH_SLOT_COUNT) {
  ------------------
  |  Branch (247:6): [True: 0, False: 278]
  ------------------
  248|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (248:5): [Folded, False: 0]
  |  Branch (248:5): [Folded, False: 0]
  ------------------
  249|      0|    failf(data, "DoH: unknown sub request done");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  250|      0|    return;
  251|      0|  }
  252|       |
  253|    278|  dohp->pending--;
  254|    278|  infof(doh, "a DoH request is completed, %u to go", dohp->pending);
  ------------------
  |  |  143|    278|  do {                               \
  |  |  144|    278|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    278|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 278, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 278]
  |  |  |  |  ------------------
  |  |  |  |  320|    278|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|    278|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    278|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 278]
  |  |  ------------------
  ------------------
  255|    278|  dohp->probe_resp[i].result = result;
  256|       |  /* We expect either the meta data still to exist or the sub request
  257|       |   * to have already failed. */
  258|    278|  if(!result) {
  ------------------
  |  Branch (258:6): [True: 0, False: 278]
  ------------------
  259|      0|    dohp->probe_resp[i].dnstype = doh_req->dnstype;
  260|      0|    result = curlx_dyn_addn(&dohp->probe_resp[i].body,
  261|      0|                            curlx_dyn_ptr(&doh_req->resp_body),
  262|      0|                            curlx_dyn_len(&doh_req->resp_body));
  263|      0|  }
  264|    278|  Curl_meta_remove(doh, CURL_EZM_DOH_PROBE);
  ------------------
  |  |   85|    278|#define CURL_EZM_DOH_PROBE   "ezm:doh-p"
  ------------------
  265|       |
  266|    278|  if(result)
  ------------------
  |  Branch (266:6): [True: 278, False: 0]
  ------------------
  267|    278|    infof(doh, "DoH request %s", curl_easy_strerror(result));
  ------------------
  |  |  143|    278|  do {                               \
  |  |  144|    278|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    278|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 278, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 278]
  |  |  |  |  ------------------
  |  |  |  |  320|    278|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|    278|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    278|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 278]
  |  |  ------------------
  ------------------
  268|       |
  269|    278|  if(!dohp->pending) {
  ------------------
  |  Branch (269:6): [True: 136, False: 142]
  ------------------
  270|       |    /* DoH completed, run the transfer picking up the results */
  271|    136|    Curl_multi_mark_dirty(data);
  272|    136|  }
  273|    278|}
doh.c:doh_probe_run:
  302|    622|{
  303|    622|  struct Curl_easy *doh = NULL;
  304|    622|  CURLcode result = CURLE_OK;
  305|    622|  timediff_t timeout_ms;
  306|    622|  struct doh_request *doh_req;
  307|    622|  DOHcode d;
  308|       |
  309|    622|  *pmid = UINT32_MAX;
  310|       |
  311|    622|  doh_req = curlx_calloc(1, sizeof(*doh_req));
  ------------------
  |  | 1485|    622|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  312|    622|  if(!doh_req)
  ------------------
  |  Branch (312:6): [True: 0, False: 622]
  ------------------
  313|      0|    return CURLE_OUT_OF_MEMORY;
  314|    622|  doh_req->resolv_id = resolv_id;
  315|    622|  doh_req->dnstype = dnstype;
  316|    622|  curlx_dyn_init(&doh_req->resp_body, DYN_DOH_RESPONSE);
  ------------------
  |  |   65|    622|#define DYN_DOH_RESPONSE    3000
  ------------------
  317|       |
  318|    622|  d = doh_req_encode(host, dnstype, doh_req->req_body,
  319|    622|                     sizeof(doh_req->req_body),
  320|    622|                     &doh_req->req_body_len);
  321|    622|  if(d) {
  ------------------
  |  Branch (321:6): [True: 9, False: 613]
  ------------------
  322|      9|    failf(data, "Failed to encode DoH packet [%d]", (int)d);
  ------------------
  |  |   62|      9|#define failf Curl_failf
  ------------------
  323|      9|    result = CURLE_OUT_OF_MEMORY;
  324|      9|    goto error;
  325|      9|  }
  326|       |
  327|    613|  timeout_ms = Curl_timeleft_ms(data);
  328|    613|  if(timeout_ms < 0) {
  ------------------
  |  Branch (328:6): [True: 0, False: 613]
  ------------------
  329|      0|    result = CURLE_OPERATION_TIMEDOUT;
  330|      0|    goto error;
  331|      0|  }
  332|       |
  333|    613|  doh_req->req_hds =
  334|    613|    curl_slist_append(NULL, "Content-Type: application/dns-message");
  335|    613|  if(!doh_req->req_hds) {
  ------------------
  |  Branch (335:6): [True: 0, False: 613]
  ------------------
  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|    613|  result = Curl_open(&doh);
  342|    613|  if(result)
  ------------------
  |  Branch (342:6): [True: 0, False: 613]
  ------------------
  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|    613|  VERBOSE(doh->state.feat = &Curl_trc_feat_dns);
  ------------------
  |  | 1623|    613|#define VERBOSE(x) x
  ------------------
  348|    613|  ERROR_CHECK_SETOPT(CURLOPT_URL, url);
  ------------------
  |  |  288|    613|  do {                                                  \
  |  |  289|    613|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    613|  __extension__({                                                       \
  |  |  |  |   46|    613|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 613, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    613|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   108k|#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: 613]
  |  |  |  |  |  |  |  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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    613|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    613|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    613|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    613|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    613|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    613|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    613|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    613|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    613|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    613|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    613|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    613|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    613|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    613|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    613|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    613|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    613|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    613|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    613|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    613|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    613|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    613|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    613|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    613|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    613|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    613|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    613|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    613|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    613|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    613|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    613|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    613|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    613|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    613|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    613|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    613|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    613|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    613|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    613|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    613|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    613|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    613|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    613|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    613|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    613|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    613|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    613|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    613|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    613|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    613|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    613|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    613|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    613|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    613|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    613|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    613|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    613|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    613|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    613|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    613|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    613|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    613|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    613|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    613|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    613|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    613|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    613|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    613|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    613|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    613|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    613|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    613|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    613|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    613|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    613|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    613|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    613|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    613|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    613|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    613|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    613|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    613|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    613|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    613|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    613|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    613|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    613|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    613|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    613|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    613|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    613|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    613|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    613|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    613|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    613|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    613|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    613|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    613|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    613|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    613|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    613|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    613|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    613|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    613|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    613|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    613|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    613|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    613|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    613|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    613|      )                                                                 \
  |  |  |  |  158|    613|    }                                                                   \
  |  |  |  |  159|    613|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    613|  })
  |  |  ------------------
  |  |  290|    613|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 613]
  |  |  ------------------
  |  |  291|    613|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    613|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    613|      goto error;                                       \
  |  |  294|    613|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 613]
  |  |  ------------------
  ------------------
  349|    613|  ERROR_CHECK_SETOPT(CURLOPT_DEFAULT_PROTOCOL, "https");
  ------------------
  |  |  288|    613|  do {                                                  \
  |  |  289|    613|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    613|  __extension__({                                                       \
  |  |  |  |   46|    613|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 613, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    613|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   108k|#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: 613]
  |  |  |  |  |  |  |  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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    613|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    613|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    613|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    613|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    613|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    613|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    613|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    613|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    613|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    613|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    613|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    613|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    613|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    613|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    613|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    613|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    613|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    613|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    613|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    613|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    613|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    613|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    613|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    613|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    613|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    613|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    613|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    613|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    613|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    613|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    613|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    613|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    613|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    613|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    613|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    613|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    613|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    613|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    613|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    613|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    613|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    613|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    613|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    613|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    613|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    613|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    613|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    613|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    613|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    613|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    613|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    613|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    613|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    613|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    613|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    613|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    613|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    613|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    613|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    613|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    613|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    613|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    613|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    613|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    613|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    613|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    613|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    613|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    613|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    613|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    613|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    613|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    613|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    613|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    613|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    613|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    613|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    613|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    613|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    613|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    613|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    613|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    613|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    613|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    613|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    613|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    613|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    613|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    613|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    613|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    613|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    613|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    613|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    613|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    613|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    613|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    613|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    613|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    613|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    613|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    613|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    613|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    613|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    613|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    613|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    613|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    613|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    613|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    613|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    613|      )                                                                 \
  |  |  |  |  158|    613|    }                                                                   \
  |  |  |  |  159|    613|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    613|  })
  |  |  ------------------
  |  |  290|    613|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 613]
  |  |  ------------------
  |  |  291|    613|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    613|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    613|      goto error;                                       \
  |  |  294|    613|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 613]
  |  |  ------------------
  ------------------
  350|    613|  ERROR_CHECK_SETOPT(CURLOPT_WRITEFUNCTION, doh_probe_write_cb);
  ------------------
  |  |  288|    613|  do {                                                  \
  |  |  289|    613|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    613|  __extension__({                                                       \
  |  |  |  |   46|    613|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 613, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    613|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   115k|#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: 613]
  |  |  |  |  |  |  |  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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    613|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    613|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    613|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    613|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    613|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    613|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    613|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    613|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    613|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    613|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    613|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    613|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    613|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    613|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    613|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    613|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    613|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    613|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    613|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    613|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    613|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    613|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    613|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    613|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    613|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    613|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    613|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    613|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    613|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    613|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    613|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    613|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    613|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    613|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    613|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    613|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    613|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    613|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    613|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    613|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    613|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    613|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    613|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    613|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    613|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    613|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    613|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    613|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    613|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    613|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    613|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    613|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    613|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    613|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    613|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    613|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    613|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    613|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    613|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    613|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    613|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    613|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    613|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    613|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    613|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    613|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    613|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    613|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    613|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    613|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    613|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    613|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    613|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    613|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    613|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    613|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    613|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    613|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    613|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    613|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    613|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    613|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    613|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    613|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    613|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    613|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    613|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    613|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    613|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    613|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    613|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    613|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    613|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    613|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    613|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    613|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    613|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    613|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    613|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    613|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    613|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    613|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    613|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    613|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    613|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    613|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    613|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    613|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    613|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    613|      )                                                                 \
  |  |  |  |  158|    613|    }                                                                   \
  |  |  |  |  159|    613|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    613|  })
  |  |  ------------------
  |  |  290|    613|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 613]
  |  |  ------------------
  |  |  291|    613|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    613|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    613|      goto error;                                       \
  |  |  294|    613|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 613]
  |  |  ------------------
  ------------------
  351|    613|  ERROR_CHECK_SETOPT(CURLOPT_WRITEDATA, doh);
  ------------------
  |  |  288|    613|  do {                                                  \
  |  |  289|    613|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    613|  __extension__({                                                       \
  |  |  |  |   46|    613|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 613, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    613|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   105k|#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: 613]
  |  |  |  |  |  |  |  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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    613|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    613|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    613|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    613|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    613|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    613|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    613|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    613|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    613|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    613|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    613|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    613|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    613|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    613|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    613|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    613|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    613|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    613|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    613|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    613|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    613|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    613|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    613|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    613|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    613|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    613|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    613|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    613|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    613|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    613|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    613|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    613|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    613|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    613|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    613|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    613|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    613|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    613|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    613|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    613|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    613|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    613|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    613|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    613|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    613|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    613|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    613|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    613|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    613|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    613|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    613|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    613|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    613|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    613|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    613|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    613|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    613|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    613|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    613|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    613|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    613|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    613|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    613|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    613|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    613|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    613|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    613|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    613|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    613|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    613|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    613|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    613|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    613|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    613|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    613|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    613|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    613|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    613|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    613|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    613|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    613|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    613|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    613|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    613|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    613|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    613|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    613|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    613|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    613|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    613|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    613|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    613|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    613|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    613|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    613|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    613|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    613|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    613|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    613|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    613|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    613|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    613|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    613|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    613|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    613|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    613|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    613|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    613|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    613|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    613|      )                                                                 \
  |  |  |  |  158|    613|    }                                                                   \
  |  |  |  |  159|    613|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    613|  })
  |  |  ------------------
  |  |  290|    613|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 613]
  |  |  ------------------
  |  |  291|    613|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    613|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    613|      goto error;                                       \
  |  |  294|    613|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 613]
  |  |  ------------------
  ------------------
  352|    613|  ERROR_CHECK_SETOPT(CURLOPT_POSTFIELDS, doh_req->req_body);
  ------------------
  |  |  288|    613|  do {                                                  \
  |  |  289|    613|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    613|  __extension__({                                                       \
  |  |  |  |   46|    613|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 613, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    613|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   107k|#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: 613]
  |  |  |  |  |  |  |  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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [True: 613, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    613|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    613|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    613|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    613|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    613|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    613|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    613|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    613|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    613|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    613|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    613|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    613|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    613|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    613|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    613|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    613|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    613|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    613|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    613|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    613|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    613|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    613|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    613|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    613|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    613|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    613|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    613|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    613|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    613|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    613|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    613|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    613|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    613|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    613|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    613|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    613|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    613|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    613|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    613|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    613|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    613|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    613|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    613|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    613|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    613|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    613|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    613|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    613|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    613|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    613|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    613|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    613|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    613|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    613|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    613|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    613|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    613|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    613|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    613|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    613|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    613|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    613|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    613|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    613|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    613|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    613|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    613|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    613|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    613|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    613|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    613|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    613|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    613|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    613|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    613|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    613|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    613|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    613|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    613|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    613|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    613|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    613|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    613|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    613|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    613|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    613|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    613|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    613|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    613|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    613|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    613|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    613|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    613|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    613|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    613|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    613|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    613|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    613|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    613|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    613|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    613|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    613|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    613|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    613|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    613|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    613|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    613|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    613|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    613|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    613|      )                                                                 \
  |  |  |  |  158|    613|    }                                                                   \
  |  |  |  |  159|    613|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    613|  })
  |  |  ------------------
  |  |  290|    613|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 613]
  |  |  ------------------
  |  |  291|    613|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    613|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    613|      goto error;                                       \
  |  |  294|    613|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 613]
  |  |  ------------------
  ------------------
  353|    613|  ERROR_CHECK_SETOPT(CURLOPT_POSTFIELDSIZE, (long)doh_req->req_body_len);
  ------------------
  |  |  288|    613|  do {                                                  \
  |  |  289|    613|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    613|  __extension__({                                                       \
  |  |  |  |   46|    613|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 613, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    613|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   106k|#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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    613|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    613|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    613|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    613|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    613|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    613|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    613|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    613|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    613|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    613|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    613|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    613|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    613|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    613|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    613|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    613|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    613|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    613|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    613|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    613|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    613|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    613|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    613|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    613|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    613|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    613|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    613|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    613|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    613|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    613|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    613|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    613|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    613|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    613|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    613|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    613|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    613|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    613|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    613|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    613|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    613|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    613|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    613|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    613|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    613|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    613|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    613|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    613|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    613|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    613|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    613|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    613|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    613|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    613|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    613|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    613|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    613|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    613|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    613|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    613|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    613|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    613|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    613|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    613|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    613|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    613|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    613|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    613|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    613|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    613|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    613|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    613|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    613|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    613|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    613|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    613|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    613|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    613|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    613|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    613|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    613|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    613|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    613|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    613|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    613|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    613|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    613|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    613|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    613|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    613|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    613|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    613|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    613|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    613|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    613|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    613|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    613|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    613|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    613|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    613|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    613|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    613|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    613|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    613|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    613|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    613|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    613|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    613|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    613|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    613|      )                                                                 \
  |  |  |  |  158|    613|    }                                                                   \
  |  |  |  |  159|    613|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    613|  })
  |  |  ------------------
  |  |  290|    613|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 613]
  |  |  ------------------
  |  |  291|    613|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    613|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    613|      goto error;                                       \
  |  |  294|    613|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 613]
  |  |  ------------------
  ------------------
  354|    613|  ERROR_CHECK_SETOPT(CURLOPT_HTTPHEADER, doh_req->req_hds);
  ------------------
  |  |  288|    613|  do {                                                  \
  |  |  289|    613|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    613|  __extension__({                                                       \
  |  |  |  |   46|    613|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 613, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    613|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   107k|#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: 613]
  |  |  |  |  |  |  |  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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    613|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    613|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    613|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    613|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    613|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    613|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    613|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    613|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    613|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    613|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    613|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    613|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    613|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    613|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    613|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    613|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    613|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    613|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    613|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    613|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    613|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    613|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    613|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    613|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    613|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    613|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    613|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    613|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    613|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    613|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    613|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    613|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    613|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    613|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    613|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    613|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    613|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    613|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    613|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    613|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    613|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    613|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    613|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    613|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    613|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    613|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    613|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    613|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    613|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    613|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    613|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    613|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    613|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    613|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    613|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    613|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    613|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    613|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    613|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    613|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    613|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    613|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    613|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    613|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    613|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    613|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    613|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    613|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    613|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    613|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    613|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    613|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    613|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    613|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    613|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    613|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    613|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    613|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    613|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    613|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    613|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    613|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    613|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    613|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    613|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    613|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    613|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    613|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    613|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    613|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    613|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    613|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    613|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    613|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    613|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    613|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    613|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    613|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    613|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    613|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    613|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    613|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    613|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    613|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    613|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    613|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    613|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    613|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    613|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    613|      )                                                                 \
  |  |  |  |  158|    613|    }                                                                   \
  |  |  |  |  159|    613|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    613|  })
  |  |  ------------------
  |  |  290|    613|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 613]
  |  |  ------------------
  |  |  291|    613|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    613|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    613|      goto error;                                       \
  |  |  294|    613|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 613]
  |  |  ------------------
  ------------------
  355|    613|#ifdef USE_HTTP2
  356|    613|  ERROR_CHECK_SETOPT(CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
  ------------------
  |  |  288|    613|  do {                                                  \
  |  |  289|    613|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    613|  __extension__({                                                       \
  |  |  |  |   46|    613|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 613, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    613|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   106k|#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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    613|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    613|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    613|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    613|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    613|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    613|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    613|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    613|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    613|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    613|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    613|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    613|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    613|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    613|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    613|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    613|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    613|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    613|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    613|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    613|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    613|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    613|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    613|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    613|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    613|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    613|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    613|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    613|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    613|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    613|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    613|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    613|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    613|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    613|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    613|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    613|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    613|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    613|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    613|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    613|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    613|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    613|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    613|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    613|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    613|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    613|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    613|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    613|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    613|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    613|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    613|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    613|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    613|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    613|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    613|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    613|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    613|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    613|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    613|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    613|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    613|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    613|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    613|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    613|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    613|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    613|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    613|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    613|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    613|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    613|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    613|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    613|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    613|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    613|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    613|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    613|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    613|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    613|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    613|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    613|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    613|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    613|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    613|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    613|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    613|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    613|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    613|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    613|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    613|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    613|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    613|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    613|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    613|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    613|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    613|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    613|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    613|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    613|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    613|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    613|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    613|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    613|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    613|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    613|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    613|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    613|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    613|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    613|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    613|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    613|      )                                                                 \
  |  |  |  |  158|    613|    }                                                                   \
  |  |  |  |  159|    613|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    613|  })
  |  |  ------------------
  |  |  290|    613|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 613]
  |  |  ------------------
  |  |  291|    613|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    613|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    613|      goto error;                                       \
  |  |  294|    613|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 613]
  |  |  ------------------
  ------------------
  357|    613|  ERROR_CHECK_SETOPT(CURLOPT_PIPEWAIT, 1L);
  ------------------
  |  |  288|    613|  do {                                                  \
  |  |  289|    613|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    613|  __extension__({                                                       \
  |  |  |  |   46|    613|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 613, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    613|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   106k|#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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    613|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    613|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    613|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    613|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    613|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    613|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    613|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    613|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    613|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    613|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    613|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    613|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    613|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    613|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    613|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    613|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    613|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    613|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    613|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    613|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    613|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    613|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    613|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    613|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    613|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    613|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    613|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    613|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    613|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    613|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    613|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    613|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    613|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    613|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    613|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    613|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    613|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    613|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    613|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    613|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    613|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    613|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    613|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    613|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    613|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    613|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    613|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    613|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    613|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    613|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    613|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    613|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    613|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    613|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    613|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    613|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    613|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    613|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    613|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    613|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    613|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    613|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    613|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    613|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    613|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    613|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    613|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    613|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    613|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    613|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    613|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    613|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    613|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    613|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    613|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    613|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    613|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    613|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    613|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    613|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    613|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    613|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    613|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    613|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    613|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    613|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    613|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    613|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    613|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    613|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    613|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    613|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    613|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    613|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    613|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    613|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    613|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    613|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    613|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    613|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    613|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    613|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    613|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    613|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    613|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    613|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    613|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    613|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    613|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    613|      )                                                                 \
  |  |  |  |  158|    613|    }                                                                   \
  |  |  |  |  159|    613|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    613|  })
  |  |  ------------------
  |  |  290|    613|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 613]
  |  |  ------------------
  |  |  291|    613|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    613|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    613|      goto error;                                       \
  |  |  294|    613|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 613]
  |  |  ------------------
  ------------------
  358|    613|#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|    613|  ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
  ------------------
  |  |  288|    613|  do {                                                  \
  |  |  289|    613|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    613|  __extension__({                                                       \
  |  |  |  |   46|    613|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 613, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    613|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   106k|#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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    613|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    613|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    613|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    613|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    613|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    613|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    613|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    613|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    613|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    613|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    613|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    613|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    613|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    613|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    613|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    613|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    613|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    613|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    613|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    613|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    613|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    613|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    613|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    613|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    613|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    613|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    613|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    613|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    613|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    613|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    613|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    613|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    613|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    613|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    613|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    613|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    613|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    613|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    613|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    613|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    613|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    613|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    613|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    613|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    613|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    613|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    613|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    613|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    613|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    613|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    613|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    613|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    613|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    613|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    613|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    613|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    613|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    613|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    613|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    613|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    613|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    613|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    613|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    613|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    613|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    613|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    613|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    613|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    613|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    613|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    613|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    613|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    613|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    613|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    613|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    613|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    613|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    613|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    613|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    613|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    613|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    613|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    613|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    613|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    613|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    613|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    613|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    613|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    613|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    613|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    613|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    613|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    613|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    613|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    613|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    613|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    613|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    613|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    613|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    613|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    613|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    613|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    613|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    613|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    613|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    613|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    613|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    613|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    613|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    613|      )                                                                 \
  |  |  |  |  158|    613|    }                                                                   \
  |  |  |  |  159|    613|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    613|  })
  |  |  ------------------
  |  |  290|    613|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 613]
  |  |  ------------------
  |  |  291|    613|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    613|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    613|      goto error;                                       \
  |  |  294|    613|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 613]
  |  |  ------------------
  ------------------
  365|    613|#endif
  366|    613|  ERROR_CHECK_SETOPT(CURLOPT_TIMEOUT_MS, (long)timeout_ms);
  ------------------
  |  |  288|    613|  do {                                                  \
  |  |  289|    613|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    613|  __extension__({                                                       \
  |  |  |  |   46|    613|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 613, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    613|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   106k|#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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    613|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    613|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    613|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    613|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    613|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    613|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    613|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    613|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    613|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    613|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    613|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    613|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    613|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    613|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    613|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    613|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    613|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    613|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    613|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    613|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    613|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    613|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    613|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    613|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    613|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    613|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    613|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    613|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    613|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    613|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    613|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    613|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    613|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    613|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    613|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    613|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    613|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    613|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    613|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    613|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    613|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    613|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    613|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    613|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    613|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    613|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    613|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    613|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    613|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    613|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    613|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    613|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    613|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    613|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    613|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    613|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    613|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    613|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    613|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    613|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    613|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    613|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    613|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    613|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    613|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    613|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    613|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    613|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    613|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    613|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    613|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    613|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    613|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    613|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    613|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    613|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    613|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    613|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    613|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    613|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    613|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    613|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    613|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    613|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    613|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    613|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    613|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    613|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    613|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    613|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    613|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    613|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    613|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    613|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    613|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    613|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    613|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    613|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    613|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    613|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    613|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    613|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    613|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    613|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    613|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    613|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    613|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    613|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    613|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    613|      )                                                                 \
  |  |  |  |  158|    613|    }                                                                   \
  |  |  |  |  159|    613|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    613|  })
  |  |  ------------------
  |  |  290|    613|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 613]
  |  |  ------------------
  |  |  291|    613|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    613|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    613|      goto error;                                       \
  |  |  294|    613|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 613]
  |  |  ------------------
  ------------------
  367|    613|  ERROR_CHECK_SETOPT(CURLOPT_SHARE, (CURLSH *)data->share);
  ------------------
  |  |  288|    613|  do {                                                  \
  |  |  289|    613|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    613|  __extension__({                                                       \
  |  |  |  |   46|    613|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 613, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    613|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   106k|#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: 613]
  |  |  |  |  |  |  |  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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 613, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    613|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    613|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    613|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    613|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    613|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    613|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    613|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    613|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    613|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    613|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    613|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    613|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    613|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    613|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    613|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    613|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    613|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    613|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    613|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    613|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    613|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    613|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    613|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    613|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    613|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    613|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    613|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    613|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    613|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    613|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    613|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    613|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    613|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    613|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    613|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    613|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    613|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    613|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    613|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    613|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    613|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    613|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    613|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    613|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    613|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    613|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    613|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    613|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    613|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    613|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    613|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    613|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    613|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    613|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    613|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    613|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    613|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    613|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    613|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    613|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    613|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    613|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    613|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    613|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    613|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    613|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    613|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    613|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    613|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    613|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    613|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    613|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    613|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    613|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    613|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    613|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    613|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    613|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    613|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    613|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    613|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    613|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    613|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    613|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    613|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    613|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    613|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    613|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    613|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    613|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    613|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    613|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    613|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    613|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    613|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    613|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    613|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    613|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    613|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    613|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    613|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    613|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    613|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    613|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    613|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    613|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    613|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    613|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    613|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    613|      )                                                                 \
  |  |  |  |  158|    613|    }                                                                   \
  |  |  |  |  159|    613|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    613|  })
  |  |  ------------------
  |  |  290|    613|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 613]
  |  |  ------------------
  |  |  291|    613|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    613|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    613|      goto error;                                       \
  |  |  294|    613|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 613]
  |  |  ------------------
  ------------------
  368|    613|  if(data->set.err && data->set.err != stderr)
  ------------------
  |  Branch (368:6): [True: 613, False: 0]
  |  Branch (368:23): [True: 0, False: 613]
  ------------------
  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|    613|  if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns))
  ------------------
  |  |  326|    613|  (Curl_trc_is_verbose(data) &&          \
  |  |  ------------------
  |  |  |  |  319|  1.22k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 613, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 613]
  |  |  |  |  ------------------
  |  |  |  |  320|  1.22k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|    613|   (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|    613|  if(data->set.no_signal)
  ------------------
  |  Branch (372:6): [True: 5, False: 608]
  ------------------
  373|      5|    ERROR_CHECK_SETOPT(CURLOPT_NOSIGNAL, 1L);
  ------------------
  |  |  288|      5|  do {                                                  \
  |  |  289|      5|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      5|  __extension__({                                                       \
  |  |  |  |   46|      5|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 5, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      5|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|    870|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      5|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      5|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      5|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      5|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      5|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      5|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      5|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      5|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      5|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      5|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      5|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      5|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      5|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      5|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      5|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      5|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      5|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      5|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      5|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      5|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      5|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      5|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      5|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      5|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      5|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      5|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      5|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      5|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      5|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      5|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      5|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      5|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      5|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      5|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      5|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      5|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      5|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      5|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      5|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      5|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      5|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      5|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      5|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      5|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      5|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      5|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      5|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      5|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      5|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      5|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      5|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      5|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      5|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      5|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      5|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      5|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      5|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      5|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      5|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      5|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      5|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      5|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      5|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      5|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      5|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      5|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      5|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      5|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      5|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      5|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      5|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      5|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      5|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      5|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      5|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      5|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      5|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      5|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      5|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      5|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      5|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      5|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      5|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      5|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      5|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      5|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      5|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      5|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      5|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      5|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      5|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      5|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      5|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      5|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      5|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      5|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      5|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      5|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      5|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      5|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      5|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      5|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      5|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      5|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      5|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      5|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      5|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      5|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      5|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      5|      )                                                                 \
  |  |  |  |  158|      5|    }                                                                   \
  |  |  |  |  159|      5|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      5|  })
  |  |  ------------------
  |  |  290|      5|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 5]
  |  |  ------------------
  |  |  291|      5|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      5|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      5|      goto error;                                       \
  |  |  294|      5|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 5]
  |  |  ------------------
  ------------------
  374|       |
  375|    613|  ERROR_CHECK_SETOPT(CURLOPT_SSL_VERIFYHOST,
  ------------------
  |  |  288|    613|  do {                                                  \
  |  |  289|    613|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    613|  __extension__({                                                       \
  |  |  |  |   46|    613|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 613, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    613|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   106k|#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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    613|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    613|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    613|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    613|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    613|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    613|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    613|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    613|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    613|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    613|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    613|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    613|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    613|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    613|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    613|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    613|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    613|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    613|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    613|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    613|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    613|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    613|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    613|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    613|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    613|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    613|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    613|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    613|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    613|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    613|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    613|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    613|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    613|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    613|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    613|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    613|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    613|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    613|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    613|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    613|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    613|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    613|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    613|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    613|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    613|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    613|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    613|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    613|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    613|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    613|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    613|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    613|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    613|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    613|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    613|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    613|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    613|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    613|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    613|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    613|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    613|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    613|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    613|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    613|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    613|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    613|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    613|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    613|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    613|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    613|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    613|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    613|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    613|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    613|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    613|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    613|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    613|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    613|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    613|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    613|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    613|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    613|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    613|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    613|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    613|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    613|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    613|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    613|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    613|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    613|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    613|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    613|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    613|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    613|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    613|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    613|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    613|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    613|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    613|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    613|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    613|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    613|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    613|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    613|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    613|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    613|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    613|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    613|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    613|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    613|      )                                                                 \
  |  |  |  |  158|    613|    }                                                                   \
  |  |  |  |  159|  1.22k|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (159:40): [True: 613, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  160|    613|  })
  |  |  ------------------
  |  |  290|    613|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 613]
  |  |  ------------------
  |  |  291|    613|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    613|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    613|      goto error;                                       \
  |  |  294|    613|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 613]
  |  |  ------------------
  ------------------
  376|    613|                     data->set.doh_verifyhost ? 2L : 0L);
  377|    613|  ERROR_CHECK_SETOPT(CURLOPT_SSL_VERIFYPEER,
  ------------------
  |  |  288|    613|  do {                                                  \
  |  |  289|    613|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    613|  __extension__({                                                       \
  |  |  |  |   46|    613|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 613, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    613|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   106k|#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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    613|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    613|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    613|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    613|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    613|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    613|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    613|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    613|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    613|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    613|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    613|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    613|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    613|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    613|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    613|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    613|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    613|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    613|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    613|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    613|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    613|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    613|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    613|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    613|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    613|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    613|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    613|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    613|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    613|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    613|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    613|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    613|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    613|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    613|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    613|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    613|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    613|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    613|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    613|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    613|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    613|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    613|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    613|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    613|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    613|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    613|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    613|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    613|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    613|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    613|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    613|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    613|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    613|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    613|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    613|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    613|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    613|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    613|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    613|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    613|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    613|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    613|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    613|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    613|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    613|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    613|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    613|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    613|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    613|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    613|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    613|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    613|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    613|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    613|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    613|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    613|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    613|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    613|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    613|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    613|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    613|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    613|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    613|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    613|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    613|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    613|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    613|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    613|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    613|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    613|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    613|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    613|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    613|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    613|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    613|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    613|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    613|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    613|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    613|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    613|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    613|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    613|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    613|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    613|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    613|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    613|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    613|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    613|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    613|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    613|      )                                                                 \
  |  |  |  |  158|    613|    }                                                                   \
  |  |  |  |  159|  1.22k|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (159:40): [True: 613, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  160|    613|  })
  |  |  ------------------
  |  |  290|    613|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 613]
  |  |  ------------------
  |  |  291|    613|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    613|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    613|      goto error;                                       \
  |  |  294|    613|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 613]
  |  |  ------------------
  ------------------
  378|    613|                     data->set.doh_verifypeer ? 1L : 0L);
  379|    613|  ERROR_CHECK_SETOPT(CURLOPT_SSL_VERIFYSTATUS,
  ------------------
  |  |  288|    613|  do {                                                  \
  |  |  289|    613|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    613|  __extension__({                                                       \
  |  |  |  |   46|    613|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 613, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    613|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   106k|#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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    613|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    613|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    613|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    613|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    613|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    613|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    613|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    613|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    613|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    613|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    613|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    613|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    613|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    613|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    613|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    613|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    613|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    613|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    613|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    613|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    613|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    613|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    613|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    613|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    613|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    613|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    613|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    613|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    613|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    613|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    613|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    613|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    613|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    613|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    613|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    613|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    613|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    613|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    613|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    613|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    613|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    613|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    613|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    613|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    613|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    613|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    613|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    613|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    613|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    613|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    613|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    613|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    613|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    613|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    613|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    613|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    613|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    613|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    613|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    613|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    613|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    613|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    613|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    613|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    613|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    613|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    613|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    613|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    613|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    613|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    613|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    613|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    613|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    613|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    613|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    613|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    613|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    613|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    613|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    613|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    613|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    613|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    613|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    613|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    613|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    613|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    613|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    613|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    613|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    613|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    613|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    613|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    613|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    613|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    613|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    613|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    613|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    613|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    613|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    613|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    613|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    613|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    613|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    613|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    613|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    613|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    613|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    613|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    613|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    613|      )                                                                 \
  |  |  |  |  158|    613|    }                                                                   \
  |  |  |  |  159|  1.22k|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (159:40): [True: 2, False: 611]
  |  |  |  |  ------------------
  |  |  |  |  160|    613|  })
  |  |  ------------------
  |  |  290|    613|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 613]
  |  |  ------------------
  |  |  291|    613|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    613|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    613|      goto error;                                       \
  |  |  294|    613|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 613]
  |  |  ------------------
  ------------------
  380|    613|                     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|    613|  doh->set.ssl.custom_cafile = data->set.ssl.custom_cafile;
  391|    613|  doh->set.ssl.custom_capath = data->set.ssl.custom_capath;
  392|    613|  doh->set.ssl.custom_cablob = data->set.ssl.custom_cablob;
  393|    613|  if(data->set.str[STRING_SSL_CAFILE]) {
  ------------------
  |  Branch (393:6): [True: 613, False: 0]
  ------------------
  394|    613|    ERROR_CHECK_SETOPT(CURLOPT_CAINFO, data->set.str[STRING_SSL_CAFILE]);
  ------------------
  |  |  288|    613|  do {                                                  \
  |  |  289|    613|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    613|  __extension__({                                                       \
  |  |  |  |   46|    613|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 613, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    613|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   108k|#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: 613]
  |  |  |  |  |  |  |  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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    613|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    613|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    613|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    613|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    613|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    613|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    613|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    613|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    613|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    613|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    613|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    613|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    613|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    613|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    613|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    613|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    613|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    613|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    613|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    613|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    613|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    613|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    613|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    613|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    613|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    613|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    613|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    613|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    613|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    613|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    613|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    613|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    613|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    613|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    613|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    613|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    613|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    613|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    613|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    613|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    613|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    613|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    613|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    613|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    613|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    613|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    613|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    613|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    613|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    613|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    613|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    613|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    613|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    613|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    613|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    613|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    613|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    613|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    613|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    613|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    613|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    613|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    613|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    613|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    613|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    613|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    613|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    613|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    613|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    613|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    613|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    613|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    613|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    613|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    613|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    613|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    613|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    613|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    613|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    613|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    613|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    613|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    613|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    613|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    613|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    613|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    613|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    613|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    613|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    613|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    613|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    613|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    613|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    613|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    613|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    613|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    613|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    613|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    613|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    613|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    613|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    613|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    613|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    613|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    613|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    613|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    613|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    613|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    613|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    613|      )                                                                 \
  |  |  |  |  158|    613|    }                                                                   \
  |  |  |  |  159|    613|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    613|  })
  |  |  ------------------
  |  |  290|    613|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 613]
  |  |  ------------------
  |  |  291|    613|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    613|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    613|      goto error;                                       \
  |  |  294|    613|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 613]
  |  |  ------------------
  ------------------
  395|    613|  }
  396|    613|  if(data->set.blobs[BLOB_CAINFO]) {
  ------------------
  |  Branch (396:6): [True: 0, False: 613]
  ------------------
  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|    613|  if(data->set.str[STRING_SSL_CAPATH]) {
  ------------------
  |  Branch (399:6): [True: 613, False: 0]
  ------------------
  400|    613|    ERROR_CHECK_SETOPT(CURLOPT_CAPATH, data->set.str[STRING_SSL_CAPATH]);
  ------------------
  |  |  288|    613|  do {                                                  \
  |  |  289|    613|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    613|  __extension__({                                                       \
  |  |  |  |   46|    613|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 613, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    613|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   108k|#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: 613]
  |  |  |  |  |  |  |  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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    613|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    613|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    613|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    613|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    613|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    613|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    613|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    613|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    613|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    613|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    613|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    613|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    613|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    613|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    613|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    613|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    613|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    613|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    613|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    613|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    613|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    613|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    613|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    613|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    613|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    613|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    613|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    613|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    613|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    613|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    613|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    613|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    613|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    613|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    613|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    613|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    613|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    613|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    613|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    613|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    613|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    613|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    613|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    613|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    613|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    613|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    613|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    613|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    613|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    613|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    613|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    613|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    613|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    613|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    613|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    613|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    613|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    613|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    613|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    613|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    613|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    613|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    613|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    613|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    613|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    613|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    613|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    613|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    613|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    613|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    613|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    613|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    613|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    613|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    613|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    613|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    613|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    613|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    613|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    613|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    613|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    613|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    613|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    613|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    613|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    613|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    613|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    613|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    613|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    613|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    613|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    613|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    613|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    613|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    613|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    613|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    613|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    613|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    613|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    613|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    613|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    613|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    613|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    613|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    613|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    613|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    613|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    613|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    613|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    613|      )                                                                 \
  |  |  |  |  158|    613|    }                                                                   \
  |  |  |  |  159|    613|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    613|  })
  |  |  ------------------
  |  |  290|    613|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 613]
  |  |  ------------------
  |  |  291|    613|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    613|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    613|      goto error;                                       \
  |  |  294|    613|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 613]
  |  |  ------------------
  ------------------
  401|    613|  }
  402|    613|  if(data->set.str[STRING_SSL_CRLFILE]) {
  ------------------
  |  Branch (402:6): [True: 613, False: 0]
  ------------------
  403|    613|    ERROR_CHECK_SETOPT(CURLOPT_CRLFILE, data->set.str[STRING_SSL_CRLFILE]);
  ------------------
  |  |  288|    613|  do {                                                  \
  |  |  289|    613|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    613|  __extension__({                                                       \
  |  |  |  |   46|    613|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 613, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    613|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   108k|#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: 613]
  |  |  |  |  |  |  |  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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    613|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    613|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    613|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    613|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    613|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    613|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    613|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    613|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    613|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    613|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    613|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    613|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    613|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    613|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    613|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    613|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    613|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    613|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    613|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    613|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    613|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    613|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    613|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    613|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    613|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    613|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    613|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    613|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    613|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    613|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    613|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    613|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    613|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    613|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    613|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    613|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    613|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    613|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    613|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    613|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    613|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    613|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    613|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    613|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    613|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    613|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    613|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    613|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    613|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    613|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    613|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    613|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    613|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    613|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    613|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    613|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    613|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    613|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    613|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    613|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    613|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    613|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    613|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    613|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    613|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    613|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    613|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    613|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    613|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    613|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    613|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    613|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    613|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    613|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    613|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    613|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    613|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    613|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    613|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    613|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    613|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    613|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    613|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    613|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    613|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    613|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    613|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    613|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    613|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    613|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    613|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    613|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    613|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    613|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    613|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    613|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    613|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    613|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    613|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    613|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    613|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    613|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    613|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    613|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    613|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    613|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    613|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    613|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    613|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    613|      )                                                                 \
  |  |  |  |  158|    613|    }                                                                   \
  |  |  |  |  159|    613|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    613|  })
  |  |  ------------------
  |  |  290|    613|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 613]
  |  |  ------------------
  |  |  291|    613|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    613|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    613|      goto error;                                       \
  |  |  294|    613|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 613]
  |  |  ------------------
  ------------------
  404|    613|  }
  405|    613|  if(data->set.ssl.certinfo)
  ------------------
  |  Branch (405:6): [True: 3, False: 610]
  ------------------
  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|    613|  if(data->set.ssl.fsslctx)
  ------------------
  |  Branch (407:6): [True: 0, False: 613]
  ------------------
  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|    613|  if(data->set.ssl.fsslctxp)
  ------------------
  |  Branch (409:6): [True: 0, False: 613]
  ------------------
  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|    613|  if(data->set.fdebug)
  ------------------
  |  Branch (411:6): [True: 0, False: 613]
  ------------------
  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|    613|  if(data->set.debugdata)
  ------------------
  |  Branch (413:6): [True: 0, False: 613]
  ------------------
  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|    613|  if(data->set.str[STRING_SSL_EC_CURVES]) {
  ------------------
  |  Branch (415:6): [True: 7, False: 606]
  ------------------
  416|      7|    ERROR_CHECK_SETOPT(CURLOPT_SSL_EC_CURVES,
  ------------------
  |  |  288|      7|  do {                                                  \
  |  |  289|      7|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      7|  __extension__({                                                       \
  |  |  |  |   46|      7|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 7, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      7|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  1.23k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      7|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      7|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      7|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      7|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      7|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      7|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      7|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      7|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      7|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      7|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      7|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      7|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      7|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      7|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      7|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      7|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      7|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      7|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      7|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      7|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      7|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      7|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      7|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      7|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      7|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      7|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      7|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      7|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      7|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      7|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      7|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      7|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      7|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      7|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      7|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      7|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      7|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      7|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      7|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      7|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      7|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      7|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      7|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      7|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      7|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      7|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      7|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      7|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      7|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      7|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      7|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      7|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      7|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      7|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      7|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      7|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      7|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      7|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      7|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      7|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      7|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      7|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      7|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      7|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      7|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      7|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      7|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      7|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      7|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      7|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      7|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      7|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      7|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      7|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      7|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      7|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      7|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      7|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      7|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      7|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      7|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      7|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      7|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      7|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      7|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      7|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      7|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      7|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      7|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      7|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      7|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      7|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      7|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      7|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      7|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      7|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      7|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      7|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      7|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      7|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      7|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      7|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      7|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      7|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      7|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      7|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      7|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      7|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      7|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      7|      )                                                                 \
  |  |  |  |  158|      7|    }                                                                   \
  |  |  |  |  159|      7|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      7|  })
  |  |  ------------------
  |  |  290|      7|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 7]
  |  |  ------------------
  |  |  291|      7|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      7|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      7|      goto error;                                       \
  |  |  294|      7|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 7]
  |  |  ------------------
  ------------------
  417|      7|                       data->set.str[STRING_SSL_EC_CURVES]);
  418|      7|  }
  419|       |
  420|    613|  (void)curl_easy_setopt(doh, CURLOPT_SSL_OPTIONS,
  ------------------
  |  |   45|    613|  __extension__({                                                       \
  |  |   46|    613|    if(__builtin_constant_p(option)) {                                  \
  |  |  ------------------
  |  |  |  Branch (46:8): [True: 613, Folded]
  |  |  ------------------
  |  |   47|    613|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  ------------------
  |  |  |  |   59|   106k|#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: 613]
  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 613]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   48|    613|        if(curlcheck_long_option(option))                               \
  |  |   49|    613|          if(!curlcheck_long(value))                                    \
  |  |   50|    613|            Wcurl_easy_setopt_err_long();                               \
  |  |   51|    613|        if(curlcheck_off_t_option(option))                              \
  |  |   52|    613|          if(!curlcheck_off_t(value))                                   \
  |  |   53|    613|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |   54|    613|        if(curlcheck_string_option(option))                             \
  |  |   55|    613|          if(!curlcheck_string(value))                                  \
  |  |   56|    613|            Wcurl_easy_setopt_err_string();                             \
  |  |   57|    613|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |   58|    613|        if(curlcheck_write_cb_option(option))                           \
  |  |   59|    613|          if(!curlcheck_write_cb(value))                                \
  |  |   60|    613|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |   61|    613|        if(curlcheck_curl_option(option))                               \
  |  |   62|    613|          if(!curlcheck_curl(value))                                    \
  |  |   63|    613|            Wcurl_easy_setopt_err_curl();                               \
  |  |   64|    613|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |   65|    613|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |   66|    613|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |   67|    613|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |   68|    613|          if(!curlcheck_read_cb(value))                                 \
  |  |   69|    613|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |   70|    613|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |   71|    613|          if(!curlcheck_ioctl_cb(value))                                \
  |  |   72|    613|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |   73|    613|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |   74|    613|          if(!curlcheck_sockopt_cb(value))                              \
  |  |   75|    613|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |   76|    613|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |   77|    613|          if(!curlcheck_opensocket_cb(value))                           \
  |  |   78|    613|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |   79|    613|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |   80|    613|          if(!curlcheck_progress_cb(value))                             \
  |  |   81|    613|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |   82|    613|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |   83|    613|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |   84|    613|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |   85|    613|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |   86|    613|          if(!curlcheck_debug_cb(value))                                \
  |  |   87|    613|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |   88|    613|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |   89|    613|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |   90|    613|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |   91|    613|        if(curlcheck_conv_cb_option(option))                            \
  |  |   92|    613|          if(!curlcheck_conv_cb(value))                                 \
  |  |   93|    613|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |   94|    613|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |   95|    613|          if(!curlcheck_seek_cb(value))                                 \
  |  |   96|    613|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |   97|    613|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |   98|    613|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |   99|    613|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  100|    613|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  101|    613|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  102|    613|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  103|    613|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  104|    613|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  105|    613|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  106|    613|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  107|    613|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  108|    613|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  109|    613|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  110|    613|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  111|    613|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  112|    613|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  113|    613|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  114|    613|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  115|    613|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  116|    613|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  117|    613|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  118|    613|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  119|    613|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  120|    613|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  121|    613|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  122|    613|          if(!curlcheck_interleave_cb(value))                           \
  |  |  123|    613|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  124|    613|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  125|    613|          if(!curlcheck_prereq_cb(value))                               \
  |  |  126|    613|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  127|    613|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  128|    613|          if(!curlcheck_trailer_cb(value))                              \
  |  |  129|    613|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  130|    613|        if(curlcheck_cb_data_option(option))                            \
  |  |  131|    613|          if(!curlcheck_cb_data(value))                                 \
  |  |  132|    613|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  133|    613|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  134|    613|          if(!curlcheck_error_buffer(value))                            \
  |  |  135|    613|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  136|    613|        if((option) == CURLOPT_CURLU)                                   \
  |  |  137|    613|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  138|    613|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  139|    613|        if((option) == CURLOPT_STDERR)                                  \
  |  |  140|    613|          if(!curlcheck_FILE(value))                                    \
  |  |  141|    613|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  142|    613|        if(curlcheck_postfields_option(option))                         \
  |  |  143|    613|          if(!curlcheck_postfields(value))                              \
  |  |  144|    613|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  145|    613|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  146|    613|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  147|    613|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  148|    613|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  149|    613|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  150|    613|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  151|    613|        if(curlcheck_slist_option(option))                              \
  |  |  152|    613|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  153|    613|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  154|    613|        if((option) == CURLOPT_SHARE)                                   \
  |  |  155|    613|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  156|    613|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  157|    613|      )                                                                 \
  |  |  158|    613|    }                                                                   \
  |  |  159|    613|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  160|    613|  })
  ------------------
  421|    613|                         ((long)data->set.ssl.primary.ssl_options &
  422|    613|                          ~CURLSSLOPT_AUTO_CLIENT_CERT));
  423|       |
  424|    613|  doh->state.internal = TRUE;
  ------------------
  |  | 1051|    613|#define TRUE true
  ------------------
  425|    613|  doh->master_mid = data->mid; /* master transfer of this one */
  426|       |
  427|    613|  result = Curl_meta_set(doh, CURL_EZM_DOH_PROBE, doh_req, doh_probe_dtor);
  ------------------
  |  |   85|    613|#define CURL_EZM_DOH_PROBE   "ezm:doh-p"
  ------------------
  428|    613|  doh_req = NULL; /* call took ownership */
  429|    613|  if(result)
  ------------------
  |  Branch (429:6): [True: 0, False: 613]
  ------------------
  430|      0|    goto error;
  431|       |
  432|       |  /* DoH handles must not inherit private_data. The handles may be passed to
  433|       |     the user via callbacks and the user will be able to identify them as
  434|       |     internal handles because private data is not set. The user can then set
  435|       |     private_data via CURLOPT_PRIVATE if they so choose. */
  436|    613|  DEBUGASSERT(!doh->set.private_data);
  ------------------
  |  | 1077|    613|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (436:3): [True: 0, False: 613]
  |  Branch (436:3): [True: 613, False: 0]
  ------------------
  437|       |
  438|    613|  if(curl_multi_add_handle(multi, doh))
  ------------------
  |  Branch (438:6): [True: 0, False: 613]
  ------------------
  439|      0|    goto error;
  440|       |
  441|    613|  *pmid = doh->mid;
  442|    613|  return CURLE_OK;
  443|       |
  444|      9|error:
  445|      9|  Curl_close(&doh);
  446|      9|  if(doh_req)
  ------------------
  |  Branch (446:6): [True: 9, False: 0]
  ------------------
  447|      9|    doh_probe_dtor(NULL, 0, doh_req);
  448|      9|  return result;
  449|    613|}
doh.c:doh_probe_dtor:
  276|    622|{
  277|    622|  (void)key;
  278|    622|  (void)klen;
  279|    622|  if(e) {
  ------------------
  |  Branch (279:6): [True: 622, False: 0]
  ------------------
  280|    622|    struct doh_request *doh_req = e;
  281|    622|    curl_slist_free_all(doh_req->req_hds);
  282|    622|    curlx_dyn_free(&doh_req->resp_body);
  283|    622|    curlx_free(e);
  ------------------
  |  | 1488|    622|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  284|    622|  }
  285|    622|}
doh.c:doh2ai:
  945|    120|{
  946|    120|  struct Curl_addrinfo *ai;
  947|    120|  struct Curl_addrinfo *prevai = NULL;
  948|    120|  struct Curl_addrinfo *firstai = NULL;
  949|    120|  struct sockaddr_in *addr;
  950|    120|#ifdef USE_IPV6
  951|    120|  struct sockaddr_in6 *addr6;
  952|    120|#endif
  953|    120|  CURLcode result = CURLE_OK;
  954|    120|  int i;
  955|    120|  size_t hostlen = strlen(hostname) + 1; /* include null-terminator */
  956|       |
  957|    120|  DEBUGASSERT(de);
  ------------------
  |  | 1077|    120|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (957:3): [True: 0, False: 120]
  |  Branch (957:3): [True: 120, False: 0]
  ------------------
  958|       |
  959|    120|  if(!de->numaddr)
  ------------------
  |  Branch (959:6): [True: 120, False: 0]
  ------------------
  960|    120|    return CURLE_COULDNT_RESOLVE_HOST;
  961|       |
  962|      0|  for(i = 0; i < de->numaddr; i++) {
  ------------------
  |  Branch (962:14): [True: 0, False: 0]
  ------------------
  963|      0|    size_t ss_size;
  964|      0|    CURL_SA_FAMILY_T addrtype;
  ------------------
  |  | 1280|      0|#    define CURL_SA_FAMILY_T sa_family_t
  ------------------
  965|      0|    if(de->addr[i].type == CURL_DNS_TYPE_AAAA) {
  ------------------
  |  Branch (965:8): [True: 0, False: 0]
  ------------------
  966|       |#ifndef USE_IPV6
  967|       |      /* we cannot handle IPv6 addresses */
  968|       |      continue;
  969|       |#else
  970|      0|      ss_size = sizeof(struct sockaddr_in6);
  971|      0|      addrtype = AF_INET6;
  972|      0|#endif
  973|      0|    }
  974|      0|    else {
  975|      0|      ss_size = sizeof(struct sockaddr_in);
  976|      0|      addrtype = AF_INET;
  977|      0|    }
  978|       |
  979|      0|    ai = curlx_calloc(1, sizeof(struct Curl_addrinfo) + ss_size + hostlen);
  ------------------
  |  | 1485|      0|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  980|      0|    if(!ai) {
  ------------------
  |  Branch (980:8): [True: 0, False: 0]
  ------------------
  981|      0|      result = CURLE_OUT_OF_MEMORY;
  982|      0|      break;
  983|      0|    }
  984|      0|    ai->ai_addr = (void *)((char *)ai + sizeof(struct Curl_addrinfo));
  985|      0|    ai->ai_canonname = (void *)((char *)ai->ai_addr + ss_size);
  986|      0|    memcpy(ai->ai_canonname, hostname, hostlen);
  987|       |
  988|      0|    if(!firstai)
  ------------------
  |  Branch (988:8): [True: 0, False: 0]
  ------------------
  989|       |      /* store the pointer we want to return from this function */
  990|      0|      firstai = ai;
  991|       |
  992|      0|    if(prevai)
  ------------------
  |  Branch (992:8): [True: 0, False: 0]
  ------------------
  993|       |      /* make the previous entry point to this */
  994|      0|      prevai->ai_next = ai;
  995|       |
  996|      0|    ai->ai_family = addrtype;
  997|       |
  998|       |    /* we return all names as STREAM, so when using this address for TFTP
  999|       |       the type must be ignored and conn->socktype be used instead! */
 1000|      0|    ai->ai_socktype = SOCK_STREAM;
 1001|       |
 1002|      0|    ai->ai_addrlen = (curl_socklen_t)ss_size;
 1003|       |
 1004|       |    /* leave the rest of the struct filled with zero */
 1005|       |
 1006|      0|    switch(ai->ai_family) {
  ------------------
  |  Branch (1006:12): [True: 0, False: 0]
  ------------------
 1007|      0|    case AF_INET:
  ------------------
  |  Branch (1007:5): [True: 0, False: 0]
  ------------------
 1008|      0|      addr = (void *)ai->ai_addr; /* storage area for this info */
 1009|      0|      DEBUGASSERT(sizeof(struct in_addr) == sizeof(de->addr[i].ip.v4));
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1009:7): [True: 0, Folded]
  |  Branch (1009:7): [True: 0, Folded]
  ------------------
 1010|      0|      memcpy(&addr->sin_addr, &de->addr[i].ip.v4, sizeof(struct in_addr));
 1011|      0|      addr->sin_family = addrtype;
 1012|      0|      addr->sin_port = htons((unsigned short)port);
 1013|      0|      break;
 1014|       |
 1015|      0|#ifdef USE_IPV6
 1016|      0|    case AF_INET6:
  ------------------
  |  Branch (1016:5): [True: 0, False: 0]
  ------------------
 1017|      0|      addr6 = (void *)ai->ai_addr; /* storage area for this info */
 1018|      0|      DEBUGASSERT(sizeof(struct in6_addr) == sizeof(de->addr[i].ip.v6));
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1018:7): [True: 0, Folded]
  |  Branch (1018:7): [True: 0, Folded]
  ------------------
 1019|      0|      memcpy(&addr6->sin6_addr, &de->addr[i].ip.v6, sizeof(struct in6_addr));
 1020|      0|      addr6->sin6_family = addrtype;
 1021|      0|      addr6->sin6_port = htons((unsigned short)port);
 1022|      0|      break;
 1023|      0|#endif
 1024|      0|    }
 1025|       |
 1026|      0|    prevai = ai;
 1027|      0|  }
 1028|       |
 1029|      0|  if(result) {
  ------------------
  |  Branch (1029:6): [True: 0, False: 0]
  ------------------
 1030|      0|    Curl_freeaddrinfo(firstai);
 1031|      0|    firstai = NULL;
 1032|      0|  }
 1033|      0|  *aip = firstai;
 1034|       |
 1035|      0|  return result;
 1036|      0|}
doh.c:doh_close:
 1351|    446|{
 1352|    446|  struct doh_probes *doh = async ? async->doh : NULL;
  ------------------
  |  Branch (1352:28): [True: 446, False: 0]
  ------------------
 1353|    446|  if(doh && data->multi) {
  ------------------
  |  Branch (1353:6): [True: 446, False: 0]
  |  Branch (1353:13): [True: 446, False: 0]
  ------------------
 1354|    446|    struct Curl_easy *probe_data;
 1355|    446|    uint32_t mid;
 1356|    446|    size_t slot;
 1357|  1.33k|    for(slot = 0; slot < DOH_SLOT_COUNT; slot++) {
  ------------------
  |  Branch (1357:19): [True: 892, False: 446]
  ------------------
 1358|    892|      mid = doh->probe_resp[slot].probe_mid;
 1359|    892|      if(mid == UINT32_MAX)
  ------------------
  |  Branch (1359:10): [True: 279, False: 613]
  ------------------
 1360|    279|        continue;
 1361|    613|      doh->probe_resp[slot].probe_mid = UINT32_MAX;
 1362|       |      /* should have been called before data is removed from multi handle */
 1363|    613|      DEBUGASSERT(data->multi);
  ------------------
  |  | 1077|    613|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1363:7): [True: 0, False: 613]
  |  Branch (1363:7): [True: 613, False: 0]
  ------------------
 1364|    613|      probe_data = data->multi ? Curl_multi_get_easy(data->multi, mid) : NULL;
  ------------------
  |  Branch (1364:20): [True: 613, False: 0]
  ------------------
 1365|    613|      if(!probe_data) {
  ------------------
  |  Branch (1365:10): [True: 0, False: 613]
  ------------------
 1366|      0|        DEBUGF(infof(data, "Curl_doh_close: xfer for mid=%u not found!",
  ------------------
  |  | 1063|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1367|      0|                     doh->probe_resp[slot].probe_mid));
 1368|      0|        continue;
 1369|      0|      }
 1370|       |      /* data->multi might already be reset at this time */
 1371|    613|      curl_multi_remove_handle(data->multi, probe_data);
 1372|    613|      Curl_close(&probe_data);
 1373|    613|    }
 1374|    446|    data->sub_xfer_done = NULL;
 1375|    446|  }
 1376|    446|}

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

curl_easy_init:
  331|  27.7k|{
  332|  27.7k|  CURLcode result;
  333|  27.7k|  struct Curl_easy *data;
  334|       |
  335|       |  /* Make sure we inited the global SSL stuff */
  336|  27.7k|  global_init_lock();
  ------------------
  |  |   87|  27.7k|#define global_init_lock()   curl_simple_lock_lock(&s_lock)
  ------------------
  337|       |
  338|  27.7k|  if(!initialized) {
  ------------------
  |  Branch (338:6): [True: 1, False: 27.7k]
  ------------------
  339|      1|    result = global_init(CURL_GLOBAL_DEFAULT, TRUE);
  ------------------
  |  | 3028|      1|#define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL
  |  |  ------------------
  |  |  |  | 3026|      1|#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32)
  |  |  |  |  ------------------
  |  |  |  |  |  | 3024|      1|#define CURL_GLOBAL_SSL (1 << 0) /* no purpose since 7.57.0 */
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32)
  |  |  |  |  ------------------
  |  |  |  |  |  | 3025|      1|#define CURL_GLOBAL_WIN32 (1 << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  result = global_init(CURL_GLOBAL_DEFAULT, TRUE);
  ------------------
  |  | 1051|      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"));
  ------------------
  |  | 1063|      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|  27.7k|  global_init_unlock();
  ------------------
  |  |   88|  27.7k|#define global_init_unlock() curl_simple_lock_unlock(&s_lock)
  ------------------
  348|       |
  349|       |  /* We use Curl_open() with undefined URL so far */
  350|  27.7k|  result = Curl_open(&data);
  351|  27.7k|  if(result) {
  ------------------
  |  Branch (351:6): [True: 0, False: 27.7k]
  ------------------
  352|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_open failed\n"));
  ------------------
  |  | 1063|      0|#define DEBUGF(x) x
  ------------------
  353|      0|    return NULL;
  354|      0|  }
  355|       |
  356|  27.7k|  return data;
  357|  27.7k|}
curl_easy_cleanup:
  839|  14.6k|{
  840|  14.6k|  struct Curl_easy *data = curl;
  841|  14.6k|  if(GOOD_EASY_HANDLE(data)) {
  ------------------
  |  |  141|  14.6k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  135|  14.6k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|  14.6k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (141:3): [True: 14.6k, False: 0]
  |  |  |  Branch (141:5): [True: 14.6k, False: 0]
  |  |  |  Branch (141:12): [True: 14.6k, False: 0]
  |  |  ------------------
  |  |  142|  14.6k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (841:6): [True: 0, False: 0]
  |  Branch (841:6): [True: 0, False: 0]
  ------------------
  842|  14.6k|    struct Curl_sigpipe_ctx sigpipe_ctx;
  843|  14.6k|    sigpipe_ignore(data, &sigpipe_ctx);
  844|  14.6k|    Curl_close(&data);
  845|  14.6k|    sigpipe_restore(&sigpipe_ctx);
  846|  14.6k|  }
  847|  14.6k|}
Curl_meta_set:
 1384|  1.51k|{
 1385|  1.51k|  DEBUGASSERT(meta_data); /* never set to NULL */
  ------------------
  |  | 1077|  1.51k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1385:3): [True: 0, False: 1.51k]
  |  Branch (1385:3): [True: 1.51k, False: 0]
  ------------------
 1386|  1.51k|  if(!Curl_hash_add2(&data->meta_hash, CURL_UNCONST(key), strlen(key) + 1,
  ------------------
  |  |  862|  1.51k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  |  Branch (1386:6): [True: 0, False: 1.51k]
  ------------------
 1387|  1.51k|                     meta_data, meta_dtor)) {
 1388|      0|    meta_dtor(CURL_UNCONST(key), strlen(key) + 1, meta_data);
  ------------------
  |  |  862|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 1389|      0|    return CURLE_OUT_OF_MEMORY;
 1390|      0|  }
 1391|  1.51k|  return CURLE_OK;
 1392|  1.51k|}
Curl_meta_remove:
 1395|  14.8k|{
 1396|  14.8k|  Curl_hash_delete(&data->meta_hash, CURL_UNCONST(key), strlen(key) + 1);
  ------------------
  |  |  862|  14.8k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 1397|  14.8k|}
Curl_meta_get:
 1400|  5.02k|{
 1401|  5.02k|  return Curl_hash_pick(&data->meta_hash, CURL_UNCONST(key), strlen(key) + 1);
  ------------------
  |  |  862|  5.02k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 1402|  5.02k|}
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;
  ------------------
  |  | 1477|      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"));
  ------------------
  |  | 1063|      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"));
  ------------------
  |  | 1063|      0|#define DEBUGF(x) x
  ------------------
  145|      0|    goto fail;
  146|      0|  }
  147|       |
  148|      1|  if(!Curl_vquic_init()) {
  ------------------
  |  |   82|      1|#define Curl_vquic_init() 1
  ------------------
  |  Branch (148:6): [Folded, False: 1]
  ------------------
  149|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_vquic_init failed\n"));
  ------------------
  |  | 1063|      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"));
  ------------------
  |  | 1063|      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"));
  ------------------
  |  | 1063|      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"));
  ------------------
  |  | 1063|      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"));
  ------------------
  |  | 1063|      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"));
  ------------------
  |  | 1063|      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);
  ------------------
  |  | 1483|      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|  27.7k|{
   65|  27.7k|  for(;;) {
   66|  27.7k|    if(!atomic_exchange_explicit(lock, true, memory_order_acquire))
  ------------------
  |  Branch (66:8): [True: 27.7k, False: 0]
  ------------------
   67|  27.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|  27.7k|}
easy.c:curl_simple_lock_unlock:
   83|  27.7k|{
   84|  27.7k|  atomic_store_explicit(lock, false, memory_order_release);
   85|  27.7k|}

curl_escape:
   37|    837|{
   38|       |  return curl_easy_escape(NULL, string, length);
   39|    837|}
curl_easy_escape:
   51|    837|{
   52|    837|  size_t len;
   53|    837|  struct dynbuf d;
   54|    837|  (void)curl;
   55|       |
   56|    837|  if(!string || (length < 0))
  ------------------
  |  Branch (56:6): [True: 0, False: 837]
  |  Branch (56:17): [True: 0, False: 837]
  ------------------
   57|      0|    return NULL;
   58|       |
   59|    837|  len = (length ? (size_t)length : strlen(string));
  ------------------
  |  Branch (59:10): [True: 0, False: 837]
  ------------------
   60|    837|  if(!len)
  ------------------
  |  Branch (60:6): [True: 776, False: 61]
  ------------------
   61|    776|    return curlx_strdup("");
  ------------------
  |  | 1482|    776|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
   62|       |
   63|     61|  if(len > SIZE_MAX / 16)
  ------------------
  |  Branch (63:6): [True: 0, False: 61]
  ------------------
   64|      0|    return NULL;
   65|       |
   66|     61|  curlx_dyn_init(&d, (len * 3) + 1);
   67|       |
   68|  2.65k|  while(len--) {
  ------------------
  |  Branch (68:9): [True: 2.59k, False: 61]
  ------------------
   69|       |    /* treat the characters unsigned */
   70|  2.59k|    unsigned char in = (unsigned char)*string++;
   71|       |
   72|  2.59k|    if(ISUNRESERVED(in)) {
  ------------------
  |  |   49|  2.59k|#define ISUNRESERVED(x) (ISALNUM(x) || ISURLPUNTCS(x))
  |  |  ------------------
  |  |  |  |   41|  5.18k|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |   44|  5.18k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (44:22): [True: 2.02k, False: 564]
  |  |  |  |  |  |  |  Branch (44:38): [True: 424, False: 1.60k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |   43|  4.75k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (43:22): [True: 803, False: 1.36k]
  |  |  |  |  |  |  |  Branch (43:38): [True: 182, False: 621]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |   42|  1.98k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (42:22): [True: 1.35k, False: 630]
  |  |  |  |  |  |  |  Branch (42:38): [True: 492, False: 862]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISUNRESERVED(x) (ISALNUM(x) || ISURLPUNTCS(x))
  |  |  ------------------
  |  |  |  |   48|  1.49k|  (((x) == '-') || ((x) == '.') || ((x) == '_') || ((x) == '~'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (48:4): [True: 370, False: 1.12k]
  |  |  |  |  |  Branch (48:20): [True: 113, False: 1.00k]
  |  |  |  |  |  Branch (48:36): [True: 233, False: 776]
  |  |  |  |  |  Branch (48:52): [True: 93, False: 683]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   73|       |      /* append this */
   74|  1.90k|      if(curlx_dyn_addn(&d, &in, 1))
  ------------------
  |  Branch (74:10): [True: 0, False: 1.90k]
  ------------------
   75|      0|        return NULL;
   76|  1.90k|    }
   77|    683|    else {
   78|       |      /* encode it */
   79|    683|      unsigned char out[3] = { '%' };
   80|    683|      Curl_hexbyte(&out[1], in);
   81|    683|      if(curlx_dyn_addn(&d, out, 3))
  ------------------
  |  Branch (81:10): [True: 0, False: 683]
  ------------------
   82|      0|        return NULL;
   83|    683|    }
   84|  2.59k|  }
   85|       |
   86|     61|  return curlx_dyn_ptr(&d);
   87|     61|}
Curl_urldecode:
  108|  4.60k|{
  109|  4.60k|  size_t alloc;
  110|  4.60k|  char *ns;
  111|       |
  112|  4.60k|  DEBUGASSERT(string);
  ------------------
  |  | 1077|  4.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (112:3): [True: 0, False: 4.60k]
  |  Branch (112:3): [True: 4.60k, False: 0]
  ------------------
  113|  4.60k|  DEBUGASSERT(ctrl >= REJECT_NADA); /* crash on TRUE/FALSE */
  ------------------
  |  | 1077|  4.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (113:3): [True: 0, False: 4.60k]
  |  Branch (113:3): [True: 4.60k, False: 0]
  ------------------
  114|       |
  115|  4.60k|  alloc = (length ? length : strlen(string));
  ------------------
  |  Branch (115:12): [True: 3.67k, False: 932]
  ------------------
  116|  4.60k|  ns = curlx_malloc(alloc + 1);
  ------------------
  |  | 1483|  4.60k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  117|       |
  118|  4.60k|  if(!ns)
  ------------------
  |  Branch (118:6): [True: 0, False: 4.60k]
  ------------------
  119|      0|    return CURLE_OUT_OF_MEMORY;
  120|       |
  121|       |  /* store output string */
  122|  4.60k|  *ostring = ns;
  123|       |
  124|  6.95M|  while(alloc) {
  ------------------
  |  Branch (124:9): [True: 6.94M, False: 4.59k]
  ------------------
  125|  6.94M|    unsigned char in = (unsigned char)*string;
  126|  6.94M|    if(('%' == in) && (alloc > 2) &&
  ------------------
  |  Branch (126:8): [True: 1.82M, False: 5.11M]
  |  Branch (126:23): [True: 1.82M, False: 85]
  ------------------
  127|  1.82M|       ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
  ------------------
  |  |   39|  8.77M|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  3.65M|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 43.3k, False: 1.78M]
  |  |  |  |  |  Branch (44:38): [True: 7.09k, False: 36.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  3.65M|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 20.3k, False: 1.80M]
  |  |  |  |  |  Branch (27:43): [True: 8.74k, False: 11.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  1.81M|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 26.5k, False: 1.78M]
  |  |  |  |  |  Branch (28:43): [True: 10.3k, False: 16.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                     ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
  ------------------
  |  |   39|  26.1k|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  52.3k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 14.8k, False: 11.3k]
  |  |  |  |  |  Branch (44:38): [True: 3.27k, False: 11.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  49.0k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 6.13k, False: 16.7k]
  |  |  |  |  |  Branch (27:43): [True: 1.96k, False: 4.17k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  20.9k|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 8.71k, False: 12.2k]
  |  |  |  |  |  Branch (28:43): [True: 2.99k, False: 5.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  128|       |      /* this is two hexadecimal digits following a '%' */
  129|  8.22k|      in = (unsigned char)((curlx_hexval(string[1]) << 4) |
  ------------------
  |  |  112|  8.22k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  130|  8.22k|                           curlx_hexval(string[2]));
  ------------------
  |  |  112|  8.22k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  131|  8.22k|      string += 3;
  132|  8.22k|      alloc -= 3;
  133|  8.22k|    }
  134|  6.93M|    else {
  135|  6.93M|      string++;
  136|  6.93M|      alloc--;
  137|  6.93M|    }
  138|       |
  139|  6.94M|    if(((ctrl == REJECT_CTRL) && (in < 0x20)) ||
  ------------------
  |  Branch (139:9): [True: 5.39M, False: 1.55M]
  |  Branch (139:34): [True: 8, False: 5.39M]
  ------------------
  140|  6.94M|       ((ctrl == REJECT_ZERO) && (in == 0))) {
  ------------------
  |  Branch (140:9): [True: 1.55M, False: 5.39M]
  |  Branch (140:34): [True: 5, False: 1.55M]
  ------------------
  141|     13|      curlx_safefree(*ostring);
  ------------------
  |  | 1332|     13|  do {                      \
  |  | 1333|     13|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|     13|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|     13|    (ptr) = NULL;           \
  |  | 1335|     13|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 13]
  |  |  ------------------
  ------------------
  142|     13|      return CURLE_URL_MALFORMAT;
  143|     13|    }
  144|       |
  145|  6.94M|    *ns++ = (char)in;
  146|  6.94M|  }
  147|  4.59k|  *ns = 0; /* terminate it */
  148|       |
  149|  4.59k|  if(olen)
  ------------------
  |  Branch (149:6): [True: 4.26k, False: 327]
  ------------------
  150|       |    /* store output size */
  151|  4.26k|    *olen = ns - *ostring;
  152|       |
  153|  4.59k|  return CURLE_OK;
  154|  4.60k|}
curl_free:
  191|  9.73k|{
  192|  9.73k|  curlx_free(p);
  ------------------
  |  | 1488|  9.73k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  193|  9.73k|}
Curl_hexencode:
  203|  2.51k|{
  204|  2.51k|  DEBUGASSERT(src && len && (olen >= 3));
  ------------------
  |  | 1077|  2.51k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (204:3): [True: 0, False: 2.51k]
  |  Branch (204:3): [True: 0, False: 0]
  |  Branch (204:3): [True: 0, False: 0]
  |  Branch (204:3): [True: 2.51k, False: 0]
  |  Branch (204:3): [True: 2.51k, False: 0]
  |  Branch (204:3): [True: 2.51k, False: 0]
  ------------------
  205|  2.51k|  if(src && len && (olen >= 3)) {
  ------------------
  |  Branch (205:6): [True: 2.51k, False: 0]
  |  Branch (205:13): [True: 2.51k, False: 0]
  |  Branch (205:20): [True: 2.51k, False: 0]
  ------------------
  206|  82.8k|    while(len-- && (olen >= 3)) {
  ------------------
  |  Branch (206:11): [True: 80.3k, False: 2.51k]
  |  Branch (206:20): [True: 80.3k, False: 0]
  ------------------
  207|  80.3k|      out[0] = Curl_ldigits[*src >> 4];
  208|  80.3k|      out[1] = Curl_ldigits[*src & 0x0F];
  209|  80.3k|      ++src;
  210|  80.3k|      out += 2;
  211|  80.3k|      olen -= 2;
  212|  80.3k|    }
  213|  2.51k|    *out = 0;
  214|  2.51k|  }
  215|      0|  else if(olen)
  ------------------
  |  Branch (215:11): [True: 0, False: 0]
  ------------------
  216|      0|    *out = 0;
  217|  2.51k|}
Curl_hexbyte:
  225|  6.67M|{
  226|  6.67M|  dest[0] = Curl_udigits[val >> 4];
  227|  6.67M|  dest[1] = Curl_udigits[val & 0x0F];
  228|  6.67M|}

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

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

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

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

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

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

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

Curl_resolv_dns_queries:
  126|  8.01k|{
  127|  8.01k|  (void)data;
  128|  8.01k|  switch(ip_version) {
  129|      6|  case CURL_IPRESOLVE_V6:
  ------------------
  |  | 2312|      6|#define CURL_IPRESOLVE_V6       2L /* uses only IPv6 addresses/connections */
  ------------------
  |  Branch (129:3): [True: 6, False: 8.01k]
  ------------------
  130|      6|    return CURL_DNSQ_AAAA;
  ------------------
  |  |   52|      6|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  131|     80|  case CURL_IPRESOLVE_V4:
  ------------------
  |  | 2311|     80|#define CURL_IPRESOLVE_V4       1L /* uses only IPv4 addresses/connections */
  ------------------
  |  Branch (131:3): [True: 80, False: 7.93k]
  ------------------
  132|     80|    return CURL_DNSQ_A;
  ------------------
  |  |   51|     80|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  133|  7.93k|  default:
  ------------------
  |  Branch (133:3): [True: 7.93k, False: 86]
  ------------------
  134|  7.93k|    if(ipv6works(data))
  ------------------
  |  Branch (134:8): [True: 7.93k, False: 0]
  ------------------
  135|  7.93k|      return (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   51|  7.93k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                    return (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   52|  7.93k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  136|      0|    else
  137|      0|      return CURL_DNSQ_A;
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  138|  8.01k|  }
  139|  8.01k|}
Curl_resolv_query_str:
  143|    548|{
  144|    548|  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: 548]
  ------------------
  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: 548]
  ------------------
  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: 548]
  ------------------
  150|      0|    return "AAAA+HTTPS";
  151|    233|  case (CURL_DNSQ_AAAA):
  ------------------
  |  |   52|    233|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (151:3): [True: 233, False: 315]
  ------------------
  152|    233|    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: 548]
  ------------------
  154|      0|    return "A+HTTPS";
  155|    315|  case (CURL_DNSQ_A):
  ------------------
  |  |   51|    315|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (155:3): [True: 315, False: 233]
  ------------------
  156|    315|    return "A";
  157|      0|  case (CURL_DNSQ_HTTPS):
  ------------------
  |  |   53|      0|#define CURL_DNSQ_HTTPS       (1U << 2)
  ------------------
  |  Branch (157:3): [True: 0, False: 548]
  ------------------
  158|      0|    return "HTTPS";
  159|      0|  case 0:
  ------------------
  |  Branch (159:3): [True: 0, False: 548]
  ------------------
  160|      0|    return "-";
  161|      0|  default:
  ------------------
  |  Branch (161:3): [True: 0, False: 548]
  ------------------
  162|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (162:5): [Folded, False: 0]
  |  Branch (162:5): [Folded, False: 0]
  ------------------
  163|      0|    return "???";
  164|    548|  }
  165|    548|}
Curl_printable_address:
  177|     86|{
  178|     86|  DEBUGASSERT(bufsize);
  ------------------
  |  | 1077|     86|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (178:3): [True: 0, False: 86]
  |  Branch (178:3): [True: 86, False: 0]
  ------------------
  179|     86|  buf[0] = 0;
  180|       |
  181|     86|  switch(ai->ai_family) {
  182|     72|  case AF_INET: {
  ------------------
  |  Branch (182:3): [True: 72, False: 14]
  ------------------
  183|     72|    const struct sockaddr_in *sa4 = (const void *)ai->ai_addr;
  184|     72|    const struct in_addr *ipaddr4 = &sa4->sin_addr;
  185|     72|    (void)curlx_inet_ntop(ai->ai_family, (const void *)ipaddr4, buf, bufsize);
  186|     72|    break;
  187|      0|  }
  188|      0|#ifdef USE_IPV6
  189|     14|  case AF_INET6: {
  ------------------
  |  Branch (189:3): [True: 14, False: 72]
  ------------------
  190|     14|    const struct sockaddr_in6 *sa6 = (const void *)ai->ai_addr;
  191|     14|    const struct in6_addr *ipaddr6 = &sa6->sin6_addr;
  192|     14|    (void)curlx_inet_ntop(ai->ai_family, (const void *)ipaddr6, buf, bufsize);
  193|     14|    break;
  194|      0|  }
  195|      0|#endif
  196|      0|  default:
  ------------------
  |  Branch (196:3): [True: 0, False: 86]
  ------------------
  197|      0|    break;
  198|     86|  }
  199|     86|}
Curl_probeipv6:
  290|  13.0k|{
  291|       |  /* probe to see if we have a working IPv6 stack */
  292|  13.0k|  curl_socket_t s = CURL_SOCKET(PF_INET6, SOCK_DGRAM, 0);
  ------------------
  |  | 1441|  13.0k|  curl_dbg_socket((int)(domain), type, protocol, __LINE__, __FILE__)
  ------------------
  293|  13.0k|  multi->ipv6_works = FALSE;
  ------------------
  |  | 1054|  13.0k|#define FALSE false
  ------------------
  294|  13.0k|  if(s == CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  13.0k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (294:6): [True: 0, False: 13.0k]
  ------------------
  295|      0|    if(SOCKERRNO == SOCKENOMEM)
  ------------------
  |  | 1091|      0|#define SOCKERRNO         errno
  ------------------
                  if(SOCKERRNO == SOCKENOMEM)
  ------------------
  |  | 1129|      0|#define SOCKENOMEM        ENOMEM
  ------------------
  |  Branch (295:8): [True: 0, False: 0]
  ------------------
  296|      0|      return CURLE_OUT_OF_MEMORY;
  297|      0|  }
  298|  13.0k|  else {
  299|  13.0k|    multi->ipv6_works = TRUE;
  ------------------
  |  | 1051|  13.0k|#define TRUE true
  ------------------
  300|  13.0k|    sclose(s);
  ------------------
  |  | 1433|  13.0k|#define sclose(sockfd) curl_dbg_sclose(sockfd, __LINE__, __FILE__)
  ------------------
  301|  13.0k|  }
  302|  13.0k|  return CURLE_OK;
  303|  13.0k|}
Curl_host_is_ipnum:
  321|    812|{
  322|    812|  struct in_addr in;
  323|    812|#ifdef USE_IPV6
  324|    812|  struct in6_addr in6;
  325|    812|#endif
  326|    812|  if(curlx_inet_pton(AF_INET, hostname, &in) > 0
  ------------------
  |  Branch (326:6): [True: 2, False: 810]
  ------------------
  327|    810|#ifdef USE_IPV6
  328|    810|     || curlx_inet_pton(AF_INET6, hostname, &in6) > 0
  ------------------
  |  Branch (328:9): [True: 16, False: 794]
  ------------------
  329|    812|#endif
  330|    812|    )
  331|     18|    return TRUE;
  ------------------
  |  | 1051|     18|#define TRUE true
  ------------------
  332|    794|  return FALSE;
  ------------------
  |  | 1054|    794|#define FALSE false
  ------------------
  333|    812|}
Curl_resolv_announce_start:
  364|  8.07k|{
  365|  8.07k|  if(data->set.resolver_start) {
  ------------------
  |  Branch (365:6): [True: 0, False: 8.07k]
  ------------------
  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);
  ------------------
  |  | 1051|      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);
  ------------------
  |  | 1054|      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|  8.07k|  return CURLE_OK;
  379|  8.07k|}
Curl_resolv_elapsed_ms:
  475|    845|{
  476|    845|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
  477|    845|  if(!async)
  ------------------
  |  Branch (477:6): [True: 0, False: 845]
  ------------------
  478|      0|    return CURL_TIMEOUT_RESOLVE_MS;
  ------------------
  |  |   38|      0|#define CURL_TIMEOUT_RESOLVE_MS (300 * 1000)
  ------------------
  479|    845|  return curlx_ptimediff_ms(Curl_pgrs_now(data), &async->start);
  480|    845|}
Curl_resolv_has_answers:
  484|    933|{
  485|    933|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
  486|    933|  uint8_t check_queries;
  487|       |  /* a no longer existing/running resolve has all answers. */
  488|    933|  if(!async || async->done)
  ------------------
  |  Branch (488:6): [True: 0, False: 933]
  |  Branch (488:16): [True: 0, False: 933]
  ------------------
  489|      0|    return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  490|       |  /* Relevant are only queries undertaken. Others are considered answered. */
  491|    933|  check_queries = (dns_queries & async->dns_queries);
  492|    933|  if((check_queries & async->dns_responses) != check_queries) {
  ------------------
  |  Branch (492:6): [True: 845, False: 88]
  ------------------
  493|    845|    return FALSE;
  ------------------
  |  | 1054|    845|#define FALSE false
  ------------------
  494|    845|  }
  495|     88|  return TRUE;
  ------------------
  |  | 1051|     88|#define TRUE true
  ------------------
  496|    933|}
Curl_resolv_get_ai:
  502|    216|{
  503|    216|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
  504|    216|  (void)index;
  505|    216|  if(!async)
  ------------------
  |  Branch (505:6): [True: 0, False: 216]
  ------------------
  506|      0|    return NULL;
  507|    216|  if((ai_family == AF_INET) && !(async->dns_queries & CURL_DNSQ_A))
  ------------------
  |  |   51|    108|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (507:6): [True: 108, False: 108]
  |  Branch (507:32): [True: 0, False: 108]
  ------------------
  508|      0|    return NULL;
  509|    216|#ifdef USE_IPV6
  510|    216|  if((ai_family == AF_INET6) && !(async->dns_queries & CURL_DNSQ_AAAA))
  ------------------
  |  |   52|    108|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (510:6): [True: 108, False: 108]
  |  Branch (510:33): [True: 26, False: 82]
  ------------------
  511|     26|    return NULL;
  512|    190|#endif
  513|    190|  return Curl_async_get_ai(data, async, ai_family, index);
  514|    216|}
Curl_resolv_blocking:
  774|    120|{
  775|    120|  CURLcode result;
  776|    120|  uint32_t resolv_id;
  777|    120|  DEBUGASSERT(hostname && *hostname);
  ------------------
  |  | 1077|    120|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (777:3): [True: 0, False: 120]
  |  Branch (777:3): [True: 0, False: 0]
  |  Branch (777:3): [True: 120, False: 0]
  |  Branch (777:3): [True: 120, False: 0]
  ------------------
  778|    120|  *pdns = NULL;
  779|       |  /* We cannot do a blocking resolve using DoH currently */
  780|    120|  result = hostip_resolv(data, dns_queries,
  781|    120|                         hostname, port, transport, FALSE, 0, FALSE,
  ------------------
  |  | 1054|    120|#define FALSE false
  ------------------
                                       hostname, port, transport, FALSE, 0, FALSE,
  ------------------
  |  | 1054|    120|#define FALSE false
  ------------------
  782|    120|                         &resolv_id, pdns);
  783|    120|  switch(result) {
  784|     13|  case CURLE_OK:
  ------------------
  |  Branch (784:3): [True: 13, False: 107]
  ------------------
  785|     13|    DEBUGASSERT(*pdns);
  ------------------
  |  | 1077|     13|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (785:5): [True: 0, False: 13]
  |  Branch (785:5): [True: 13, False: 0]
  ------------------
  786|     13|    break;
  787|     13|#ifdef USE_CURL_ASYNC
  788|    107|  case CURLE_AGAIN:
  ------------------
  |  Branch (788:3): [True: 107, False: 13]
  ------------------
  789|    107|    DEBUGASSERT(!*pdns);
  ------------------
  |  | 1077|    107|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (789:5): [True: 0, False: 107]
  |  Branch (789:5): [True: 107, False: 0]
  ------------------
  790|    107|    result = Curl_async_await(data, resolv_id, pdns);
  791|    107|    Curl_resolv_destroy(data, resolv_id);
  792|    107|    break;
  793|      0|#endif
  794|      0|  default:
  ------------------
  |  Branch (794:3): [True: 0, False: 120]
  ------------------
  795|      0|    break;
  796|    120|  }
  797|    120|  return result;
  798|    120|}
Curl_resolv:
 1003|  8.01k|{
 1004|  8.01k|  *presolv_id = 0;
 1005|  8.01k|  *pdns = NULL;
 1006|       |
 1007|  8.01k|  if(timeout_ms < 0)
  ------------------
  |  Branch (1007:6): [True: 0, False: 8.01k]
  ------------------
 1008|       |    /* got an already expired timeout */
 1009|      0|    return CURLE_OPERATION_TIMEDOUT;
 1010|  8.01k|  else if(!timeout_ms)
  ------------------
  |  Branch (1010:11): [True: 0, False: 8.01k]
  ------------------
 1011|      0|    timeout_ms = CURL_TIMEOUT_RESOLVE_MS;
  ------------------
  |  |   38|      0|#define CURL_TIMEOUT_RESOLVE_MS (300 * 1000)
  ------------------
 1012|       |
 1013|  8.01k|#ifdef USE_UNIX_SOCKETS
 1014|  8.01k|  if(peer->unix_socket)
  ------------------
  |  Branch (1014:6): [True: 24, False: 7.99k]
  ------------------
 1015|     24|    return resolv_unix(data, peer->hostname, (bool)peer->abstract_uds, pdns);
 1016|       |#else
 1017|       |  if(peer->unix_socket)
 1018|       |    return hostip_resolv_failed(data, peer->hostname, for_proxy);
 1019|       |#endif
 1020|       |
 1021|       |#ifdef USE_ALARM_TIMEOUT
 1022|       |  if(timeout_ms && data->set.no_signal) {
 1023|       |    /* Cannot use ALARM when signals are disabled */
 1024|       |    timeout_ms = 0;
 1025|       |  }
 1026|       |  if(timeout_ms && !Curl_doh_wanted(data)) {
 1027|       |    return resolv_alarm_timeout(data, dns_queries, peer->hostname, peer->port,
 1028|       |                                transport, for_proxy, timeout_ms, presolv_id,
 1029|       |                                pdns);
 1030|       |  }
 1031|       |#endif /* !USE_ALARM_TIMEOUT */
 1032|       |
 1033|       |#ifndef CURLRES_ASYNCH
 1034|       |  if(timeout_ms)
 1035|       |    infof(data, "timeout on name lookup is not supported");
 1036|       |#endif
 1037|       |
 1038|  7.99k|  return hostip_resolv(data, dns_queries, peer->hostname, peer->port,
 1039|       |                       transport, for_proxy, timeout_ms, TRUE, presolv_id,
  ------------------
  |  | 1051|  7.99k|#define TRUE true
  ------------------
 1040|  7.99k|                       pdns);
 1041|  8.01k|}
Curl_async_get:
 1047|  3.73k|{
 1048|  3.73k|  struct Curl_resolv_async *async = data->state.async;
 1049|  3.73k|  for(; async; async = async->next) {
  ------------------
  |  Branch (1049:9): [True: 3.73k, False: 0]
  ------------------
 1050|  3.73k|    if(async->id == resolv_id)
  ------------------
  |  Branch (1050:8): [True: 3.73k, False: 0]
  ------------------
 1051|  3.73k|      return async;
 1052|  3.73k|  }
 1053|      0|  return NULL;
 1054|  3.73k|}
Curl_resolv_take_result:
 1058|  1.07k|{
 1059|  1.07k|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
 1060|  1.07k|  CURLcode result;
 1061|       |
 1062|       |  /* If async resolving is ongoing, this must be set */
 1063|  1.07k|  if(!async)
  ------------------
  |  Branch (1063:6): [True: 0, False: 1.07k]
  ------------------
 1064|      0|    return CURLE_FAILED_INIT;
 1065|       |
 1066|       |  /* check if we have the name resolved by now (from someone else) */
 1067|  1.07k|  result = Curl_dnscache_get(data, async->dns_queries,
 1068|  1.07k|                             async->hostname, async->port, pdns);
 1069|  1.07k|  if(*pdns) {
  ------------------
  |  Branch (1069:6): [True: 0, False: 1.07k]
  ------------------
 1070|       |    /* Tell a possibly async resolver we no longer need the results. */
 1071|      0|    infof(data, "Hostname '%s' was found in DNS cache", async->hostname);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
 1072|      0|    Curl_async_shutdown(data, async);
 1073|      0|    return CURLE_OK;
 1074|      0|  }
 1075|  1.07k|  else if(result) {
  ------------------
  |  Branch (1075:11): [True: 0, False: 1.07k]
  ------------------
 1076|      0|    Curl_async_shutdown(data, async);
 1077|      0|    return Curl_async_failed(data, async, NULL);
 1078|      0|  }
 1079|       |
 1080|  1.07k|  result = hostip_resolv_take_result(data, async, pdns);
 1081|       |
 1082|  1.07k|  if(*pdns) {
  ------------------
  |  Branch (1082:6): [True: 0, False: 1.07k]
  ------------------
 1083|       |    /* Add to cache */
 1084|      0|    result = Curl_dnscache_add(data, *pdns);
 1085|      0|    if(result)
  ------------------
  |  Branch (1085:8): [True: 0, False: 0]
  ------------------
 1086|      0|      Curl_dns_entry_unlink(data, pdns);
 1087|      0|  }
 1088|  1.07k|  else if(IS_RESOLV_FAIL(result)) {
  ------------------
  |  |   77|  1.07k|  (((result) == CURLE_COULDNT_RESOLVE_HOST) || \
  |  |  ------------------
  |  |  |  Branch (77:4): [True: 14, False: 1.06k]
  |  |  ------------------
  |  |   78|  1.07k|   ((result) == CURLE_COULDNT_RESOLVE_PROXY))
  |  |  ------------------
  |  |  |  Branch (78:4): [True: 130, False: 933]
  |  |  ------------------
  ------------------
 1089|       |    /* Only cache the failure when the resolver answered that the
 1090|       |       name does not exist. Transient failures, e.g. an unreachable
 1091|       |       or overloaded DNS server or local resource shortages, say
 1092|       |       nothing about the name and would poison the cache for every
 1093|       |       transfer using it. */
 1094|    144|    if(async->negative_answer)
  ------------------
  |  Branch (1094:8): [True: 144, False: 0]
  ------------------
 1095|    144|      Curl_dnscache_add_negative(data, async->dns_queries,
 1096|    144|                                 async->hostname, async->port);
 1097|    144|    failf(data, "Could not resolve: %s:%u", async->hostname, async->port);
  ------------------
  |  |   62|    144|#define failf Curl_failf
  ------------------
 1098|    144|  }
 1099|    933|  else if(result) {
  ------------------
  |  Branch (1099:11): [True: 0, False: 933]
  ------------------
 1100|      0|    failf(data, "Error %d resolving %s:%u",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1101|      0|          (int)result, async->hostname, async->port);
 1102|      0|  }
 1103|  1.07k|  return result;
 1104|  1.07k|}
Curl_resolv_pollset:
 1108|    933|{
 1109|    933|  struct Curl_resolv_async *async = data->state.async;
 1110|    933|  CURLcode result = CURLE_OK;
 1111|       |
 1112|    933|  (void)ps;
 1113|  1.86k|  for(; async && !result; async = async->next) {
  ------------------
  |  Branch (1113:9): [True: 933, False: 933]
  |  Branch (1113:18): [True: 933, False: 0]
  ------------------
 1114|    933|#ifndef CURL_DISABLE_DOH
 1115|    933|    if(async->doh) /* DoH has nothing for the pollset */
  ------------------
  |  Branch (1115:8): [True: 510, False: 423]
  ------------------
 1116|    510|      continue;
 1117|    423|#endif
 1118|    423|    result = Curl_async_pollset(data, async, ps);
 1119|    423|  }
 1120|    933|  return result;
 1121|    933|}
Curl_resolv_destroy:
 1124|  3.58k|{
 1125|  3.58k|  struct Curl_resolv_async **panchor = &data->state.async;
 1126|       |
 1127|  3.58k|  for(; *panchor; panchor = &(*panchor)->next) {
  ------------------
  |  Branch (1127:9): [True: 107, False: 3.47k]
  ------------------
 1128|    107|    struct Curl_resolv_async *async = *panchor;
 1129|    107|    if(async->id == resolv_id) {
  ------------------
  |  Branch (1129:8): [True: 107, False: 0]
  ------------------
 1130|    107|      *panchor = async->next;
 1131|    107|      Curl_async_destroy(data, async);
 1132|    107|      break;
 1133|    107|    }
 1134|    107|  }
 1135|  3.58k|}
Curl_resolv_shutdown_all:
 1138|  7.93k|{
 1139|  7.93k|  struct Curl_resolv_async *async = data->state.async;
 1140|  8.47k|  for(; async; async = async->next) {
  ------------------
  |  Branch (1140:9): [True: 542, False: 7.93k]
  ------------------
 1141|    542|    Curl_async_shutdown(data, async);
 1142|    542|  }
 1143|  7.93k|}
Curl_resolv_destroy_all:
 1146|  38.1k|{
 1147|  38.6k|  while(data->state.async) {
  ------------------
  |  Branch (1147:9): [True: 542, False: 38.1k]
  ------------------
 1148|    542|    struct Curl_resolv_async *async = data->state.async;
 1149|    542|    data->state.async = async->next;
 1150|    542|    Curl_async_destroy(data, async);
 1151|    542|  }
 1152|  38.1k|}
hostip.c:ipv6works:
  309|  7.94k|{
  310|  7.94k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  7.94k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (310:3): [True: 0, False: 7.94k]
  |  Branch (310:3): [True: 7.94k, False: 0]
  ------------------
  311|  7.94k|  DEBUGASSERT(data->multi);
  ------------------
  |  | 1077|  7.94k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (311:3): [True: 0, False: 7.94k]
  |  Branch (311:3): [True: 7.94k, False: 0]
  ------------------
  312|  7.94k|  return data ? data->multi->ipv6_works : FALSE;
  ------------------
  |  | 1054|  7.94k|#define FALSE false
  ------------------
  |  Branch (312:10): [True: 7.94k, False: 0]
  ------------------
  313|  7.94k|}
hostip.c:hostip_resolv:
  695|  8.11k|{
  696|  8.11k|  size_t hostname_len;
  697|  8.11k|  CURLcode result = RESOLV_FAIL(for_proxy);
  ------------------
  |  |   74|  8.11k|  ((for_proxy) ? CURLE_COULDNT_RESOLVE_PROXY : CURLE_COULDNT_RESOLVE_HOST)
  |  |  ------------------
  |  |  |  Branch (74:4): [True: 2.17k, False: 5.93k]
  |  |  ------------------
  ------------------
  698|  8.11k|  bool cache_dns = FALSE;
  ------------------
  |  | 1054|  8.11k|#define FALSE false
  ------------------
  699|  8.11k|  bool negative = FALSE;
  ------------------
  |  | 1054|  8.11k|#define FALSE false
  ------------------
  700|       |
  701|  8.11k|  (void)timeout_ms; /* not used in all ifdefs */
  702|  8.11k|  *presolv_id = 0;
  703|  8.11k|  *pdns = NULL;
  704|       |
  705|       |#ifdef CURL_DISABLE_DOH
  706|       |  (void)allowDOH;
  707|       |#endif
  708|       |
  709|       |  /* We should intentionally error and not resolve .onion TLDs */
  710|  8.11k|  hostname_len = strlen(hostname);
  711|  8.11k|  DEBUGASSERT(hostname_len);
  ------------------
  |  | 1077|  8.11k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (711:3): [True: 0, False: 8.11k]
  |  Branch (711:3): [True: 8.11k, False: 0]
  ------------------
  712|  8.11k|  if(hostname_len >= 7 &&
  ------------------
  |  Branch (712:6): [True: 7.49k, False: 622]
  ------------------
  713|  7.49k|     (curl_strequal(&hostname[hostname_len - 6], ".onion") ||
  ------------------
  |  Branch (713:7): [True: 0, False: 7.49k]
  ------------------
  714|  7.49k|      curl_strequal(&hostname[hostname_len - 7], ".onion."))) {
  ------------------
  |  Branch (714:7): [True: 0, False: 7.49k]
  ------------------
  715|      0|    failf(data, "Not resolving .onion address (RFC 7686)");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  716|      0|    goto out;
  717|      0|  }
  718|       |
  719|  8.11k|#ifdef DEBUGBUILD
  720|  8.11k|  CURL_TRC_DNS(data, "hostip_resolv(%s:%u, queries=%s)",
  ------------------
  |  |  168|  8.11k|  do {                                 \
  |  |  169|  8.11k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  8.11k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  8.11k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  16.2k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 8.11k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 8.11k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  16.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|  8.11k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  8.11k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  8.11k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 8.11k]
  |  |  ------------------
  ------------------
  721|  8.11k|               hostname, port, Curl_resolv_query_str(dns_queries));
  722|  8.11k|  if((CURL_DNSQ_IP(dns_queries) == CURL_DNSQ_AAAA) &&
  ------------------
  |  |   56|  8.11k|#define CURL_DNSQ_IP(x)       (uint8_t)((x)&(CURL_DNSQ_A | CURL_DNSQ_AAAA))
  |  |  ------------------
  |  |  |  |   51|  8.11k|#define CURL_DNSQ_A           (1U << 0)
  |  |  ------------------
  |  |               #define CURL_DNSQ_IP(x)       (uint8_t)((x)&(CURL_DNSQ_A | CURL_DNSQ_AAAA))
  |  |  ------------------
  |  |  |  |   52|  8.11k|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  ------------------
  ------------------
                if((CURL_DNSQ_IP(dns_queries) == CURL_DNSQ_AAAA) &&
  ------------------
  |  |   52|  8.11k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (722:6): [True: 22, False: 8.09k]
  ------------------
  723|     22|     getenv("CURL_DBG_RESOLV_FAIL_IPV6")) {
  ------------------
  |  Branch (723:6): [True: 0, False: 22]
  ------------------
  724|      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]
  |  |  ------------------
  ------------------
  725|      0|    result = hostip_resolv_failed(data, hostname, for_proxy);
  726|      0|    goto out;
  727|      0|  }
  728|  8.11k|#endif
  729|       |  /* Let's check our DNS cache first */
  730|  8.11k|  result = Curl_dnscache_get(data, dns_queries, hostname, port, pdns);
  731|  8.11k|  if(*pdns) {
  ------------------
  |  Branch (731:6): [True: 29, False: 8.08k]
  ------------------
  732|     29|    infof(data, "Hostname %s was found in DNS cache", hostname);
  ------------------
  |  |  143|     29|  do {                               \
  |  |  144|     29|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     29|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 29, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 29]
  |  |  |  |  ------------------
  |  |  |  |  320|     29|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|     29|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     29|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 29]
  |  |  ------------------
  ------------------
  733|     29|    result = CURLE_OK;
  734|     29|  }
  735|  8.08k|  else if(result) {
  ------------------
  |  Branch (735:11): [True: 9, False: 8.07k]
  ------------------
  736|      9|    infof(data, "Negative DNS entry");
  ------------------
  |  |  143|      9|  do {                               \
  |  |  144|      9|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      9|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 9, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 9]
  |  |  |  |  ------------------
  |  |  |  |  320|      9|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|      9|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      9|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 9]
  |  |  ------------------
  ------------------
  737|      9|    result = hostip_resolv_failed(data, hostname, for_proxy);
  738|      9|  }
  739|  8.07k|  else {
  740|       |    /* No luck, we need to start resolving. */
  741|  8.07k|    cache_dns = TRUE;
  ------------------
  |  | 1051|  8.07k|#define TRUE true
  ------------------
  742|  8.07k|    result = hostip_resolv_start(data, dns_queries, hostname, port,
  743|  8.07k|                                 transport, for_proxy, timeout_ms, allowDOH,
  744|  8.07k|                                 presolv_id, pdns, &negative);
  745|  8.07k|  }
  746|       |
  747|  8.11k|out:
  748|  8.11k|  if(result && (result != CURLE_AGAIN)) {
  ------------------
  |  Branch (748:6): [True: 667, False: 7.44k]
  |  Branch (748:16): [True: 18, False: 649]
  ------------------
  749|     18|    Curl_dns_entry_unlink(data, pdns);
  750|     18|    if(IS_RESOLV_FAIL(result)) {
  ------------------
  |  |   77|     18|  (((result) == CURLE_COULDNT_RESOLVE_HOST) || \
  |  |  ------------------
  |  |  |  Branch (77:4): [True: 9, False: 9]
  |  |  ------------------
  |  |   78|     18|   ((result) == CURLE_COULDNT_RESOLVE_PROXY))
  |  |  ------------------
  |  |  |  Branch (78:4): [True: 0, False: 9]
  |  |  ------------------
  ------------------
  751|      9|      if(cache_dns && negative)
  ------------------
  |  Branch (751:10): [True: 0, False: 9]
  |  Branch (751:23): [True: 0, False: 0]
  ------------------
  752|      0|        Curl_dnscache_add_negative(data, dns_queries, hostname, port);
  753|      9|      failf(data, "Could not resolve: %s:%u", hostname, port);
  ------------------
  |  |   62|      9|#define failf Curl_failf
  ------------------
  754|      9|    }
  755|      9|    else {
  756|      9|      failf(data, "Error %d resolving %s:%u", (int)result, hostname, port);
  ------------------
  |  |   62|      9|#define failf Curl_failf
  ------------------
  757|      9|    }
  758|     18|  }
  759|  8.09k|  else if(cache_dns && *pdns) {
  ------------------
  |  Branch (759:11): [True: 8.06k, False: 29]
  |  Branch (759:24): [True: 7.41k, False: 649]
  ------------------
  760|  7.41k|    result = Curl_dnscache_add(data, *pdns);
  761|  7.41k|    if(result)
  ------------------
  |  Branch (761:8): [True: 0, False: 7.41k]
  ------------------
  762|      0|      Curl_dns_entry_unlink(data, pdns);
  763|  7.41k|  }
  764|       |
  765|  8.11k|  return result;
  766|  8.11k|}
hostip.c:hostip_resolv_failed:
  347|      9|{
  348|      9|  failf(data, "Could not resolve %s: %s",
  ------------------
  |  |   62|      9|#define failf Curl_failf
  ------------------
  349|      9|        for_proxy ? "proxy" : "host", hostname);
  ------------------
  |  Branch (349:9): [True: 0, False: 9]
  ------------------
  350|      9|  return RESOLV_FAIL(for_proxy);
  ------------------
  |  |   74|      9|  ((for_proxy) ? CURLE_COULDNT_RESOLVE_PROXY : CURLE_COULDNT_RESOLVE_HOST)
  |  |  ------------------
  |  |  |  Branch (74:4): [True: 0, False: 9]
  |  |  ------------------
  ------------------
  351|      9|}
hostip.c:hostip_resolv_start:
  552|  8.07k|{
  553|  8.07k|#ifdef USE_CURL_ASYNC
  554|  8.07k|  struct Curl_resolv_async *async = NULL;
  555|  8.07k|#endif
  556|  8.07k|  struct Curl_addrinfo *addr = NULL;
  557|  8.07k|  size_t hostname_len;
  558|  8.07k|  CURLcode result = CURLE_OK;
  559|       |
  560|  8.07k|  *pnegative = FALSE;
  ------------------
  |  | 1054|  8.07k|#define FALSE false
  ------------------
  561|       |
  562|  8.07k|  (void)timeout_ms; /* not in all ifdefs */
  563|  8.07k|  *presolv_id = 0;
  564|  8.07k|  *pdns = NULL;
  565|       |
  566|       |  /* Check for "known" things to resolve ourselves. */
  567|  8.07k|#ifndef USE_RESOLVE_ON_IPS
  568|  8.07k|  if(Curl_is_ipaddr(hostname)) {
  ------------------
  |  Branch (568:6): [True: 7.37k, False: 703]
  ------------------
  569|       |    /* test655 verifies that the announce is done, even though there
  570|       |     * is no real resolving. So, keep doing this. */
  571|  7.37k|    result = Curl_resolv_announce_start(data, NULL);
  572|  7.37k|    if(result)
  ------------------
  |  Branch (572:8): [True: 0, False: 7.37k]
  ------------------
  573|      0|      goto out;
  574|       |    /* shortcut literal IP addresses, if we are not told to resolve them. */
  575|  7.37k|    result = Curl_str2addr(hostname, port, &addr);
  576|  7.37k|    goto out;
  577|  7.37k|  }
  578|    703|#endif
  579|       |
  580|    703|  hostname_len = strlen(hostname);
  581|    703|  if(curl_strequal(hostname, "localhost") ||
  ------------------
  |  Branch (581:6): [True: 30, False: 673]
  ------------------
  582|    673|     curl_strequal(hostname, "localhost.") ||
  ------------------
  |  Branch (582:6): [True: 13, False: 660]
  ------------------
  583|    660|     tailmatch(hostname, hostname_len, STRCONST(".localhost")) ||
  ------------------
  |  | 1297|    660|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (583:6): [True: 1, False: 659]
  ------------------
  584|    659|     tailmatch(hostname, hostname_len, STRCONST(".localhost."))) {
  ------------------
  |  | 1297|    659|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (584:6): [True: 1, False: 658]
  ------------------
  585|     45|    result = Curl_resolv_announce_start(data, NULL);
  586|     45|    if(result)
  ------------------
  |  Branch (586:8): [True: 0, False: 45]
  ------------------
  587|      0|      goto out;
  588|     45|    addr = get_localhost(port, hostname);
  589|     45|    if(!addr)
  ------------------
  |  Branch (589:8): [True: 0, False: 45]
  ------------------
  590|      0|      result = CURLE_OUT_OF_MEMORY;
  591|     45|    goto out;
  592|     45|  }
  593|       |
  594|    658|#ifndef CURL_DISABLE_DOH
  595|    658|  if(!Curl_is_ipaddr(hostname) && allowDOH && data->set.doh) {
  ------------------
  |  Branch (595:6): [True: 658, False: 0]
  |  Branch (595:35): [True: 551, False: 107]
  |  Branch (595:47): [True: 326, False: 225]
  ------------------
  596|    326|    result = Curl_resolv_announce_start(data, NULL);
  597|    326|    if(result)
  ------------------
  |  Branch (597:8): [True: 0, False: 326]
  ------------------
  598|      0|      goto out;
  599|    326|    if(!async) {
  ------------------
  |  Branch (599:8): [True: 326, False: 0]
  ------------------
  600|    326|      async = hostip_async_new(data, dns_queries, hostname, port,
  601|    326|                               transport, for_proxy, timeout_ms);
  602|    326|      if(!async) {
  ------------------
  |  Branch (602:10): [True: 0, False: 326]
  ------------------
  603|      0|        result = CURLE_OUT_OF_MEMORY;
  604|      0|        goto out;
  605|      0|      }
  606|    326|    }
  607|    326|    result = Curl_doh(data, async);
  608|    326|    goto out;
  609|    326|  }
  610|       |#else
  611|       |  (void)allowDOH;
  612|       |#endif
  613|       |
  614|       |  /* Can we provide the requested IP specifics in resolving? */
  615|    332|  if(!can_resolve_dns_queries(data, dns_queries)) {
  ------------------
  |  Branch (615:6): [True: 0, False: 332]
  ------------------
  616|      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]
  |  |  ------------------
  ------------------
  617|      0|    goto out;
  618|      0|  }
  619|       |
  620|    332|#ifdef CURLRES_ASYNCH
  621|    332|  (void)addr;
  622|    332|  if(!async) {
  ------------------
  |  Branch (622:6): [True: 332, False: 0]
  ------------------
  623|    332|    async = hostip_async_new(data, dns_queries, hostname, port,
  624|    332|                             transport, for_proxy, timeout_ms);
  625|    332|    if(!async) {
  ------------------
  |  Branch (625:8): [True: 0, False: 332]
  ------------------
  626|      0|      result = CURLE_OUT_OF_MEMORY;
  627|      0|      goto out;
  628|      0|    }
  629|    332|  }
  630|    332|  result = Curl_async_getaddrinfo(data, async);
  631|    332|  if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (631:6): [True: 0, False: 332]
  ------------------
  632|       |    /* the answer might be there already. Check. */
  633|      0|    CURLcode r2 = hostip_resolv_take_result(data, async, pdns);
  634|      0|    if(r2)
  ------------------
  |  Branch (634:8): [True: 0, False: 0]
  ------------------
  635|      0|      result = r2;
  636|      0|    else if(*pdns)
  ------------------
  |  Branch (636:13): [True: 0, False: 0]
  ------------------
  637|      0|      result = CURLE_OK;
  638|      0|  }
  639|       |#else
  640|       |  result = Curl_resolv_announce_start(data, NULL);
  641|       |  if(result)
  642|       |    goto out;
  643|       |  addr = Curl_sync_getaddrinfo(data, dns_queries, hostname, port, transport);
  644|       |  if(!addr) {
  645|       |    result = RESOLV_FAIL(for_proxy);
  646|       |    /* the synchronous resolvers do not tell a transient failure from
  647|       |       an authoritative negative answer, treat it as before */
  648|       |    *pnegative = TRUE;
  649|       |  }
  650|       |#endif
  651|       |
  652|  8.07k|out:
  653|  8.07k|  if(!result) {
  ------------------
  |  Branch (653:6): [True: 8.06k, False: 9]
  ------------------
  654|  8.06k|    if(addr) {
  ------------------
  |  Branch (654:8): [True: 7.41k, False: 649]
  ------------------
  655|       |      /* we got a response, create a dns entry, add to cache, return */
  656|  7.41k|      DEBUGASSERT(!*pdns);
  ------------------
  |  | 1077|  7.41k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (656:7): [True: 0, False: 7.41k]
  |  Branch (656:7): [True: 7.41k, False: 0]
  ------------------
  657|  7.41k|      *pdns = Curl_dnscache_mk_entry(data, dns_queries, &addr, hostname, port);
  658|  7.41k|      if(!*pdns)
  ------------------
  |  Branch (658:10): [True: 0, False: 7.41k]
  ------------------
  659|      0|        result = CURLE_OUT_OF_MEMORY;
  660|  7.41k|    }
  661|    649|    else if(!*pdns)
  ------------------
  |  Branch (661:13): [True: 649, False: 0]
  ------------------
  662|    649|      result = CURLE_AGAIN;
  663|  8.06k|  }
  664|      9|  else if(*pdns)
  ------------------
  |  Branch (664:11): [True: 0, False: 9]
  ------------------
  665|      0|    Curl_dns_entry_unlink(data, pdns);
  666|      9|  else if(addr)
  ------------------
  |  Branch (666:11): [True: 0, False: 9]
  ------------------
  667|      0|    Curl_freeaddrinfo(addr);
  668|       |
  669|  8.07k|#ifdef USE_CURL_ASYNC
  670|  8.07k|  if(async) {
  ------------------
  |  Branch (670:6): [True: 658, False: 7.41k]
  ------------------
  671|    658|    if(result == CURLE_AGAIN) { /* still need it, link, return id. */
  ------------------
  |  Branch (671:8): [True: 649, False: 9]
  ------------------
  672|    649|      *presolv_id = async->id;
  673|    649|      async->next = data->state.async;
  674|    649|      data->state.async = async;
  675|    649|    }
  676|      9|    else {
  677|      9|      *pnegative = !!async->negative_answer;
  678|      9|      Curl_async_destroy(data, async);
  679|      9|    }
  680|    658|  }
  681|  8.07k|#endif
  682|  8.07k|  return result;
  683|  8.07k|}
hostip.c:tailmatch:
  338|  1.31k|{
  339|  1.31k|  if(plen > flen)
  ------------------
  |  Branch (339:6): [True: 1.14k, False: 175]
  ------------------
  340|  1.14k|    return FALSE;
  ------------------
  |  | 1054|  1.14k|#define FALSE false
  ------------------
  341|    175|  return curl_strnequal(part, &full[flen - plen], plen);
  342|  1.31k|}
hostip.c:get_localhost:
  248|     45|{
  249|     45|  struct Curl_addrinfo *ca;
  250|     45|  struct Curl_addrinfo *ca6;
  251|     45|  const size_t ss_size = sizeof(struct sockaddr_in);
  252|     45|  const size_t hostlen = strlen(name);
  253|     45|  struct sockaddr_in sa;
  254|     45|  unsigned int ipv4;
  255|     45|  unsigned short port16 = (unsigned short)(port & 0xffff);
  256|       |
  257|       |  /* memset to clear the sa.sin_zero field */
  258|     45|  memset(&sa, 0, sizeof(sa));
  259|     45|  sa.sin_family = AF_INET;
  260|     45|  sa.sin_port = htons(port16);
  261|     45|  if(curlx_inet_pton(AF_INET, "127.0.0.1", (char *)&ipv4) < 1)
  ------------------
  |  Branch (261:6): [True: 0, False: 45]
  ------------------
  262|      0|    return NULL;
  263|     45|  memcpy(&sa.sin_addr, &ipv4, sizeof(ipv4));
  264|       |
  265|     45|  ca = curlx_calloc(1, sizeof(struct Curl_addrinfo) + ss_size + hostlen + 1);
  ------------------
  |  | 1485|     45|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  266|     45|  if(!ca)
  ------------------
  |  Branch (266:6): [True: 0, False: 45]
  ------------------
  267|      0|    return NULL;
  268|     45|  ca->ai_flags     = 0;
  269|     45|  ca->ai_family    = AF_INET;
  270|     45|  ca->ai_socktype  = SOCK_STREAM;
  271|     45|  ca->ai_protocol  = IPPROTO_TCP;
  272|     45|  ca->ai_addrlen   = (curl_socklen_t)ss_size;
  273|     45|  ca->ai_addr = (void *)((char *)ca + sizeof(struct Curl_addrinfo));
  274|     45|  memcpy(ca->ai_addr, &sa, ss_size);
  275|     45|  ca->ai_canonname = (char *)ca->ai_addr + ss_size;
  276|     45|  curlx_strcopy(ca->ai_canonname, hostlen + 1, name, hostlen);
  277|       |
  278|     45|  ca6 = get_localhost6(port, name);
  279|     45|  if(!ca6)
  ------------------
  |  Branch (279:6): [True: 0, False: 45]
  ------------------
  280|      0|    return ca;
  281|     45|  ca6->ai_next = ca;
  282|     45|  return ca6;
  283|     45|}
hostip.c:get_localhost6:
  212|     45|{
  213|     45|  struct Curl_addrinfo *ca;
  214|     45|  const size_t ss_size = sizeof(struct sockaddr_in6);
  215|     45|  const size_t hostlen = strlen(name);
  216|     45|  struct sockaddr_in6 sa6;
  217|     45|  unsigned char ipv6[16];
  218|     45|  unsigned short port16 = (unsigned short)(port & 0xffff);
  219|     45|  ca = curlx_calloc(1, sizeof(struct Curl_addrinfo) + ss_size + hostlen + 1);
  ------------------
  |  | 1485|     45|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  220|     45|  if(!ca)
  ------------------
  |  Branch (220:6): [True: 0, False: 45]
  ------------------
  221|      0|    return NULL;
  222|       |
  223|     45|  memset(&sa6, 0, sizeof(sa6));
  224|     45|  sa6.sin6_family = AF_INET6;
  225|     45|  sa6.sin6_port = htons(port16);
  226|       |
  227|     45|  (void)curlx_inet_pton(AF_INET6, "::1", ipv6);
  228|     45|  memcpy(&sa6.sin6_addr, ipv6, sizeof(ipv6));
  229|       |
  230|     45|  ca->ai_flags     = 0;
  231|     45|  ca->ai_family    = AF_INET6;
  232|     45|  ca->ai_socktype  = SOCK_STREAM;
  233|     45|  ca->ai_protocol  = IPPROTO_TCP;
  234|     45|  ca->ai_addrlen   = (curl_socklen_t)ss_size;
  235|       |  ca->ai_next      = NULL;
  236|     45|  ca->ai_addr = (void *)((char *)ca + sizeof(struct Curl_addrinfo));
  237|     45|  memcpy(ca->ai_addr, &sa6, ss_size);
  238|     45|  ca->ai_canonname = (char *)ca->ai_addr + ss_size;
  239|     45|  curlx_strcopy(ca->ai_canonname, hostlen + 1, name, hostlen);
  240|     45|  return ca;
  241|     45|}
hostip.c:hostip_async_new:
  390|    658|{
  391|    658|  struct Curl_resolv_async *async;
  392|    658|  size_t hostlen = strlen(hostname);
  393|       |
  394|    658|  if(!data->multi) {
  ------------------
  |  Branch (394:6): [True: 0, False: 658]
  ------------------
  395|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1077|      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|    658|  async = curlx_calloc(1, sizeof(*async) + hostlen);
  ------------------
  |  | 1485|    658|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  401|    658|  if(!async)
  ------------------
  |  Branch (401:6): [True: 0, False: 658]
  ------------------
  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|    658|  if(data->multi->last_resolv_id == UINT32_MAX)
  ------------------
  |  Branch (409:6): [True: 0, False: 658]
  ------------------
  410|      0|    data->multi->last_resolv_id = 1; /* wrap around */
  411|    658|  else
  412|    658|    data->multi->last_resolv_id++;
  413|    658|  async->id = data->multi->last_resolv_id;
  414|    658|  async->dns_queries = dns_queries;
  415|    658|  async->port = port;
  416|    658|  async->transport = transport;
  417|    658|  async->for_proxy = for_proxy;
  418|    658|  async->start = *Curl_pgrs_now(data);
  419|    658|  async->timeout_ms = timeout_ms;
  420|    658|  if(hostlen) {
  ------------------
  |  Branch (420:6): [True: 658, False: 0]
  ------------------
  421|    658|    memcpy(async->hostname, hostname, hostlen);
  422|    658|    async->is_ipaddr = Curl_is_ipaddr(async->hostname);
  423|    658|    if(async->is_ipaddr)
  ------------------
  |  Branch (423:8): [True: 0, False: 658]
  ------------------
  424|      0|      async->is_ipv4addr = Curl_is_ipv4addr(async->hostname);
  425|    658|  }
  426|       |
  427|    658|  return async;
  428|    658|}
hostip.c:can_resolve_dns_queries:
  355|    332|{
  356|    332|  (void)data;
  357|    332|  if((CURL_DNSQ_IP(dns_queries) == CURL_DNSQ_AAAA) && !ipv6works(data))
  ------------------
  |  |   56|    332|#define CURL_DNSQ_IP(x)       (uint8_t)((x)&(CURL_DNSQ_A | CURL_DNSQ_AAAA))
  |  |  ------------------
  |  |  |  |   51|    332|#define CURL_DNSQ_A           (1U << 0)
  |  |  ------------------
  |  |               #define CURL_DNSQ_IP(x)       (uint8_t)((x)&(CURL_DNSQ_A | CURL_DNSQ_AAAA))
  |  |  ------------------
  |  |  |  |   52|    332|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  ------------------
  ------------------
                if((CURL_DNSQ_IP(dns_queries) == CURL_DNSQ_AAAA) && !ipv6works(data))
  ------------------
  |  |   52|    332|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (357:6): [True: 17, False: 315]
  |  Branch (357:55): [True: 0, False: 17]
  ------------------
  358|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  359|    332|  return TRUE;
  ------------------
  |  | 1051|    332|#define TRUE true
  ------------------
  360|    332|}
hostip.c:resolv_unix:
  953|     24|{
  954|     24|  struct Curl_addrinfo *addr;
  955|     24|  CURLcode result;
  956|       |
  957|     24|  DEBUGASSERT(unix_path);
  ------------------
  |  | 1077|     24|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (957:3): [True: 0, False: 24]
  |  Branch (957:3): [True: 24, False: 0]
  ------------------
  958|     24|  *pdns = NULL;
  959|       |
  960|     24|  result = Curl_unix2addr(unix_path, abstract_path, &addr);
  961|     24|  if(result) {
  ------------------
  |  Branch (961:6): [True: 1, False: 23]
  ------------------
  962|      1|    if(result == CURLE_TOO_LARGE) {
  ------------------
  |  Branch (962:8): [True: 1, False: 0]
  ------------------
  963|       |      /* Long paths are not supported for now */
  964|      1|      failf(data, "Unix socket path too long: '%s'", unix_path);
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  965|      1|      result = CURLE_COULDNT_RESOLVE_HOST;
  966|      1|    }
  967|      1|    return result;
  968|      1|  }
  969|       |
  970|     23|  *pdns = Curl_dnscache_mk_entry(data, 0, &addr, NULL, 0);
  971|     23|  return *pdns ? CURLE_OK : CURLE_OUT_OF_MEMORY;
  ------------------
  |  Branch (971:10): [True: 23, False: 0]
  ------------------
  972|     24|}
hostip.c:hostip_resolv_take_result:
  433|  1.07k|{
  434|  1.07k|  CURLcode result;
  435|       |
  436|       |  /* If async resolving is ongoing, this must be set */
  437|  1.07k|  if(!async)
  ------------------
  |  Branch (437:6): [True: 0, False: 1.07k]
  ------------------
  438|      0|    return CURLE_FAILED_INIT;
  439|       |
  440|  1.07k|#ifndef CURL_DISABLE_DOH
  441|  1.07k|  if(async->doh)
  ------------------
  |  Branch (441:6): [True: 630, False: 447]
  ------------------
  442|    630|    result = Curl_doh_take_result(data, async, pdns);
  443|    447|  else
  444|    447|#endif
  445|    447|  result = Curl_async_take_result(data, async, pdns);
  446|       |
  447|  1.07k|  if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (447:6): [True: 933, False: 144]
  ------------------
  448|    933|    CURL_TRC_DNS(data, "resolve incomplete, queries=%s, responses=%s, "
  ------------------
  |  |  168|    933|  do {                                 \
  |  |  169|    933|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|    933|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    933|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  1.86k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 933, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 933]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  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|    933|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|    933|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|    933|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 933]
  |  |  ------------------
  ------------------
  449|    933|                 "ongoing=%d for %s:%d",
  450|    933|                 Curl_resolv_query_str(async->dns_queries),
  451|    933|                 Curl_resolv_query_str(async->dns_responses),
  452|    933|                 async->queries_ongoing, async->hostname, async->port);
  453|    933|    result = CURLE_OK;
  454|    933|  }
  455|    144|  else if(IS_RESOLV_FAIL(result)) {
  ------------------
  |  |   77|    144|  (((result) == CURLE_COULDNT_RESOLVE_HOST) || \
  |  |  ------------------
  |  |  |  Branch (77:4): [True: 132, False: 12]
  |  |  ------------------
  |  |   78|    144|   ((result) == CURLE_COULDNT_RESOLVE_PROXY))
  |  |  ------------------
  |  |  |  Branch (78:4): [True: 12, False: 0]
  |  |  ------------------
  ------------------
  456|    144|    result = Curl_async_failed(data, async, NULL);
  457|    144|  }
  458|      0|  else if(result) {
  ------------------
  |  Branch (458:11): [True: 0, False: 0]
  ------------------
  459|       |    /* a local failure, not a resolve answer. Keep the error as it
  460|       |       is so it does not get treated as one. */
  461|      0|    CURL_TRC_DNS(data, "resolve error %d for %s:%u",
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  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]
  |  |  ------------------
  ------------------
  462|      0|                 (int)result, async->hostname, async->port);
  463|      0|  }
  464|      0|  else {
  465|      0|    CURL_TRC_DNS(data, "resolve complete for %s:%u",
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  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]
  |  |  ------------------
  ------------------
  466|      0|                 async->hostname, async->port);
  467|      0|    DEBUGASSERT(*pdns);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (467:5): [True: 0, False: 0]
  |  Branch (467:5): [True: 0, False: 0]
  ------------------
  468|      0|  }
  469|       |
  470|  1.07k|  return result;
  471|  1.07k|}

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

Curl_http_neg_init:
   89|  9.76k|{
   90|  9.76k|  memset(neg, 0, sizeof(*neg));
   91|  9.76k|  neg->accept_09 = data->set.http09_allowed;
   92|  9.76k|  switch(data->set.httpwant) {
   93|      1|  case CURL_HTTP_VERSION_1_0:
  ------------------
  |  | 2321|      1|#define CURL_HTTP_VERSION_1_0   1L /* please use HTTP 1.0 in the request */
  ------------------
  |  Branch (93:3): [True: 1, False: 9.76k]
  ------------------
   94|      1|    neg->wanted = neg->allowed = (CURL_HTTP_V1x);
  ------------------
  |  |   40|      1|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
   95|      1|    neg->only_10 = TRUE;
  ------------------
  |  | 1051|      1|#define TRUE true
  ------------------
   96|      1|    break;
   97|      1|  case CURL_HTTP_VERSION_1_1:
  ------------------
  |  | 2322|      1|#define CURL_HTTP_VERSION_1_1   2L /* please use HTTP 1.1 in the request */
  ------------------
  |  Branch (97:3): [True: 1, False: 9.76k]
  ------------------
   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:
  ------------------
  |  | 2323|      1|#define CURL_HTTP_VERSION_2_0   3L /* please use HTTP 2 in the request */
  ------------------
  |  Branch (100:3): [True: 1, False: 9.76k]
  ------------------
  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;
  ------------------
  |  | 1051|      1|#define TRUE true
  ------------------
  103|      1|    break;
  104|    615|  case CURL_HTTP_VERSION_2TLS:
  ------------------
  |  | 2324|    615|#define CURL_HTTP_VERSION_2TLS  4L /* use version 2 for HTTPS, version 1.1 for
  ------------------
  |  Branch (104:3): [True: 615, False: 9.14k]
  ------------------
  105|    615|    neg->wanted = neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   40|    615|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->wanted = neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   41|    615|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  106|    615|    break;
  107|      1|  case CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE:
  ------------------
  |  | 2326|      1|#define CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE 5L /* please use HTTP 2 without
  ------------------
  |  Branch (107:3): [True: 1, False: 9.76k]
  ------------------
  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;
  ------------------
  |  | 1051|      1|#define TRUE true
  ------------------
  110|      1|    break;
  111|      0|  case CURL_HTTP_VERSION_3:
  ------------------
  |  | 2328|      0|#define CURL_HTTP_VERSION_3     30L /* Use HTTP/3, fallback to HTTP/2 or
  ------------------
  |  Branch (111:3): [True: 0, False: 9.76k]
  ------------------
  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:
  ------------------
  |  | 2332|      0|#define CURL_HTTP_VERSION_3ONLY 31L /* Use HTTP/3 without fallback. For
  ------------------
  |  Branch (115:3): [True: 0, False: 9.76k]
  ------------------
  116|      0|    neg->wanted = neg->allowed = (CURL_HTTP_V3x);
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  117|      0|    break;
  118|  9.14k|  case CURL_HTTP_VERSION_NONE:
  ------------------
  |  | 2318|  9.14k|#define CURL_HTTP_VERSION_NONE  0L /* setting this means we do not care, and
  ------------------
  |  Branch (118:3): [True: 9.14k, False: 619]
  ------------------
  119|  9.14k|  default:
  ------------------
  |  Branch (119:3): [True: 0, False: 9.76k]
  ------------------
  120|  9.14k|    neg->wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   40|  9.14k|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   41|  9.14k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  121|  9.14k|    neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   40|  9.14k|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   41|  9.14k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
                  neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   42|  9.14k|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  122|  9.14k|    break;
  123|  9.76k|  }
  124|  9.76k|}
Curl_http_setup_conn:
  128|    425|{
  129|       |  /* allocate the HTTP-specific struct for the Curl_easy, only to survive
  130|       |     during this request */
  131|    425|  if(data->state.http_neg.wanted == CURL_HTTP_V3x) {
  ------------------
  |  |   42|    425|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  |  Branch (131:6): [True: 0, False: 425]
  ------------------
  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|    425|  return CURLE_OK;
  138|    425|}
Curl_checkProxyheaders:
  154|  4.34k|{
  155|  4.34k|  struct curl_slist *head;
  156|       |
  157|  4.34k|  for(head = (conn->http_proxy.peer && data->set.sep_headers) ?
  ------------------
  |  Branch (157:15): [True: 4.34k, False: 0]
  |  Branch (157:40): [True: 3.73k, False: 608]
  ------------------
  158|  3.73k|        data->set.proxyheaders : data->set.headers;
  159|  45.7k|      head; head = head->next) {
  ------------------
  |  Branch (159:7): [True: 41.3k, False: 4.33k]
  ------------------
  160|  41.3k|    if(curl_strnequal(head->data, thisheader, thislen) &&
  ------------------
  |  Branch (160:8): [True: 742, False: 40.6k]
  ------------------
  161|    742|       Curl_headersep(head->data[thislen]))
  ------------------
  |  |   26|    742|#define Curl_headersep(x) ((((x) == ':') || ((x) == ';')))
  |  |  ------------------
  |  |  |  Branch (26:29): [True: 1, False: 741]
  |  |  |  Branch (26:45): [True: 4, False: 737]
  |  |  ------------------
  ------------------
  162|      5|      return head->data;
  163|  41.3k|  }
  164|       |
  165|  4.33k|  return NULL;
  166|  4.34k|}
Curl_http_auth_act:
  553|     23|{
  554|     23|  struct connectdata *conn = data->conn;
  555|     23|  bool pickhost = FALSE;
  ------------------
  |  | 1054|     23|#define FALSE false
  ------------------
  556|     23|  bool pickproxy = FALSE;
  ------------------
  |  | 1054|     23|#define FALSE false
  ------------------
  557|     23|  CURLcode result = CURLE_OK;
  558|     23|  unsigned long authmask = ~0UL;
  559|       |
  560|     23|  if(!Curl_creds_has_oauth_bearer(data->state.creds))
  ------------------
  |  |   78|     23|#define Curl_creds_has_oauth_bearer(c)   ((c) && (c)->oauth_bearer[0])
  |  |  ------------------
  |  |  |  Branch (78:43): [True: 1, False: 22]
  |  |  |  Branch (78:50): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  561|     23|    authmask &= (unsigned long)~CURLAUTH_BEARER;
  ------------------
  |  |  844|     23|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  562|       |
  563|     23|  if(100 <= data->req.httpcode && data->req.httpcode <= 199)
  ------------------
  |  Branch (563:6): [True: 5, False: 18]
  |  Branch (563:35): [True: 3, False: 2]
  ------------------
  564|       |    /* this is a transient response code, ignore */
  565|      3|    return CURLE_OK;
  566|       |
  567|     20|  if(data->state.authproblem)
  ------------------
  |  Branch (567:6): [True: 0, False: 20]
  ------------------
  568|      0|    return data->set.http_fail_on_error ? CURLE_HTTP_RETURNED_ERROR : CURLE_OK;
  ------------------
  |  Branch (568:12): [True: 0, False: 0]
  ------------------
  569|       |
  570|     20|  if(data->state.creds &&
  ------------------
  |  Branch (570:6): [True: 1, False: 19]
  ------------------
  571|      1|     ((data->req.httpcode == 401) ||
  ------------------
  |  Branch (571:7): [True: 0, False: 1]
  ------------------
  572|      1|      (data->req.authneg && data->req.httpcode < 300))) {
  ------------------
  |  Branch (572:8): [True: 0, False: 1]
  |  Branch (572:29): [True: 0, False: 0]
  ------------------
  573|      0|    pickhost = pickoneauth(&data->state.authhost, authmask, data->state.creds);
  574|      0|    if(!pickhost)
  ------------------
  |  Branch (574:8): [True: 0, False: 0]
  ------------------
  575|      0|      data->state.authproblem = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  576|      0|    else
  577|      0|      data->info.httpauthpicked = data->state.authhost.picked;
  578|      0|    if(data->state.authhost.picked == CURLAUTH_NTLM &&
  ------------------
  |  |  838|      0|#define CURLAUTH_NTLM         (((unsigned long)1) << 3)
  ------------------
  |  Branch (578:8): [True: 0, False: 0]
  ------------------
  579|      0|       (data->req.httpversion_sent > 11)) {
  ------------------
  |  Branch (579:8): [True: 0, False: 0]
  ------------------
  580|      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]
  |  |  ------------------
  ------------------
  581|      0|      connclose(conn, "Force HTTP/1.1 connection");
  ------------------
  |  |   97|      0|#define connclose(x, y)   Curl_conncontrol(x, CONNCTRL_CONNECTION, y)
  |  |  ------------------
  |  |  |  |   85|      0|#define CONNCTRL_CONNECTION 1
  |  |  ------------------
  ------------------
  582|      0|      data->state.http_neg.wanted = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  583|      0|      data->state.http_neg.allowed = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  584|      0|    }
  585|      0|  }
  586|     20|#ifndef CURL_DISABLE_PROXY
  587|     20|  if(conn->http_proxy.creds &&
  ------------------
  |  Branch (587:6): [True: 7, False: 13]
  ------------------
  588|      7|     ((data->req.httpcode == 407) ||
  ------------------
  |  Branch (588:7): [True: 0, False: 7]
  ------------------
  589|      7|      (data->req.authneg && data->req.httpcode < 300))) {
  ------------------
  |  Branch (589:8): [True: 0, False: 7]
  |  Branch (589:29): [True: 0, False: 0]
  ------------------
  590|      0|    pickproxy = pickoneauth(&data->state.authproxy,
  591|      0|                            authmask & ~CURLAUTH_BEARER,
  ------------------
  |  |  844|      0|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  592|      0|                            conn->http_proxy.creds);
  593|      0|    if(!pickproxy)
  ------------------
  |  Branch (593:8): [True: 0, False: 0]
  ------------------
  594|      0|      data->state.authproblem = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  595|      0|    else
  596|      0|      data->info.proxyauthpicked = data->state.authproxy.picked;
  597|      0|  }
  598|     20|#endif
  599|       |
  600|     20|  if(pickhost || pickproxy) {
  ------------------
  |  Branch (600:6): [True: 0, False: 20]
  |  Branch (600:18): [True: 0, False: 20]
  ------------------
  601|      0|    result = http_perhapsrewind(data, conn);
  602|      0|    if(result)
  ------------------
  |  Branch (602:8): [True: 0, False: 0]
  ------------------
  603|      0|      return result;
  604|       |
  605|       |    /* In case this is GSS auth, the newurl field is already allocated so
  606|       |       we must make sure to free it before allocating a new one. As figured
  607|       |       out in bug #2284386 */
  608|      0|    curlx_free(data->req.newurl);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  609|       |    /* clone URL */
  610|      0|    data->req.newurl = Curl_bufref_dup(&data->state.url);
  ------------------
  |  |   49|      0|#define Curl_bufref_dup(x) curlx_strdup(Curl_bufref_ptr(x))
  |  |  ------------------
  |  |  |  | 1482|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
  611|      0|    if(!data->req.newurl)
  ------------------
  |  Branch (611:8): [True: 0, False: 0]
  ------------------
  612|      0|      return CURLE_OUT_OF_MEMORY;
  613|      0|  }
  614|     20|  else if((data->req.httpcode < 300) &&
  ------------------
  |  Branch (614:11): [True: 18, False: 2]
  ------------------
  615|     18|          !data->state.authhost.done &&
  ------------------
  |  Branch (615:11): [True: 1, False: 17]
  ------------------
  616|      1|          data->req.authneg) {
  ------------------
  |  Branch (616:11): [True: 0, False: 1]
  ------------------
  617|       |    /* no (known) authentication available,
  618|       |       authentication is not "done" yet and
  619|       |       no authentication seems to be required and
  620|       |       we did not try HEAD or GET */
  621|      0|    if((data->state.httpreq != HTTPREQ_GET) &&
  ------------------
  |  Branch (621:8): [True: 0, False: 0]
  ------------------
  622|      0|       (data->state.httpreq != HTTPREQ_HEAD)) {
  ------------------
  |  Branch (622:8): [True: 0, False: 0]
  ------------------
  623|       |      /* clone URL */
  624|      0|      data->req.newurl = Curl_bufref_dup(&data->state.url);
  ------------------
  |  |   49|      0|#define Curl_bufref_dup(x) curlx_strdup(Curl_bufref_ptr(x))
  |  |  ------------------
  |  |  |  | 1482|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
  625|      0|      if(!data->req.newurl)
  ------------------
  |  Branch (625:10): [True: 0, False: 0]
  ------------------
  626|      0|        return CURLE_OUT_OF_MEMORY;
  627|      0|      data->state.authhost.done = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  628|      0|    }
  629|      0|  }
  630|     20|  if(http_should_fail(data, data->req.httpcode)) {
  ------------------
  |  Branch (630:6): [True: 0, False: 20]
  ------------------
  631|      0|    failf(data, "The requested URL returned error: %d",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  632|      0|          data->req.httpcode);
  633|      0|    result = CURLE_HTTP_RETURNED_ERROR;
  634|      0|  }
  635|       |
  636|     20|  return result;
  637|     20|}
Curl_http_output_auth:
  778|  1.22k|{
  779|  1.22k|  CURLcode result = CURLE_OK;
  780|  1.22k|  struct auth *authhost;
  781|  1.22k|  struct auth *authproxy;
  782|  1.22k|  const char *path_and_query = path;
  783|  1.22k|  char *tmp_str = NULL;
  784|       |
  785|  1.22k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  1.22k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (785:3): [True: 0, False: 1.22k]
  |  Branch (785:3): [True: 1.22k, False: 0]
  ------------------
  786|  1.22k|  authhost = &data->state.authhost;
  787|  1.22k|  authproxy = &data->state.authproxy;
  788|       |
  789|  1.22k|  if(
  790|  1.22k|#ifndef CURL_DISABLE_PROXY
  791|  1.22k|    (!conn->http_proxy.peer || !conn->http_proxy.creds) &&
  ------------------
  |  Branch (791:6): [True: 0, False: 1.22k]
  |  Branch (791:32): [True: 176, False: 1.05k]
  ------------------
  792|    176|#endif
  793|       |#ifdef USE_SPNEGO
  794|       |    !(authhost->want & CURLAUTH_NEGOTIATE) &&
  795|       |    !(authproxy->want & CURLAUTH_NEGOTIATE) &&
  796|       |#endif
  797|    176|    !data->state.creds) {
  ------------------
  |  Branch (797:5): [True: 169, False: 7]
  ------------------
  798|       |    /* no authentication with no user or password */
  799|    169|    authhost->done = TRUE;
  ------------------
  |  | 1051|    169|#define TRUE true
  ------------------
  800|    169|    authproxy->done = TRUE;
  ------------------
  |  | 1051|    169|#define TRUE true
  ------------------
  801|    169|    result = CURLE_OK;
  802|    169|    goto out;
  803|    169|  }
  804|       |
  805|  1.05k|  if(query) {
  ------------------
  |  Branch (805:6): [True: 0, False: 1.05k]
  ------------------
  806|      0|    tmp_str = curl_maprintf("%s?%s", path, query);
  807|      0|    if(!tmp_str) {
  ------------------
  |  Branch (807:8): [True: 0, False: 0]
  ------------------
  808|      0|      result = CURLE_OUT_OF_MEMORY;
  809|      0|      goto out;
  810|      0|    }
  811|      0|    path_and_query = tmp_str;
  812|      0|  }
  813|       |
  814|  1.05k|  if(authhost->want && !authhost->picked)
  ------------------
  |  Branch (814:6): [True: 1.05k, False: 1]
  |  Branch (814:24): [True: 1.05k, False: 0]
  ------------------
  815|       |    /* The app has selected one or more methods, but none has been picked
  816|       |       so far by a server round-trip. Then we set the picked one to the
  817|       |       want one, and if this is one single bit it will be used instantly. */
  818|  1.05k|    authhost->picked = authhost->want;
  819|       |
  820|  1.05k|  if(authproxy->want && !authproxy->picked)
  ------------------
  |  Branch (820:6): [True: 1.05k, False: 1]
  |  Branch (820:25): [True: 1.05k, False: 0]
  ------------------
  821|       |    /* The app has selected one or more methods, but none has been picked so
  822|       |       far by a proxy round-trip. Then we set the picked one to the want one,
  823|       |       and if this is one single bit it will be used instantly. */
  824|  1.05k|    authproxy->picked = authproxy->want;
  825|       |
  826|  1.05k|#ifndef CURL_DISABLE_PROXY
  827|       |  /* Send proxy authentication header if needed */
  828|  1.05k|  if(conn->bits.origin_is_proxy || is_connect) {
  ------------------
  |  Branch (828:6): [True: 0, False: 1.05k]
  |  Branch (828:36): [True: 1.05k, False: 0]
  ------------------
  829|  1.05k|    result = output_auth_headers(data, conn, authproxy, request,
  830|  1.05k|                                 path_and_query, TRUE);
  ------------------
  |  | 1051|  1.05k|#define TRUE true
  ------------------
  831|  1.05k|    if(result)
  ------------------
  |  Branch (831:8): [True: 0, False: 1.05k]
  ------------------
  832|      0|      goto out;
  833|  1.05k|  }
  834|      0|  else
  835|       |#else
  836|       |  (void)is_connect;
  837|       |#endif /* CURL_DISABLE_PROXY */
  838|       |    /* we have no proxy so let's pretend we are done authenticating
  839|       |       with it */
  840|      0|    authproxy->done = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  841|       |
  842|       |  /* Either we have credentials for the origin we talk to or
  843|       |     performing authentication is allowed here */
  844|  1.05k|  if(data->state.creds || Curl_auth_allowed_to_host(data))
  ------------------
  |  Branch (844:6): [True: 70, False: 988]
  |  Branch (844:27): [True: 988, False: 0]
  ------------------
  845|  1.05k|    result = output_auth_headers(data, conn, authhost, request,
  846|  1.05k|                                 path_and_query, FALSE);
  ------------------
  |  | 1054|  1.05k|#define FALSE false
  ------------------
  847|      0|  else
  848|      0|    authhost->done = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  849|       |
  850|  1.05k|  if(((authhost->multipass && !authhost->done) ||
  ------------------
  |  Branch (850:8): [True: 2, False: 1.05k]
  |  Branch (850:31): [True: 2, False: 0]
  ------------------
  851|  1.05k|      (authproxy->multipass && !authproxy->done)) &&
  ------------------
  |  Branch (851:8): [True: 1, False: 1.05k]
  |  Branch (851:32): [True: 1, False: 0]
  ------------------
  852|      3|     (httpreq != HTTPREQ_GET) &&
  ------------------
  |  Branch (852:6): [True: 0, False: 3]
  ------------------
  853|      0|     (httpreq != HTTPREQ_HEAD)) {
  ------------------
  |  Branch (853:6): [True: 0, False: 0]
  ------------------
  854|       |    /* Auth is required and we are not authenticated yet. Make a PUT or POST
  855|       |       with content-length zero as a "probe". */
  856|      0|    data->req.authneg = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  857|      0|  }
  858|  1.05k|  else
  859|  1.05k|    data->req.authneg = FALSE;
  ------------------
  |  | 1054|  1.05k|#define FALSE false
  ------------------
  860|       |
  861|  1.22k|out:
  862|  1.22k|  curlx_free(tmp_str);
  ------------------
  |  | 1488|  1.22k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  863|  1.22k|  return result;
  864|  1.05k|}
Curl_compareheader:
 1399|  1.16k|{
 1400|       |  /* RFC2616, section 4.2 says: "Each header field consists of a name followed
 1401|       |   * by a colon (":") and the field value. Field names are case-insensitive.
 1402|       |   * The field value MAY be preceded by any amount of LWS, though a single SP
 1403|       |   * is preferred." */
 1404|       |
 1405|  1.16k|  const char *p;
 1406|  1.16k|  struct Curl_str val;
 1407|  1.16k|  DEBUGASSERT(hlen);
  ------------------
  |  | 1077|  1.16k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1407:3): [True: 0, False: 1.16k]
  |  Branch (1407:3): [True: 1.16k, False: 0]
  ------------------
 1408|  1.16k|  DEBUGASSERT(clen);
  ------------------
  |  | 1077|  1.16k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1408:3): [True: 0, False: 1.16k]
  |  Branch (1408:3): [True: 1.16k, False: 0]
  ------------------
 1409|  1.16k|  DEBUGASSERT(header);
  ------------------
  |  | 1077|  1.16k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1409:3): [True: 0, False: 1.16k]
  |  Branch (1409:3): [True: 1.16k, False: 0]
  ------------------
 1410|  1.16k|  DEBUGASSERT(content);
  ------------------
  |  | 1077|  1.16k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1410:3): [True: 0, False: 1.16k]
  |  Branch (1410:3): [True: 1.16k, False: 0]
  ------------------
 1411|       |
 1412|  1.16k|  if(!curl_strnequal(headerline, header, hlen))
  ------------------
  |  Branch (1412:6): [True: 1.16k, False: 0]
  ------------------
 1413|  1.16k|    return FALSE; /* does not start with header */
  ------------------
  |  | 1054|  1.16k|#define FALSE false
  ------------------
 1414|       |
 1415|       |  /* pass the header */
 1416|      0|  p = &headerline[hlen];
 1417|       |
 1418|      0|  if(curlx_str_untilnl(&p, &val, MAX_HTTP_RESP_HEADER_SIZE))
  ------------------
  |  |  158|      0|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
  |  Branch (1418:6): [True: 0, False: 0]
  ------------------
 1419|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1420|      0|  curlx_str_trimblanks(&val);
 1421|       |
 1422|       |  /* find the content string in the rest of the line */
 1423|      0|  if(curlx_strlen(&val) >= clen) {
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (1423:6): [True: 0, False: 0]
  ------------------
 1424|      0|    size_t len;
 1425|      0|    p = curlx_str(&val);
  ------------------
  |  |   49|      0|#define curlx_str(x)    ((x)->str)
  ------------------
 1426|      0|    for(len = curlx_strlen(&val); len >= clen;) {
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (1426:35): [True: 0, False: 0]
  ------------------
 1427|      0|      struct Curl_str next;
 1428|      0|      const char *o = p;
 1429|       |      /* after a match there must be a comma, space, newline or null byte */
 1430|      0|      if(curl_strnequal(p, content, clen) &&
  ------------------
  |  Branch (1430:10): [True: 0, False: 0]
  ------------------
 1431|      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 (1431:11): [True: 0, False: 0]
  ------------------
 1432|      0|          !p[clen]))
  ------------------
  |  Branch (1432:11): [True: 0, False: 0]
  ------------------
 1433|      0|        return TRUE; /* match! */
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 1434|       |      /* advance to the next comma */
 1435|      0|      if(curlx_str_until(&p, &next, MAX_HTTP_RESP_HEADER_SIZE, ',') ||
  ------------------
  |  |  158|      0|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
  |  Branch (1435:10): [True: 0, False: 0]
  ------------------
 1436|      0|         curlx_str_single(&p, ','))
  ------------------
  |  Branch (1436:10): [True: 0, False: 0]
  ------------------
 1437|      0|        break; /* no comma, get out */
 1438|       |
 1439|       |      /* if there are more dummy commas, move over them as well */
 1440|      0|      do
 1441|      0|        curlx_str_passblanks(&p);
 1442|      0|      while(!curlx_str_single(&p, ','));
  ------------------
  |  Branch (1442:13): [True: 0, False: 0]
  ------------------
 1443|      0|      len -= (p - o);
 1444|      0|    }
 1445|      0|  }
 1446|      0|  return FALSE; /* no match */
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1447|      0|}
Curl_http_method:
 1943|    838|{
 1944|    838|  Curl_HttpReq httpreq = (Curl_HttpReq)data->state.httpreq;
 1945|    838|  const char *request;
 1946|    838|#ifndef CURL_DISABLE_WEBSOCKETS
 1947|    838|  if(data->conn->scheme->protocol & (CURLPROTO_WS | CURLPROTO_WSS))
  ------------------
  |  |   63|    838|#define CURLPROTO_WS     (1L << 30)
  ------------------
                if(data->conn->scheme->protocol & (CURLPROTO_WS | CURLPROTO_WSS))
  ------------------
  |  |   64|    838|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  ------------------
  |  Branch (1947:6): [True: 0, False: 838]
  ------------------
 1948|      0|    httpreq = HTTPREQ_GET;
 1949|    838|  else
 1950|    838|#endif
 1951|    838|  if((data->conn->scheme->protocol & (PROTO_FAMILY_HTTP | CURLPROTO_FTP)) &&
  ------------------
  |  |   84|    838|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1078|    838|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1079|    838|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|    838|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|    838|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|    838|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
                if((data->conn->scheme->protocol & (PROTO_FAMILY_HTTP | CURLPROTO_FTP)) &&
  ------------------
  |  | 1080|    838|#define CURLPROTO_FTP     (1L << 2)
  ------------------
  |  Branch (1951:6): [True: 0, False: 838]
  ------------------
 1952|      0|     data->state.upload)
  ------------------
  |  Branch (1952:6): [True: 0, False: 0]
  ------------------
 1953|      0|    httpreq = HTTPREQ_PUT;
 1954|       |
 1955|       |  /* Now set the 'request' pointer to the proper request string */
 1956|    838|  if(data->set.str[STRING_CUSTOMREQUEST] &&
  ------------------
  |  Branch (1956:6): [True: 2, False: 836]
  ------------------
 1957|      2|     !data->state.http_ignorecustom) {
  ------------------
  |  Branch (1957:6): [True: 2, False: 0]
  ------------------
 1958|      2|    request = data->set.str[STRING_CUSTOMREQUEST];
 1959|      2|  }
 1960|    836|  else {
 1961|    836|    if(data->req.no_body)
  ------------------
  |  Branch (1961:8): [True: 1, False: 835]
  ------------------
 1962|      1|      request = "HEAD";
 1963|    835|    else {
 1964|    835|      DEBUGASSERT((httpreq >= HTTPREQ_GET) && (httpreq <= HTTPREQ_HEAD));
  ------------------
  |  | 1077|    835|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1964:7): [True: 0, False: 835]
  |  Branch (1964:7): [True: 0, False: 0]
  |  Branch (1964:7): [True: 835, False: 0]
  |  Branch (1964:7): [True: 835, False: 0]
  ------------------
 1965|    835|      switch(httpreq) {
 1966|      8|      case HTTPREQ_POST:
  ------------------
  |  Branch (1966:7): [True: 8, False: 827]
  ------------------
 1967|     15|      case HTTPREQ_POST_FORM:
  ------------------
  |  Branch (1967:7): [True: 7, False: 828]
  ------------------
 1968|     25|      case HTTPREQ_POST_MIME:
  ------------------
  |  Branch (1968:7): [True: 10, False: 825]
  ------------------
 1969|     25|        request = "POST";
 1970|     25|        break;
 1971|      4|      case HTTPREQ_PUT:
  ------------------
  |  Branch (1971:7): [True: 4, False: 831]
  ------------------
 1972|      4|        request = "PUT";
 1973|      4|        break;
 1974|      0|      default: /* this should never happen */
  ------------------
  |  Branch (1974:7): [True: 0, False: 835]
  ------------------
 1975|    806|      case HTTPREQ_GET:
  ------------------
  |  Branch (1975:7): [True: 806, False: 29]
  ------------------
 1976|    806|        request = "GET";
 1977|    806|        break;
 1978|      0|      case HTTPREQ_HEAD:
  ------------------
  |  Branch (1978:7): [True: 0, False: 835]
  ------------------
 1979|      0|        request = "HEAD";
 1980|      0|        break;
 1981|    835|      }
 1982|    835|    }
 1983|    836|  }
 1984|    838|  *method = request;
 1985|    838|  *reqp = httpreq;
 1986|    838|}
Curl_verify_header:
 3833|    642|{
 3834|    642|  struct SingleRequest *k = &data->req;
 3835|    642|  const char *ptr = memchr(hd, 0x00, hdlen);
 3836|    642|  if(ptr) {
  ------------------
  |  Branch (3836:6): [True: 33, False: 609]
  ------------------
 3837|       |    /* this is bad, bail out */
 3838|     33|    failf(data, "Nul byte in header");
  ------------------
  |  |   62|     33|#define failf Curl_failf
  ------------------
 3839|     33|    return CURLE_WEIRD_SERVER_REPLY;
 3840|     33|  }
 3841|    609|  if(hdlen > 2) {
  ------------------
  |  Branch (3841:6): [True: 462, False: 147]
  ------------------
 3842|    462|    ptr = memchr(hd, '\r', hdlen - 2);
 3843|    462|    if(ptr) {
  ------------------
  |  Branch (3843:8): [True: 1, False: 461]
  ------------------
 3844|       |      /* CR may only precede the LF, nothing else */
 3845|      1|      failf(data, "Carriage return found in header");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 3846|      1|      return CURLE_WEIRD_SERVER_REPLY;
 3847|      1|    }
 3848|    462|  }
 3849|    608|  if(k->headerline < 2)
  ------------------
  |  Branch (3849:6): [True: 608, False: 0]
  ------------------
 3850|       |    /* the first "header" is the status-line and it has no colon */
 3851|    608|    return CURLE_OK;
 3852|      0|  if(((hd[0] == ' ') || (hd[0] == '\t')) && k->headerline > 2)
  ------------------
  |  Branch (3852:7): [True: 0, False: 0]
  |  Branch (3852:25): [True: 0, False: 0]
  |  Branch (3852:45): [True: 0, False: 0]
  ------------------
 3853|       |    /* line folding, cannot happen on line 2 */
 3854|      0|    ;
 3855|      0|  else {
 3856|      0|    ptr = memchr(hd, ':', hdlen);
 3857|      0|    if(!ptr) {
  ------------------
  |  Branch (3857:8): [True: 0, False: 0]
  ------------------
 3858|       |      /* this is bad, bail out */
 3859|      0|      failf(data, "Header without colon");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3860|      0|      return CURLE_WEIRD_SERVER_REPLY;
 3861|      0|    }
 3862|      0|  }
 3863|      0|  return CURLE_OK;
 3864|      0|}
Curl_bump_headersize:
 3869|    608|{
 3870|    608|  size_t bad = 0;
 3871|    608|  unsigned int max = MAX_HTTP_RESP_HEADER_SIZE;
  ------------------
  |  |  158|    608|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
 3872|    608|  if(delta < MAX_HTTP_RESP_HEADER_SIZE) {
  ------------------
  |  |  158|    608|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
  |  Branch (3872:6): [True: 608, False: 0]
  ------------------
 3873|    608|    data->info.header_size += (unsigned int)delta;
 3874|    608|    data->req.allheadercount += (unsigned int)delta;
 3875|    608|    if(!connect_only)
  ------------------
  |  Branch (3875:8): [True: 0, False: 608]
  ------------------
 3876|      0|      data->req.headerbytecount += (unsigned int)delta;
 3877|    608|    if(data->req.allheadercount > max)
  ------------------
  |  Branch (3877:8): [True: 0, False: 608]
  ------------------
 3878|      0|      bad = data->req.allheadercount;
 3879|    608|    else if(data->info.header_size > (max * 20)) {
  ------------------
  |  Branch (3879:13): [True: 0, False: 608]
  ------------------
 3880|      0|      bad = data->info.header_size;
 3881|      0|      max *= 20;
 3882|      0|    }
 3883|    608|  }
 3884|      0|  else
 3885|      0|    bad = data->req.allheadercount + delta;
 3886|    608|  if(bad) {
  ------------------
  |  Branch (3886:6): [True: 0, False: 608]
  ------------------
 3887|      0|    failf(data, "Too large response headers: %zu > %u", bad, max);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3888|      0|    return CURLE_RECV_ERROR;
 3889|      0|  }
 3890|    608|  return CURLE_OK;
 3891|    608|}
Curl_http_to_fold:
 4410|    266|{
 4411|    266|  size_t len = curlx_dyn_len(bf);
 4412|    266|  const char *hd = curlx_dyn_ptr(bf);
 4413|    266|  if(len && (hd[len - 1] == '\n'))
  ------------------
  |  Branch (4413:6): [True: 266, False: 0]
  |  Branch (4413:13): [True: 266, False: 0]
  ------------------
 4414|    266|    len--;
 4415|    266|  if(len && (hd[len - 1] == '\r'))
  ------------------
  |  Branch (4415:6): [True: 266, False: 0]
  |  Branch (4415:13): [True: 47, False: 219]
  ------------------
 4416|     47|    len--;
 4417|    892|  while(len && ISBLANK(hd[len - 1])) /* strip off trailing whitespace */
  ------------------
  |  |   45|    817|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 310, False: 507]
  |  |  |  Branch (45:38): [True: 316, False: 191]
  |  |  ------------------
  ------------------
  |  Branch (4417:9): [True: 817, False: 75]
  ------------------
 4418|    626|    len--;
 4419|    266|  curlx_dyn_setlen(bf, len);
 4420|    266|}
Curl_http_req_make:
 4707|  1.22k|{
 4708|  1.22k|  struct httpreq *req;
 4709|  1.22k|  CURLcode result = CURLE_OUT_OF_MEMORY;
 4710|       |
 4711|  1.22k|  DEBUGASSERT(method && m_len);
  ------------------
  |  | 1077|  1.22k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4711:3): [True: 0, False: 1.22k]
  |  Branch (4711:3): [True: 0, False: 0]
  |  Branch (4711:3): [True: 1.22k, False: 0]
  |  Branch (4711:3): [True: 1.22k, False: 0]
  ------------------
 4712|       |
 4713|  1.22k|  req = curlx_calloc(1, sizeof(*req) + m_len);
  ------------------
  |  | 1485|  1.22k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 4714|  1.22k|  if(!req)
  ------------------
  |  Branch (4714:6): [True: 0, False: 1.22k]
  ------------------
 4715|      0|    goto out;
 4716|       |#if defined(__GNUC__) && __GNUC__ >= 13
 4717|       |#pragma GCC diagnostic push
 4718|       |/* error: 'memcpy' offset [137, 142] from the object at 'req' is out of
 4719|       |   the bounds of referenced subobject 'method' with type 'char[1]' at
 4720|       |   offset 136 */
 4721|       |#pragma GCC diagnostic ignored "-Warray-bounds"
 4722|       |#endif
 4723|  1.22k|  memcpy(req->method, method, m_len);
 4724|       |#if defined(__GNUC__) && __GNUC__ >= 13
 4725|       |#pragma GCC diagnostic pop
 4726|       |#endif
 4727|  1.22k|  if(scheme) {
  ------------------
  |  Branch (4727:6): [True: 0, False: 1.22k]
  ------------------
 4728|      0|    req->scheme = curlx_memdup0(scheme, s_len);
 4729|      0|    if(!req->scheme)
  ------------------
  |  Branch (4729:8): [True: 0, False: 0]
  ------------------
 4730|      0|      goto out;
 4731|      0|  }
 4732|  1.22k|  if(authority) {
  ------------------
  |  Branch (4732:6): [True: 1.22k, False: 0]
  ------------------
 4733|  1.22k|    req->authority = curlx_memdup0(authority, a_len);
 4734|  1.22k|    if(!req->authority)
  ------------------
  |  Branch (4734:8): [True: 0, False: 1.22k]
  ------------------
 4735|      0|      goto out;
 4736|  1.22k|  }
 4737|  1.22k|  if(path) {
  ------------------
  |  Branch (4737:6): [True: 0, False: 1.22k]
  ------------------
 4738|      0|    req->path = curlx_memdup0(path, p_len);
 4739|      0|    if(!req->path)
  ------------------
  |  Branch (4739:8): [True: 0, False: 0]
  ------------------
 4740|      0|      goto out;
 4741|      0|  }
 4742|  1.22k|  Curl_dynhds_init(&req->headers, 0, DYN_HTTP_REQUEST);
  ------------------
  |  |   69|  1.22k|#define DYN_HTTP_REQUEST    (1024 * 1024)
  ------------------
 4743|  1.22k|  Curl_dynhds_init(&req->trailers, 0, DYN_HTTP_REQUEST);
  ------------------
  |  |   69|  1.22k|#define DYN_HTTP_REQUEST    (1024 * 1024)
  ------------------
 4744|  1.22k|  result = CURLE_OK;
 4745|       |
 4746|  1.22k|out:
 4747|  1.22k|  if(result && req)
  ------------------
  |  Branch (4747:6): [True: 0, False: 1.22k]
  |  Branch (4747:16): [True: 0, False: 0]
  ------------------
 4748|      0|    Curl_http_req_free(req);
 4749|  1.22k|  *preq = result ? NULL : req;
  ------------------
  |  Branch (4749:11): [True: 0, False: 1.22k]
  ------------------
 4750|  1.22k|  return result;
 4751|  1.22k|}
Curl_http_req_free:
 4875|  1.22k|{
 4876|  1.22k|  if(req) {
  ------------------
  |  Branch (4876:6): [True: 1.22k, False: 0]
  ------------------
 4877|  1.22k|    curlx_free(req->scheme);
  ------------------
  |  | 1488|  1.22k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4878|  1.22k|    curlx_free(req->authority);
  ------------------
  |  | 1488|  1.22k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4879|  1.22k|    curlx_free(req->path);
  ------------------
  |  | 1488|  1.22k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4880|  1.22k|    Curl_dynhds_free(&req->headers);
 4881|  1.22k|    Curl_dynhds_free(&req->trailers);
 4882|  1.22k|    curlx_free(req);
  ------------------
  |  | 1488|  1.22k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4883|  1.22k|  }
 4884|  1.22k|}
http.c:http_should_fail:
  484|     20|{
  485|     20|  DEBUGASSERT(data);
  ------------------
  |  | 1077|     20|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (485:3): [True: 0, False: 20]
  |  Branch (485:3): [True: 20, False: 0]
  ------------------
  486|     20|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1077|     20|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (486:3): [True: 0, False: 20]
  |  Branch (486:3): [True: 20, False: 0]
  ------------------
  487|       |
  488|       |  /*
  489|       |   * If we have not been asked to fail on error,
  490|       |   * do not fail.
  491|       |   */
  492|     20|  if(!data->set.http_fail_on_error)
  ------------------
  |  Branch (492:6): [True: 20, False: 0]
  ------------------
  493|     20|    return FALSE;
  ------------------
  |  | 1054|     20|#define FALSE false
  ------------------
  494|       |
  495|       |  /*
  496|       |   * Any code < 400 is never terminal.
  497|       |   */
  498|      0|  if(httpcode < 400)
  ------------------
  |  Branch (498:6): [True: 0, False: 0]
  ------------------
  499|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  500|       |
  501|       |  /*
  502|       |   * A 416 response to a resume request is presumably because the file is
  503|       |   * already completely downloaded and thus not actually a fail.
  504|       |   */
  505|      0|  if(data->state.resume_from && data->state.httpreq == HTTPREQ_GET &&
  ------------------
  |  Branch (505:6): [True: 0, False: 0]
  |  Branch (505:33): [True: 0, False: 0]
  ------------------
  506|      0|     httpcode == 416)
  ------------------
  |  Branch (506:6): [True: 0, False: 0]
  ------------------
  507|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  508|       |
  509|       |  /*
  510|       |   * Any code >= 400 that is not 401 or 407 is always
  511|       |   * a terminal error
  512|       |   */
  513|      0|  if((httpcode != 401) && (httpcode != 407))
  ------------------
  |  Branch (513:6): [True: 0, False: 0]
  |  Branch (513:27): [True: 0, False: 0]
  ------------------
  514|      0|    return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  515|       |
  516|       |  /*
  517|       |   * All we have left to deal with is 401 and 407
  518|       |   */
  519|      0|  DEBUGASSERT((httpcode == 401) || (httpcode == 407));
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (519:3): [True: 0, False: 0]
  |  Branch (519:3): [True: 0, False: 0]
  |  Branch (519:3): [True: 0, False: 0]
  |  Branch (519:3): [True: 0, False: 0]
  ------------------
  520|       |
  521|       |  /*
  522|       |   * Examine the current authentication state to see if this is an error. The
  523|       |   * idea is for this function to get called after processing all the headers
  524|       |   * in a response message. If we have been to asked to authenticate
  525|       |   * a particular stage, and we have done it, we are OK. If we are already
  526|       |   * completely authenticated, it is not OK to get another 401 or 407.
  527|       |   *
  528|       |   * It is possible for authentication to go stale such that the client needs
  529|       |   * to reauthenticate. Once that info is available, use it here.
  530|       |   */
  531|       |
  532|       |  /*
  533|       |   * Either we are not authenticating, or we are supposed to be authenticating
  534|       |   * something else. This is an error.
  535|       |   */
  536|      0|  if((httpcode == 401) && !data->state.creds)
  ------------------
  |  Branch (536:6): [True: 0, False: 0]
  |  Branch (536:27): [True: 0, False: 0]
  ------------------
  537|      0|    return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  538|      0|#ifndef CURL_DISABLE_PROXY
  539|      0|  if((httpcode == 407) && !data->conn->http_proxy.creds)
  ------------------
  |  Branch (539:6): [True: 0, False: 0]
  |  Branch (539:27): [True: 0, False: 0]
  ------------------
  540|      0|    return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  541|      0|#endif
  542|       |
  543|      0|  return (bool)data->state.authproblem;
  544|      0|}
http.c:output_auth_headers:
  650|  2.11k|{
  651|  2.11k|  const char *auth = NULL;
  652|  2.11k|  CURLcode result = CURLE_OK;
  653|  2.11k|  (void)conn;
  654|       |
  655|       |#ifdef CURL_DISABLE_DIGEST_AUTH
  656|       |  (void)request;
  657|       |  (void)path;
  658|       |#endif
  659|  2.11k|#ifndef CURL_DISABLE_AWS
  660|  2.11k|  if((authstatus->picked == CURLAUTH_AWS_SIGV4) && !proxy) {
  ------------------
  |  |  845|  2.11k|#define CURLAUTH_AWS_SIGV4    (((unsigned long)1) << 7)
  ------------------
  |  Branch (660:6): [True: 851, False: 1.26k]
  |  Branch (660:52): [True: 850, False: 1]
  ------------------
  661|       |    /* this method is never for proxy */
  662|    850|    auth = "AWS_SIGV4";
  663|    850|    result = Curl_output_aws_sigv4(data);
  664|    850|    if(result)
  ------------------
  |  Branch (664:8): [True: 13, False: 837]
  ------------------
  665|     13|      return result;
  666|    850|  }
  667|  1.26k|  else
  668|  1.26k|#endif
  669|       |#ifdef USE_SPNEGO
  670|       |  if(authstatus->picked == CURLAUTH_NEGOTIATE) {
  671|       |    auth = "Negotiate";
  672|       |    result = Curl_output_negotiate(data, conn, proxy);
  673|       |    if(result)
  674|       |      return result;
  675|       |  }
  676|       |  else
  677|       |#endif
  678|       |#ifdef USE_NTLM
  679|       |  if(authstatus->picked == CURLAUTH_NTLM) {
  680|       |    auth = "NTLM";
  681|       |    result = Curl_output_ntlm(data, proxy);
  682|       |    if(result)
  683|       |      return result;
  684|       |  }
  685|       |  else
  686|       |#endif
  687|  1.26k|#ifndef CURL_DISABLE_DIGEST_AUTH
  688|  1.26k|  if(authstatus->picked == CURLAUTH_DIGEST) {
  ------------------
  |  |  832|  1.26k|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  |  Branch (688:6): [True: 4, False: 1.26k]
  ------------------
  689|      4|    auth = "Digest";
  690|      4|    result = Curl_output_digest(data,
  691|      4|                                proxy,
  692|      4|                                (const unsigned char *)request,
  693|      4|                                (const unsigned char *)path);
  694|      4|    if(result)
  ------------------
  |  Branch (694:8): [True: 0, False: 4]
  ------------------
  695|      0|      return result;
  696|      4|  }
  697|  1.26k|  else
  698|  1.26k|#endif
  699|  1.26k|#ifndef CURL_DISABLE_BASIC_AUTH
  700|  1.26k|  if(authstatus->picked == CURLAUTH_BASIC) {
  ------------------
  |  |  831|  1.26k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  |  Branch (700:6): [True: 1.17k, False: 89]
  ------------------
  701|       |    /* Basic */
  702|  1.17k|    if(
  703|  1.17k|#ifndef CURL_DISABLE_PROXY
  704|  1.17k|       (proxy && conn->http_proxy.creds &&
  ------------------
  |  Branch (704:9): [True: 1.01k, False: 157]
  |  Branch (704:18): [True: 1.00k, False: 7]
  ------------------
  705|  1.00k|        Curl_creds_has_user_or_pass(conn->http_proxy.creds) &&
  ------------------
  |  |   77|  2.18k|    ((c) && ((c)->user[0] || (c)->passwd[0]))
  |  |  ------------------
  |  |  |  Branch (77:6): [True: 1.00k, False: 0]
  |  |  |  Branch (77:14): [True: 695, False: 314]
  |  |  |  Branch (77:30): [True: 7, False: 307]
  |  |  ------------------
  ------------------
  706|    702|        !Curl_checkProxyheaders(data, conn,
  ------------------
  |  Branch (706:9): [True: 702, False: 0]
  ------------------
  707|    702|                                STRCONST("Proxy-authorization"))) ||
  ------------------
  |  | 1297|    702|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  708|    471|#endif
  709|    471|       (!proxy && data->state.creds &&
  ------------------
  |  Branch (709:9): [True: 157, False: 314]
  |  Branch (709:19): [True: 7, False: 150]
  ------------------
  710|      7|        Curl_creds_has_user_or_pass(data->state.creds) &&
  ------------------
  |  |   77|    478|    ((c) && ((c)->user[0] || (c)->passwd[0]))
  |  |  ------------------
  |  |  |  Branch (77:6): [True: 7, False: 0]
  |  |  |  Branch (77:14): [True: 7, False: 0]
  |  |  |  Branch (77:30): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  711|    709|        !Curl_checkheaders(data, STRCONST("Authorization")))) {
  ------------------
  |  | 1297|      7|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (711:9): [True: 7, False: 0]
  ------------------
  712|    709|      auth = "Basic";
  713|    709|      result = http_output_basic(data, conn, proxy);
  714|    709|      if(result)
  ------------------
  |  Branch (714:10): [True: 0, False: 709]
  ------------------
  715|      0|        return result;
  716|    709|    }
  717|       |
  718|       |    /* NOTE: this function should set 'done' TRUE, as the other auth
  719|       |       functions work that way */
  720|  1.17k|    authstatus->done = TRUE;
  ------------------
  |  | 1051|  1.17k|#define TRUE true
  ------------------
  721|  1.17k|  }
  722|  2.10k|#endif
  723|  2.10k|#ifndef CURL_DISABLE_BEARER_AUTH
  724|  2.10k|  if(authstatus->picked == CURLAUTH_BEARER) {
  ------------------
  |  |  844|  2.10k|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  |  Branch (724:6): [True: 13, False: 2.09k]
  ------------------
  725|       |    /* Bearer */
  726|     13|    if(!proxy && Curl_creds_has_oauth_bearer(data->state.creds) &&
  ------------------
  |  |   78|     25|#define Curl_creds_has_oauth_bearer(c)   ((c) && (c)->oauth_bearer[0])
  |  |  ------------------
  |  |  |  Branch (78:43): [True: 2, False: 10]
  |  |  |  Branch (78:50): [True: 1, False: 1]
  |  |  ------------------
  ------------------
  |  Branch (726:8): [True: 12, False: 1]
  ------------------
  727|      1|       !Curl_checkheaders(data, STRCONST("Authorization"))) {
  ------------------
  |  | 1297|      1|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (727:8): [True: 1, False: 0]
  ------------------
  728|      1|      auth = "Bearer";
  729|      1|      result = http_output_bearer(data);
  730|      1|      if(result)
  ------------------
  |  Branch (730:10): [True: 0, False: 1]
  ------------------
  731|      0|        return result;
  732|      1|    }
  733|       |
  734|       |    /* NOTE: this function should set 'done' TRUE, as the other auth
  735|       |       functions work that way */
  736|     13|    authstatus->done = TRUE;
  ------------------
  |  | 1051|     13|#define TRUE true
  ------------------
  737|     13|  }
  738|  2.10k|#endif
  739|       |
  740|  2.10k|  if(auth) {
  ------------------
  |  Branch (740:6): [True: 1.55k, False: 552]
  ------------------
  741|  1.55k|#ifndef CURL_DISABLE_PROXY
  742|  1.55k|    if(proxy)
  ------------------
  |  Branch (742:8): [True: 704, False: 847]
  ------------------
  743|    704|      data->info.proxyauthpicked = authstatus->picked;
  744|    847|    else
  745|    847|      data->info.httpauthpicked = authstatus->picked;
  746|  1.55k|    infof(data, "%s auth using %s with user '%s'",
  ------------------
  |  |  143|  1.55k|  do {                               \
  |  |  144|  1.55k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  1.55k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 1.55k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.55k]
  |  |  |  |  ------------------
  |  |  |  |  320|  1.55k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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.55k|      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|  1.55k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1.55k]
  |  |  ------------------
  ------------------
  747|  1.55k|          proxy ? "Proxy" : "Server", auth,
  748|  1.55k|          proxy ? (conn->http_proxy.creds ?
  749|  1.55k|                   conn->http_proxy.creds->user : "") :
  750|  1.55k|          (data->state.creds ?
  751|  1.55k|           data->state.creds->user : ""));
  752|       |#else
  753|       |    (void)proxy;
  754|       |    infof(data, "Server auth using %s with user '%s'",
  755|       |          auth, data->state.creds ?
  756|       |          data->state.creds->user : "");
  757|       |#endif
  758|  1.55k|    authstatus->multipass = !authstatus->done;
  759|  1.55k|  }
  760|    552|  else {
  761|    552|    authstatus->multipass = FALSE;
  ------------------
  |  | 1054|    552|#define FALSE false
  ------------------
  762|    552|    if(proxy)
  ------------------
  |  Branch (762:8): [True: 354, False: 198]
  ------------------
  763|    354|      data->info.proxyauthpicked = 0;
  764|    198|    else
  765|    198|      data->info.httpauthpicked = 0;
  766|    552|  }
  767|       |
  768|  2.10k|  return result;
  769|  2.10k|}
http.c:http_output_basic:
  255|    709|{
  256|    709|  size_t size = 0;
  257|    709|  char *authorization = NULL;
  258|    709|  char **p_hd;
  259|    709|  CURLcode result;
  260|    709|  struct Curl_creds *creds = NULL;
  261|    709|  char *out;
  262|       |
  263|       |  /* credentials are unique per transfer for HTTP, do not use the ones for the
  264|       |     connection */
  265|    709|  if(proxy) {
  ------------------
  |  Branch (265:6): [True: 702, False: 7]
  ------------------
  266|    702|#ifndef CURL_DISABLE_PROXY
  267|    702|    p_hd = &data->req.hd_proxy_auth;
  268|    702|    creds = conn->http_proxy.creds;
  269|       |#else
  270|       |    (void)conn;
  271|       |    return CURLE_NOT_BUILT_IN;
  272|       |#endif
  273|    702|  }
  274|      7|  else {
  275|      7|    p_hd = &data->req.hd_auth;
  276|      7|    creds = data->state.creds;
  277|      7|  }
  278|       |
  279|    709|  if(!creds) {
  ------------------
  |  Branch (279:6): [True: 0, False: 709]
  ------------------
  280|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1077|      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|    709|  out = curl_maprintf("%s:%s", creds->user, creds->passwd);
  285|    709|  if(!out)
  ------------------
  |  Branch (285:6): [True: 0, False: 709]
  ------------------
  286|      0|    return CURLE_OUT_OF_MEMORY;
  287|       |
  288|    709|  result = curlx_base64_encode((uint8_t *)out, strlen(out),
  289|    709|                               &authorization, &size);
  290|    709|  if(result)
  ------------------
  |  Branch (290:6): [True: 0, False: 709]
  ------------------
  291|      0|    goto fail;
  292|       |
  293|    709|  if(!authorization) {
  ------------------
  |  Branch (293:6): [True: 0, False: 709]
  ------------------
  294|      0|    result = CURLE_REMOTE_ACCESS_DENIED;
  295|      0|    goto fail;
  296|      0|  }
  297|       |
  298|    709|  curlx_free(*p_hd);
  ------------------
  |  | 1488|    709|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  299|    709|  *p_hd = curl_maprintf("%sAuthorization: Basic %s\r\n",
  300|    709|                        proxy ? "Proxy-" : "",
  ------------------
  |  Branch (300:25): [True: 702, False: 7]
  ------------------
  301|    709|                        authorization);
  302|    709|  curlx_free(authorization);
  ------------------
  |  | 1488|    709|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  303|    709|  if(!*p_hd) {
  ------------------
  |  Branch (303:6): [True: 0, False: 709]
  ------------------
  304|      0|    result = CURLE_OUT_OF_MEMORY;
  305|      0|    goto fail;
  306|      0|  }
  307|       |
  308|    709|fail:
  309|    709|  curlx_free(out);
  ------------------
  |  | 1488|    709|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  310|    709|  return result;
  311|    709|}
http.c:http_output_bearer:
  323|      1|{
  324|      1|  char **userp;
  325|      1|  CURLcode result = CURLE_OK;
  326|       |
  327|      1|  DEBUGASSERT(Curl_creds_has_oauth_bearer(data->state.creds));
  ------------------
  |  | 1077|      1|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (327:3): [True: 0, False: 1]
  |  Branch (327:3): [True: 0, False: 0]
  |  Branch (327:3): [True: 1, False: 0]
  |  Branch (327:3): [True: 1, False: 0]
  ------------------
  328|      1|  userp = &data->req.hd_auth;
  329|      1|  curlx_free(*userp);
  ------------------
  |  | 1488|      1|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  330|      1|  *userp = curl_maprintf("Authorization: Bearer %s\r\n",
  331|      1|                         Curl_creds_oauth_bearer(data->state.creds));
  ------------------
  |  |   82|      1|#define Curl_creds_oauth_bearer(c)       ((c) ? (c)->oauth_bearer : "")
  |  |  ------------------
  |  |  |  Branch (82:43): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  332|       |
  333|      1|  if(!*userp) {
  ------------------
  |  Branch (333:6): [True: 0, False: 1]
  ------------------
  334|      0|    result = CURLE_OUT_OF_MEMORY;
  335|      0|    goto fail;
  336|      0|  }
  337|       |
  338|      1|fail:
  339|      1|  return result;
  340|      1|}

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

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

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

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

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

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

Curl_ipv6_scope:
   62|  7.39k|{
   63|  7.39k|  if(sa->sa_family == AF_INET6) {
  ------------------
  |  Branch (63:6): [True: 106, False: 7.28k]
  ------------------
   64|    106|    const struct sockaddr_in6 *sa6 =
   65|    106|      (const struct sockaddr_in6 *)(const void *)sa;
   66|    106|    const unsigned char *b = sa6->sin6_addr.s6_addr;
   67|    106|    unsigned short w = (unsigned short)((b[0] << 8) | b[1]);
   68|       |
   69|    106|    if((b[0] & 0xFE) == 0xFC) /* Handle ULAs */
  ------------------
  |  Branch (69:8): [True: 3, False: 103]
  ------------------
   70|      3|      return IPV6_SCOPE_UNIQUELOCAL;
  ------------------
  |  |   32|      3|#define IPV6_SCOPE_UNIQUELOCAL  3       /* Unique local */
  ------------------
   71|    103|    switch(w & 0xFFC0) {
   72|      1|    case 0xFE80:
  ------------------
  |  Branch (72:5): [True: 1, False: 102]
  ------------------
   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: 102]
  ------------------
   75|      1|      return IPV6_SCOPE_SITELOCAL;
  ------------------
  |  |   31|      1|#define IPV6_SCOPE_SITELOCAL    2       /* Site-local scope (deprecated). */
  ------------------
   76|     88|    case 0x0000:
  ------------------
  |  Branch (76:5): [True: 88, False: 15]
  ------------------
   77|     88|      w = b[1] | b[2] | b[3] | b[4] | b[5] | b[6] | b[7] | b[8] | b[9] |
   78|     88|          b[10] | b[11] | b[12] | b[13] | b[14];
   79|     88|      if(w || b[15] != 0x01)
  ------------------
  |  Branch (79:10): [True: 29, False: 59]
  |  Branch (79:15): [True: 9, False: 50]
  ------------------
   80|     38|        break;
   81|     50|      return IPV6_SCOPE_NODELOCAL;
  ------------------
  |  |   33|     50|#define IPV6_SCOPE_NODELOCAL    4       /* Loopback. */
  ------------------
   82|     13|    default:
  ------------------
  |  Branch (82:5): [True: 13, False: 90]
  ------------------
   83|     13|      break;
   84|    103|    }
   85|    103|  }
   86|  7.33k|  return IPV6_SCOPE_GLOBAL;
  ------------------
  |  |   29|  7.33k|#define IPV6_SCOPE_GLOBAL       0       /* Global scope. */
  ------------------
   87|  7.39k|}
Curl_if2ip:
  101|    118|{
  102|    118|  struct ifaddrs *iface, *head;
  103|    118|  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|    118|  if(getifaddrs(&head) >= 0) {
  ------------------
  |  Branch (109:6): [True: 118, False: 0]
  ------------------
  110|    588|    for(iface = head; iface; iface = iface->ifa_next) {
  ------------------
  |  Branch (110:23): [True: 471, False: 117]
  ------------------
  111|    471|      if(iface->ifa_addr) {
  ------------------
  |  Branch (111:10): [True: 471, False: 0]
  ------------------
  112|    471|        if(iface->ifa_addr->sa_family == af) {
  ------------------
  |  Branch (112:12): [True: 203, False: 268]
  ------------------
  113|    203|          if(curl_strequal(iface->ifa_name, interf)) {
  ------------------
  |  Branch (113:14): [True: 1, False: 202]
  ------------------
  114|      1|            void *addr;
  115|      1|            const char *ip;
  116|      1|            char scope[12] = "";
  117|      1|            char ipstr[64];
  118|      1|#ifdef USE_IPV6
  119|      1|            if(af == AF_INET6) {
  ------------------
  |  Branch (119:16): [True: 0, False: 1]
  ------------------
  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|      1|            else
  154|      1|#endif
  155|      1|              addr =
  156|      1|                &((struct sockaddr_in *)(void *)iface->ifa_addr)->sin_addr;
  157|      1|            res = IF2IP_FOUND;
  158|      1|            ip = curlx_inet_ntop(af, addr, ipstr, sizeof(ipstr));
  159|      1|            curl_msnprintf(buf, buf_size, "%s%s", ip, scope);
  160|      1|            break;
  161|      1|          }
  162|    203|        }
  163|    268|        else if((res == IF2IP_NOT_FOUND) &&
  ------------------
  |  Branch (163:17): [True: 267, False: 1]
  ------------------
  164|    267|                curl_strequal(iface->ifa_name, interf)) {
  ------------------
  |  Branch (164:17): [True: 1, False: 266]
  ------------------
  165|      1|          res = IF2IP_AF_NOT_SUPPORTED;
  166|      1|        }
  167|    471|      }
  168|    471|    }
  169|       |
  170|    118|    freeifaddrs(head);
  171|    118|  }
  172|       |
  173|    118|  return res;
  174|    118|}

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

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

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

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

Curl_multi_handle:
  244|  13.0k|{
  245|  13.0k|  struct Curl_multi *multi = curlx_calloc(1, sizeof(struct Curl_multi));
  ------------------
  |  | 1485|  13.0k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  246|       |
  247|  13.0k|  if(!multi)
  ------------------
  |  Branch (247:6): [True: 0, False: 13.0k]
  ------------------
  248|      0|    return NULL;
  249|       |
  250|  13.0k|  multi->magic = CURL_MULTI_HANDLE;
  ------------------
  |  |   75|  13.0k|#define CURL_MULTI_HANDLE 0x000bab1e
  ------------------
  251|       |
  252|  13.0k|  Curl_dnscache_init(&multi->dnscache, dnssize);
  253|  13.0k|  Curl_mntfy_init(multi);
  254|  13.0k|  Curl_multi_ev_init(multi, ev_hashsize);
  255|  13.0k|  Curl_uint32_tbl_init(&multi->xfers, NULL);
  256|  13.0k|  Curl_uint32_bset_init(&multi->process);
  257|  13.0k|  Curl_uint32_bset_init(&multi->dirty);
  258|  13.0k|  Curl_uint32_bset_init(&multi->pending);
  259|  13.0k|  Curl_uint32_bset_init(&multi->msgsent);
  260|  13.0k|  Curl_hash_init(&multi->proto_hash, 23,
  261|  13.0k|                 Curl_hash_str, curlx_str_key_compare, ph_freeentry);
  262|  13.0k|  Curl_llist_init(&multi->msglist, NULL);
  263|       |
  264|  13.0k|  multi->multiplexing = TRUE;
  ------------------
  |  | 1051|  13.0k|#define TRUE true
  ------------------
  265|  13.0k|  multi->max_concurrent_streams = 100;
  266|  13.0k|  multi->last_timeout_ms = -1;
  267|  13.0k|#ifdef ENABLE_WAKEUP
  268|  13.0k|  multi->wakeup_pair[0] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  13.0k|#define CURL_SOCKET_BAD (-1)
  ------------------
  269|  13.0k|  multi->wakeup_pair[1] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  13.0k|#define CURL_SOCKET_BAD (-1)
  ------------------
  270|  13.0k|#endif
  271|       |
  272|  13.0k|  if(Curl_mntfy_resize(multi) ||
  ------------------
  |  Branch (272:6): [True: 0, False: 13.0k]
  ------------------
  273|  13.0k|     Curl_uint32_bset_resize(&multi->process, xfer_table_size) ||
  ------------------
  |  Branch (273:6): [True: 0, False: 13.0k]
  ------------------
  274|  13.0k|     Curl_uint32_bset_resize(&multi->pending, xfer_table_size) ||
  ------------------
  |  Branch (274:6): [True: 0, False: 13.0k]
  ------------------
  275|  13.0k|     Curl_uint32_bset_resize(&multi->dirty, xfer_table_size) ||
  ------------------
  |  Branch (275:6): [True: 0, False: 13.0k]
  ------------------
  276|  13.0k|     Curl_uint32_bset_resize(&multi->msgsent, xfer_table_size) ||
  ------------------
  |  Branch (276:6): [True: 0, False: 13.0k]
  ------------------
  277|  13.0k|     Curl_uint32_tbl_resize(&multi->xfers, xfer_table_size))
  ------------------
  |  Branch (277:6): [True: 0, False: 13.0k]
  ------------------
  278|      0|    goto error;
  279|       |
  280|  13.0k|  multi->admin = curl_easy_init();
  281|  13.0k|  if(!multi->admin)
  ------------------
  |  Branch (281:6): [True: 0, False: 13.0k]
  ------------------
  282|      0|    goto error;
  283|       |  /* Initialize admin handle to operate inside this multi */
  284|  13.0k|  multi->admin->multi = multi;
  285|  13.0k|  multi->admin->state.internal = TRUE;
  ------------------
  |  | 1051|  13.0k|#define TRUE true
  ------------------
  286|  13.0k|  Curl_llist_init(&multi->admin->state.timeoutlist, NULL);
  287|       |
  288|  13.0k|#ifdef DEBUGBUILD
  289|  13.0k|  if(getenv("CURL_DEBUG"))
  ------------------
  |  Branch (289:6): [True: 0, False: 13.0k]
  ------------------
  290|      0|    multi->admin->set.verbose = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  291|  13.0k|#endif
  292|  13.0k|  Curl_uint32_tbl_add(&multi->xfers, multi->admin, &multi->admin->mid);
  293|  13.0k|  Curl_uint32_bset_add(&multi->process, multi->admin->mid);
  294|       |
  295|  13.0k|  if(Curl_cshutdn_init(&multi->cshutdn, multi))
  ------------------
  |  Branch (295:6): [True: 0, False: 13.0k]
  ------------------
  296|      0|    goto error;
  297|       |
  298|  13.0k|  Curl_cpool_init(&multi->cpool, multi->admin, NULL, chashsize);
  299|       |
  300|  13.0k|#ifdef USE_SSL
  301|  13.0k|  if(Curl_ssl_scache_create(sesssize, 2, &multi->ssl_scache))
  ------------------
  |  Branch (301:6): [True: 0, False: 13.0k]
  ------------------
  302|      0|    goto error;
  303|       |#else
  304|       |  (void)sesssize;
  305|       |#endif
  306|       |
  307|       |#ifdef USE_WINSOCK
  308|       |  multi->wsa_event = WSACreateEvent();
  309|       |  if(multi->wsa_event == WSA_INVALID_EVENT)
  310|       |    goto error;
  311|       |#endif
  312|  13.0k|#ifdef ENABLE_WAKEUP
  313|       |  /* When enabled, rely on this to work. We ignore this in previous
  314|       |   * versions, but that seems an unnecessary complication. */
  315|  13.0k|  if(Curl_wakeup_init(multi->wakeup_pair, TRUE) < 0)
  ------------------
  |  | 1051|  13.0k|#define TRUE true
  ------------------
  |  Branch (315:6): [True: 0, False: 13.0k]
  ------------------
  316|      0|    goto error;
  317|  13.0k|#endif
  318|       |
  319|  13.0k|  if(Curl_probeipv6(multi))
  ------------------
  |  Branch (319:6): [True: 0, False: 13.0k]
  ------------------
  320|      0|    goto error;
  321|       |
  322|  13.0k|#ifdef USE_RESOLV_THREADED
  323|  13.0k|  if(xfer_table_size < CURL_XFER_TABLE_SIZE) { /* easy multi */
  ------------------
  |  |   52|  13.0k|#define CURL_XFER_TABLE_SIZE 512
  ------------------
  |  Branch (323:6): [True: 0, False: 13.0k]
  ------------------
  324|      0|    if(Curl_async_thrdd_multi_init(multi, 0, 2, 10))
  ------------------
  |  Branch (324:8): [True: 0, False: 0]
  ------------------
  325|      0|      goto error;
  326|      0|  }
  327|  13.0k|  else { /* real multi handle */
  328|  13.0k|    if(Curl_async_thrdd_multi_init(multi, 0, 20, 2000))
  ------------------
  |  Branch (328:8): [True: 0, False: 13.0k]
  ------------------
  329|      0|      goto error;
  330|  13.0k|  }
  331|  13.0k|#endif
  332|       |
  333|  13.0k|  return multi;
  334|       |
  335|      0|error:
  336|       |
  337|      0|#ifdef USE_RESOLV_THREADED
  338|      0|  Curl_async_thrdd_multi_destroy(multi, TRUE);
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  339|      0|#endif
  340|      0|  Curl_multi_ev_cleanup(multi);
  341|      0|  Curl_hash_destroy(&multi->proto_hash);
  342|      0|  Curl_dnscache_destroy(&multi->dnscache);
  343|      0|  Curl_cpool_destroy(&multi->cpool);
  344|      0|  Curl_cshutdn_destroy(&multi->cshutdn, multi->admin);
  345|      0|#ifdef USE_SSL
  346|      0|  Curl_ssl_scache_destroy(multi->ssl_scache);
  347|      0|#endif
  348|      0|  if(multi->admin) {
  ------------------
  |  Branch (348:6): [True: 0, False: 0]
  ------------------
  349|      0|    Curl_multi_ev_xfer_done(multi, multi->admin);
  350|      0|    multi->admin->multi = NULL;
  351|      0|    Curl_close(&multi->admin);
  352|      0|  }
  353|      0|  Curl_mntfy_cleanup(multi);
  354|       |
  355|      0|  Curl_uint32_bset_destroy(&multi->process);
  356|      0|  Curl_uint32_bset_destroy(&multi->dirty);
  357|      0|  Curl_uint32_bset_destroy(&multi->pending);
  358|      0|  Curl_uint32_bset_destroy(&multi->msgsent);
  359|      0|  Curl_uint32_tbl_destroy(&multi->xfers);
  360|      0|#ifdef ENABLE_WAKEUP
  361|      0|  Curl_wakeup_destroy(multi->wakeup_pair);
  362|      0|#endif
  363|       |
  364|      0|  curlx_free(multi);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  365|       |  return NULL;
  366|  13.0k|}
curl_multi_init:
  369|  13.0k|{
  370|  13.0k|  return Curl_multi_handle(CURL_XFER_TABLE_SIZE,
  ------------------
  |  |   52|  13.0k|#define CURL_XFER_TABLE_SIZE 512
  ------------------
  371|  13.0k|                           CURL_SOCKET_HASH_TABLE_SIZE,
  ------------------
  |  |   60|  13.0k|#define CURL_SOCKET_HASH_TABLE_SIZE 911
  ------------------
  372|  13.0k|                           CURL_CONNECTION_HASH_SIZE,
  ------------------
  |  |   64|  13.0k|#define CURL_CONNECTION_HASH_SIZE 97
  ------------------
  373|  13.0k|                           CURL_DNS_HASH_SIZE,
  ------------------
  |  |   68|  13.0k|#define CURL_DNS_HASH_SIZE 71
  ------------------
  374|  13.0k|                           CURL_TLS_SESSION_SIZE);
  ------------------
  |  |   72|  13.0k|#define CURL_TLS_SESSION_SIZE 25
  ------------------
  375|  13.0k|}
Curl_is_connecting:
  392|  56.3k|{
  393|  56.3k|  return data->mstate < MSTATE_DO;
  394|  56.3k|}
curl_multi_add_handle:
  467|  13.6k|{
  468|  13.6k|  CURLMcode mresult;
  469|  13.6k|  struct Curl_multi *multi = m;
  470|  13.6k|  struct Curl_easy *data = curl;
  471|       |
  472|       |  /* First, make some basic checks that the CURLM handle is a good handle */
  473|  13.6k|  if(!GOOD_MULTI_HANDLE(multi))
  ------------------
  |  |   82|  13.6k|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|  13.6k|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|  13.6k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 13.6k, False: 0]
  |  |  |  Branch (82:12): [True: 13.6k, False: 0]
  |  |  ------------------
  |  |   83|  13.6k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (473:6): [True: 0, False: 13.6k]
  |  Branch (473:7): [True: 0, False: 0]
  |  Branch (473:7): [True: 0, False: 0]
  ------------------
  474|      0|    return CURLM_BAD_HANDLE;
  475|       |
  476|       |  /* Verify that we got a somewhat good easy handle too */
  477|  13.6k|  if(!GOOD_EASY_HANDLE(data))
  ------------------
  |  |  141|  13.6k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  135|  13.6k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|  13.6k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (141:5): [True: 13.6k, False: 0]
  |  |  |  Branch (141:12): [True: 13.6k, False: 0]
  |  |  ------------------
  |  |  142|  13.6k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (477:6): [True: 0, False: 13.6k]
  |  Branch (477:7): [True: 0, False: 0]
  |  Branch (477:7): [True: 0, False: 0]
  ------------------
  478|      0|    return CURLM_BAD_EASY_HANDLE;
  479|       |
  480|       |  /* Prevent users from adding same easy handle more than once and prevent
  481|       |     adding to more than one multi stack */
  482|  13.6k|  if(data->multi)
  ------------------
  |  Branch (482:6): [True: 0, False: 13.6k]
  ------------------
  483|      0|    return CURLM_ADDED_ALREADY;
  484|       |
  485|  13.6k|  if(multi->in_callback)
  ------------------
  |  Branch (485:6): [True: 0, False: 13.6k]
  ------------------
  486|      0|    return CURLM_RECURSIVE_API_CALL;
  487|       |
  488|  13.6k|  if(multi->dead) {
  ------------------
  |  Branch (488:6): [True: 0, False: 13.6k]
  ------------------
  489|       |    /* a "dead" handle cannot get added transfers while any existing easy
  490|       |       handles are still alive - but if there are none alive anymore, it is
  491|       |       fine to start over and unmark the "deadness" of this handle.
  492|       |       This means only the admin handle MUST be present. */
  493|      0|    if((Curl_uint32_tbl_count(&multi->xfers) != 1) ||
  ------------------
  |  Branch (493:8): [True: 0, False: 0]
  ------------------
  494|      0|       !Curl_uint32_tbl_contains(&multi->xfers, 0))
  ------------------
  |  Branch (494:8): [True: 0, False: 0]
  ------------------
  495|      0|      return CURLM_ABORTED_BY_CALLBACK;
  496|      0|    multi->dead = FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  497|      0|    Curl_uint32_bset_clear(&multi->process);
  498|      0|    Curl_uint32_bset_clear(&multi->dirty);
  499|      0|    Curl_uint32_bset_clear(&multi->pending);
  500|      0|    Curl_uint32_bset_clear(&multi->msgsent);
  501|      0|  }
  502|       |
  503|  13.6k|  if(data->multi_easy) {
  ------------------
  |  Branch (503:6): [True: 0, False: 13.6k]
  ------------------
  504|       |    /* if this easy handle was previously used for curl_easy_perform(), there
  505|       |       is a private multi handle here that we can kill */
  506|      0|    curl_multi_cleanup(data->multi_easy);
  507|      0|    data->multi_easy = NULL;
  508|      0|  }
  509|       |
  510|       |  /* Insert the easy into the multi->xfers table, assigning it a `mid`. */
  511|  13.6k|  if(multi_xfers_add(multi, data))
  ------------------
  |  Branch (511:6): [True: 0, False: 13.6k]
  ------------------
  512|      0|    return CURLM_OUT_OF_MEMORY;
  513|       |
  514|       |  /* Initialize timeout list for this handle */
  515|  13.6k|  Curl_llist_init(&data->state.timeoutlist, NULL);
  516|       |
  517|       |  /*
  518|       |   * No failure allowed in this function beyond this point. No modification of
  519|       |   * easy nor multi handle allowed before this except for potential multi's
  520|       |   * connection pool growing which will not be undone in this function no
  521|       |   * matter what.
  522|       |   */
  523|  13.6k|  if(data->set.errorbuffer)
  ------------------
  |  Branch (523:6): [True: 0, False: 13.6k]
  ------------------
  524|      0|    data->set.errorbuffer[0] = 0;
  525|       |
  526|  13.6k|  data->state.os_errno = 0;
  527|       |
  528|       |  /* make the Curl_easy refer back to this multi handle - before Curl_expire()
  529|       |     is called. */
  530|  13.6k|  data->multi = multi;
  531|       |
  532|       |  /* set the easy handle */
  533|  13.6k|  multistate(data, MSTATE_INIT);
  ------------------
  |  |  212|  13.6k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
  534|       |  /* not yet passed INIT state */
  535|  13.6k|  data->state.really_alive = FALSE;
  ------------------
  |  | 1054|  13.6k|#define FALSE false
  ------------------
  536|       |
  537|       |#ifdef USE_LIBPSL
  538|       |  /* Do the same for PSL. */
  539|       |  if(data->share && (data->share->specifier & (1 << CURL_LOCK_DATA_PSL)))
  540|       |    data->psl = &data->share->psl;
  541|       |  else
  542|       |    data->psl = &multi->psl;
  543|       |#endif
  544|       |
  545|       |  /* add the easy handle to the process set */
  546|  13.6k|  Curl_uint32_bset_add(&multi->process, data->mid);
  547|  13.6k|  ++multi->xfers_alive;
  548|  13.6k|  ++multi->xfers_total_ever;
  549|       |
  550|  13.6k|  Curl_cpool_xfer_init(data);
  551|  13.6k|  multi_warn_debug(multi, data);
  552|       |
  553|       |  /* Make sure the new handle will run */
  554|  13.6k|  Curl_multi_mark_dirty(data);
  555|       |
  556|       |  /* Necessary in event based processing, where dirty handles trigger
  557|       |   * a timeout callback invocation. */
  558|  13.6k|  mresult = Curl_update_timer(multi);
  559|  13.6k|  if(mresult) {
  ------------------
  |  Branch (559:6): [True: 0, False: 13.6k]
  ------------------
  560|      0|    data->multi = NULL; /* not anymore */
  561|      0|    Curl_uint32_tbl_remove(&multi->xfers, data->mid);
  562|      0|    data->mid = UINT32_MAX;
  563|      0|    return mresult;
  564|      0|  }
  565|       |
  566|       |  /* The admin handle only ever has default timeouts set. To improve the
  567|       |     state somewhat we clone the timeouts from each added handle so that the
  568|       |     admin handle always has the same timeouts as the most recently added
  569|       |     easy handle. */
  570|  13.6k|  multi->admin->set.timeout = data->set.timeout;
  571|  13.6k|  multi->admin->set.server_response_timeout =
  572|  13.6k|    data->set.server_response_timeout;
  573|  13.6k|  multi->admin->set.no_signal = data->set.no_signal;
  574|       |
  575|  13.6k|  CURL_TRC_M(data, "added to multi, mid=%u, running=%u, total=%u",
  ------------------
  |  |  148|  13.6k|  do {                                   \
  |  |  149|  13.6k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  13.6k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  13.6k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  27.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 13.6k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 13.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  27.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|  13.6k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  13.6k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  13.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 13.6k]
  |  |  ------------------
  ------------------
  576|  13.6k|             data->mid, Curl_multi_xfers_running(multi),
  577|  13.6k|             Curl_uint32_tbl_count(&multi->xfers));
  578|  13.6k|  return CURLM_OK;
  579|  13.6k|}
curl_multi_remove_handle:
  785|  13.6k|{
  786|  13.6k|  struct Curl_multi *multi = m;
  787|  13.6k|  struct Curl_easy *data = curl;
  788|  13.6k|  bool premature;
  789|  13.6k|  struct Curl_llist_node *e;
  790|  13.6k|  CURLMcode mresult;
  791|  13.6k|  uint32_t mid;
  792|       |
  793|       |  /* First, make some basic checks that the CURLM handle is a good handle */
  794|  13.6k|  if(!GOOD_MULTI_HANDLE(multi))
  ------------------
  |  |   82|  13.6k|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|  13.6k|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|  13.6k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 13.6k, False: 0]
  |  |  |  Branch (82:12): [True: 13.6k, False: 0]
  |  |  ------------------
  |  |   83|  13.6k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (794:6): [True: 0, False: 13.6k]
  |  Branch (794:7): [True: 0, False: 0]
  |  Branch (794:7): [True: 0, False: 0]
  ------------------
  795|      0|    return CURLM_BAD_HANDLE;
  796|       |
  797|       |  /* Verify that we got a somewhat good easy handle too */
  798|  13.6k|  if(!GOOD_EASY_HANDLE(data))
  ------------------
  |  |  141|  13.6k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  135|  13.6k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|  13.6k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (141:5): [True: 13.6k, False: 0]
  |  |  |  Branch (141:12): [True: 13.6k, False: 0]
  |  |  ------------------
  |  |  142|  13.6k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (798:6): [True: 0, False: 13.6k]
  |  Branch (798:7): [True: 0, False: 0]
  |  Branch (798:7): [True: 0, False: 0]
  ------------------
  799|      0|    return CURLM_BAD_EASY_HANDLE;
  800|       |
  801|       |  /* Prevent users from trying to remove same easy handle more than once */
  802|  13.6k|  if(!data->multi)
  ------------------
  |  Branch (802:6): [True: 0, False: 13.6k]
  ------------------
  803|      0|    return CURLM_OK; /* it is already removed so let's say it is fine! */
  804|       |
  805|       |  /* Prevent users from trying to remove an easy handle from the wrong multi */
  806|  13.6k|  if(data->multi != multi)
  ------------------
  |  Branch (806:6): [True: 0, False: 13.6k]
  ------------------
  807|      0|    return CURLM_BAD_EASY_HANDLE;
  808|       |
  809|  13.6k|  if(data->mid == UINT32_MAX) {
  ------------------
  |  Branch (809:6): [True: 0, False: 13.6k]
  ------------------
  810|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (810:5): [Folded, False: 0]
  |  Branch (810:5): [Folded, False: 0]
  ------------------
  811|      0|    return CURLM_INTERNAL_ERROR;
  812|      0|  }
  813|  13.6k|  if(Curl_uint32_tbl_get(&multi->xfers, data->mid) != data) {
  ------------------
  |  Branch (813:6): [True: 0, False: 13.6k]
  ------------------
  814|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (814:5): [Folded, False: 0]
  |  Branch (814:5): [Folded, False: 0]
  ------------------
  815|      0|    return CURLM_INTERNAL_ERROR;
  816|      0|  }
  817|       |
  818|  13.6k|  if(multi->in_callback)
  ------------------
  |  Branch (818:6): [True: 0, False: 13.6k]
  ------------------
  819|      0|    return CURLM_RECURSIVE_API_CALL;
  820|       |
  821|  13.6k|  premature = (data->mstate < MSTATE_COMPLETED);
  822|       |
  823|       |  /* If the 'state' is not INIT or COMPLETED, we might need to do something
  824|       |     nice to put the easy_handle in a good known state when this returns. */
  825|  13.6k|  if(data->conn &&
  ------------------
  |  Branch (825:6): [True: 988, False: 12.6k]
  ------------------
  826|    988|     data->mstate > MSTATE_DO &&
  ------------------
  |  Branch (826:6): [True: 222, False: 766]
  ------------------
  827|    222|     data->mstate < MSTATE_COMPLETED) {
  ------------------
  |  Branch (827:6): [True: 222, False: 0]
  ------------------
  828|       |    /* Set connection owner so that the DONE function closes it. We can
  829|       |       safely do this here since connection is killed. */
  830|    222|    streamclose(data->conn, "Removed with partial response");
  ------------------
  |  |   96|    222|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   86|    222|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
  831|    222|  }
  832|       |
  833|  13.6k|  if(data->conn) {
  ------------------
  |  Branch (833:6): [True: 988, False: 12.6k]
  ------------------
  834|       |    /* multi_done() clears the association between the easy handle and the
  835|       |       connection.
  836|       |
  837|       |       Note that this ignores the return code because there is
  838|       |       nothing really useful to do with it anyway! */
  839|    988|    (void)multi_done(data, data->result, premature);
  840|    988|  }
  841|       |
  842|       |  /* The timer must be shut down before data->multi is set to NULL, else the
  843|       |     timenode will remain in the splay tree after curl_easy_cleanup is
  844|       |     called. Do it after multi_done() in case that sets another time! */
  845|  13.6k|  Curl_expire_clear(data);
  846|       |
  847|       |  /* If in `msgsent`, it was deducted from `multi->xfers_alive` already. */
  848|  13.6k|  if(!Curl_uint32_bset_contains(&multi->msgsent, data->mid))
  ------------------
  |  Branch (848:6): [True: 1.14k, False: 12.5k]
  ------------------
  849|  1.14k|    --multi->xfers_alive;
  850|  13.6k|  if(data->state.really_alive) {
  ------------------
  |  Branch (850:6): [True: 1.14k, False: 12.5k]
  ------------------
  851|  1.14k|    data->state.really_alive = FALSE;
  ------------------
  |  | 1054|  1.14k|#define FALSE false
  ------------------
  852|  1.14k|    --multi->xfers_really_alive;
  853|  1.14k|    if(!multi->xfers_really_alive)
  ------------------
  |  Branch (853:8): [True: 807, False: 335]
  ------------------
  854|    807|      (void)multi_assess_wakeup(multi);
  855|  1.14k|  }
  856|       |
  857|  13.6k|  Curl_wildcard_dtor(&data->wildcard);
  858|       |
  859|  13.6k|  data->mstate = MSTATE_COMPLETED;
  860|       |
  861|       |  /* Remove the association between the connection and the handle */
  862|  13.6k|  Curl_detach_connection(data);
  863|       |
  864|       |  /* Tell event handling that this transfer is definitely going away */
  865|  13.6k|  Curl_multi_ev_xfer_done(multi, data);
  866|       |
  867|  13.6k|  if(data->set.connect_only && !data->multi_easy) {
  ------------------
  |  Branch (867:6): [True: 9, False: 13.6k]
  |  Branch (867:32): [True: 9, False: 0]
  ------------------
  868|       |    /* This removes a handle that was part the multi interface that used
  869|       |       CONNECT_ONLY, that connection is now left alive but since this handle
  870|       |       has bits.close set nothing can use that transfer anymore and it is
  871|       |       forbidden from reuse. This easy handle cannot find the connection
  872|       |       anymore once removed from the multi handle
  873|       |
  874|       |       Better close the connection here, at once.
  875|       |    */
  876|      9|    struct connectdata *c;
  877|      9|    curl_socket_t s;
  878|      9|    s = Curl_getconnectinfo(data, &c);
  879|      9|    if((s != CURL_SOCKET_BAD) && c) {
  ------------------
  |  |  145|      9|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (879:8): [True: 2, False: 7]
  |  Branch (879:34): [True: 2, False: 0]
  ------------------
  880|      2|      Curl_conn_terminate(data, c, TRUE);
  ------------------
  |  | 1051|      2|#define TRUE true
  ------------------
  881|      2|    }
  882|      9|  }
  883|       |
  884|  13.6k|  if(data->state.lastconnect_id != -1) {
  ------------------
  |  Branch (884:6): [True: 2, False: 13.6k]
  ------------------
  885|       |    /* Mark any connect-only connection for closure */
  886|      2|    Curl_cpool_do_by_id(data, data->state.lastconnect_id,
  887|      2|                        close_connect_only, NULL);
  888|      2|  }
  889|       |
  890|       |#ifdef USE_LIBPSL
  891|       |  /* Remove the PSL association. */
  892|       |  if(data->psl == &multi->psl)
  893|       |    data->psl = NULL;
  894|       |#endif
  895|       |
  896|       |  /* make sure there is no pending message in the queue sent from this easy
  897|       |     handle */
  898|  13.6k|  for(e = Curl_llist_head(&multi->msglist); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (898:45): [True: 12.2k, False: 1.42k]
  ------------------
  899|  12.2k|    struct Curl_message *msg = Curl_node_elem(e);
  900|       |
  901|  12.2k|    if(msg->extmsg.easy_handle == data) {
  ------------------
  |  Branch (901:8): [True: 12.2k, False: 0]
  ------------------
  902|  12.2k|      Curl_node_remove(e);
  903|       |      /* there can only be one from this specific handle */
  904|  12.2k|      break;
  905|  12.2k|    }
  906|  12.2k|  }
  907|       |
  908|       |  /* clear the association to this multi handle */
  909|  13.6k|  mid = data->mid;
  910|  13.6k|  DEBUGASSERT(Curl_uint32_tbl_contains(&multi->xfers, mid));
  ------------------
  |  | 1077|  13.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (910:3): [True: 0, False: 13.6k]
  |  Branch (910:3): [True: 13.6k, False: 0]
  ------------------
  911|  13.6k|  Curl_uint32_tbl_remove(&multi->xfers, mid);
  912|  13.6k|  Curl_uint32_bset_remove(&multi->process, mid);
  913|  13.6k|  Curl_uint32_bset_remove(&multi->dirty, mid);
  914|  13.6k|  Curl_uint32_bset_remove(&multi->pending, mid);
  915|  13.6k|  Curl_uint32_bset_remove(&multi->msgsent, mid);
  916|  13.6k|  data->multi = NULL;
  917|  13.6k|  data->mid = UINT32_MAX;
  918|  13.6k|  data->master_mid = UINT32_MAX;
  919|       |
  920|       |  /* NOTE NOTE NOTE
  921|       |     We do not touch the easy handle here! */
  922|  13.6k|  process_pending_handles(multi);
  923|       |
  924|  13.6k|  mresult = Curl_update_timer(multi);
  925|  13.6k|  if(mresult)
  ------------------
  |  Branch (925:6): [True: 0, False: 13.6k]
  ------------------
  926|      0|    return mresult;
  927|       |
  928|  13.6k|  mresult = multi_assess_wakeup(multi);
  929|  13.6k|  if(mresult) {
  ------------------
  |  Branch (929:6): [True: 0, False: 13.6k]
  ------------------
  930|      0|    failf(data, "error enabling wakeup listening: %d", mresult);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  931|      0|    return mresult;
  932|      0|  }
  933|       |
  934|  13.6k|  CURL_TRC_M(data, "removed from multi, mid=%u, running=%u, total=%u",
  ------------------
  |  |  148|  13.6k|  do {                                   \
  |  |  149|  13.6k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  13.6k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  13.6k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  27.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 13.6k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 13.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  27.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|  13.6k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  13.6k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  13.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 13.6k]
  |  |  ------------------
  ------------------
  935|  13.6k|             mid, Curl_multi_xfers_running(multi),
  936|  13.6k|             Curl_uint32_tbl_count(&multi->xfers));
  937|  13.6k|  return CURLM_OK;
  938|  13.6k|}
Curl_multiplex_wanted:
  942|    425|{
  943|    425|  return multi && multi->multiplexing;
  ------------------
  |  Branch (943:10): [True: 425, False: 0]
  |  Branch (943:19): [True: 425, False: 0]
  ------------------
  944|    425|}
Curl_detach_connection:
  953|  70.8k|{
  954|  70.8k|  struct connectdata *conn = data->conn;
  955|  70.8k|  if(conn) {
  ------------------
  |  Branch (955:6): [True: 16.2k, False: 54.5k]
  ------------------
  956|       |    /* this should never happen, prevent underflow */
  957|  16.2k|    DEBUGASSERT(conn->attached_xfers);
  ------------------
  |  | 1077|  16.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (957:5): [True: 0, False: 16.2k]
  |  Branch (957:5): [True: 16.2k, False: 0]
  ------------------
  958|  16.2k|    if(conn->attached_xfers) {
  ------------------
  |  Branch (958:8): [True: 16.2k, False: 0]
  ------------------
  959|  16.2k|      conn->attached_xfers--;
  960|  16.2k|      if(!conn->attached_xfers)
  ------------------
  |  Branch (960:10): [True: 16.2k, False: 0]
  ------------------
  961|  16.2k|        conn->attached_multi = NULL;
  962|  16.2k|    }
  963|  16.2k|  }
  964|  70.8k|  data->conn = NULL;
  965|  70.8k|}
Curl_attach_connection:
  974|  16.2k|{
  975|  16.2k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  16.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (975:3): [True: 0, False: 16.2k]
  |  Branch (975:3): [True: 16.2k, False: 0]
  ------------------
  976|  16.2k|  DEBUGASSERT(!data->conn);
  ------------------
  |  | 1077|  16.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (976:3): [True: 0, False: 16.2k]
  |  Branch (976:3): [True: 16.2k, False: 0]
  ------------------
  977|  16.2k|  DEBUGASSERT(conn);
  ------------------
  |  | 1077|  16.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (977:3): [True: 0, False: 16.2k]
  |  Branch (977:3): [True: 16.2k, False: 0]
  ------------------
  978|  16.2k|  DEBUGASSERT(conn->attached_xfers < UINT32_MAX);
  ------------------
  |  | 1077|  16.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (978:3): [True: 0, False: 16.2k]
  |  Branch (978:3): [True: 16.2k, False: 0]
  ------------------
  979|  16.2k|  data->conn = conn;
  980|  16.2k|  conn->attached_xfers++;
  981|       |  /* all attached transfers must be from the same multi */
  982|  16.2k|  if(!conn->attached_multi)
  ------------------
  |  Branch (982:6): [True: 16.2k, False: 0]
  ------------------
  983|  16.2k|    conn->attached_multi = data->multi;
  984|  16.2k|  DEBUGASSERT(conn->attached_multi == data->multi);
  ------------------
  |  | 1077|  16.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (984:3): [True: 0, False: 16.2k]
  |  Branch (984:3): [True: 16.2k, False: 0]
  ------------------
  985|       |
  986|  16.2k|  if(conn->scheme && conn->scheme->run->attach)
  ------------------
  |  Branch (986:6): [True: 16.2k, False: 0]
  |  Branch (986:22): [True: 0, False: 16.2k]
  ------------------
  987|      0|    conn->scheme->run->attach(data, conn);
  988|  16.2k|}
Curl_multi_pollset:
 1147|  10.1k|{
 1148|  10.1k|  CURLcode result = CURLE_OK;
 1149|       |
 1150|  10.1k|  Curl_pollset_reset(ps);
 1151|  10.1k|#ifdef ENABLE_WAKEUP
 1152|       |  /* The admin handle always listens on the wakeup socket when there
 1153|       |   * are transfers alive. */
 1154|  10.1k|  if(data->multi && (data == data->multi->admin) &&
  ------------------
  |  Branch (1154:6): [True: 10.1k, False: 0]
  |  Branch (1154:21): [True: 4.89k, False: 5.27k]
  ------------------
 1155|  4.89k|     data->multi->xfers_really_alive) {
  ------------------
  |  Branch (1155:6): [True: 4.89k, False: 0]
  ------------------
 1156|  4.89k|    CURL_TRC_M(data, "adding wakeup, %u xfers really alive",
  ------------------
  |  |  148|  4.89k|  do {                                   \
  |  |  149|  4.89k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  4.89k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  4.89k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  9.79k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 4.89k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.89k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  9.79k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((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.89k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  4.89k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  4.89k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 4.89k]
  |  |  ------------------
  ------------------
 1157|  4.89k|               data->multi->xfers_really_alive);
 1158|  4.89k|    result = Curl_pollset_add_in(data, ps, data->multi->wakeup_pair[0]);
  ------------------
  |  |  162|  4.89k|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, 0)
  |  |  ------------------
  |  |  |  |  283|  4.89k|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
 1159|  4.89k|  }
 1160|  10.1k|#endif
 1161|       |  /* If the transfer has no connection, this is fine. Happens when
 1162|       |     called via curl_multi_remove_handle() => Curl_multi_ev_assess() =>
 1163|       |     Curl_multi_pollset(). */
 1164|  10.1k|  if(!result && data->conn) {
  ------------------
  |  Branch (1164:6): [True: 10.1k, False: 0]
  |  Branch (1164:17): [True: 5.27k, False: 4.89k]
  ------------------
 1165|  5.27k|    switch(data->mstate) {
 1166|      0|    case MSTATE_INIT:
  ------------------
  |  Branch (1166:5): [True: 0, False: 5.27k]
  ------------------
 1167|      0|    case MSTATE_PENDING:
  ------------------
  |  Branch (1167:5): [True: 0, False: 5.27k]
  ------------------
 1168|      0|    case MSTATE_SETUP:
  ------------------
  |  Branch (1168:5): [True: 0, False: 5.27k]
  ------------------
 1169|      0|    case MSTATE_CONNECT:
  ------------------
  |  Branch (1169:5): [True: 0, False: 5.27k]
  ------------------
 1170|       |      /* nothing to poll for yet */
 1171|      0|      break;
 1172|       |
 1173|  1.18k|    case MSTATE_CONNECTING:
  ------------------
  |  Branch (1173:5): [True: 1.18k, False: 4.08k]
  ------------------
 1174|  1.18k|      if(data->conn && !data->conn->bits.dns_resolved)
  ------------------
  |  Branch (1174:10): [True: 1.18k, False: 0]
  |  Branch (1174:24): [True: 899, False: 287]
  ------------------
 1175|    899|        result = Curl_resolv_pollset(data, ps);
 1176|  1.18k|      if(!result)
  ------------------
  |  Branch (1176:10): [True: 1.18k, False: 0]
  ------------------
 1177|  1.18k|        result = mstate_connecting_pollset(data, ps);
 1178|  1.18k|      break;
 1179|       |
 1180|      0|    case MSTATE_PROTOCONNECT:
  ------------------
  |  Branch (1180:5): [True: 0, False: 5.27k]
  ------------------
 1181|  3.39k|    case MSTATE_PROTOCONNECTING:
  ------------------
  |  Branch (1181:5): [True: 3.39k, False: 1.87k]
  ------------------
 1182|  3.39k|      result = mstate_protocol_pollset(data, ps);
 1183|  3.39k|      break;
 1184|       |
 1185|      0|    case MSTATE_DO:
  ------------------
  |  Branch (1185:5): [True: 0, False: 5.27k]
  ------------------
 1186|      0|    case MSTATE_DOING:
  ------------------
  |  Branch (1186:5): [True: 0, False: 5.27k]
  ------------------
 1187|      0|      result = mstate_do_pollset(data, ps);
 1188|      0|      break;
 1189|       |
 1190|      0|    case MSTATE_DOING_MORE:
  ------------------
  |  Branch (1190:5): [True: 0, False: 5.27k]
  ------------------
 1191|      0|      result = mstate_domore_pollset(data, ps);
 1192|      0|      break;
 1193|       |
 1194|      0|    case MSTATE_DID: /* same as PERFORMING in regard to polling */
  ------------------
  |  Branch (1194:5): [True: 0, False: 5.27k]
  ------------------
 1195|    624|    case MSTATE_PERFORMING:
  ------------------
  |  Branch (1195:5): [True: 624, False: 4.64k]
  ------------------
 1196|    624|      result = mstate_perform_pollset(data, ps);
 1197|    624|      break;
 1198|       |
 1199|     65|    case MSTATE_RATELIMITING:
  ------------------
  |  Branch (1199:5): [True: 65, False: 5.20k]
  ------------------
 1200|       |      /* we need to let time pass, ignore socket(s) */
 1201|     65|      break;
 1202|       |
 1203|      0|    case MSTATE_DONE:
  ------------------
  |  Branch (1203:5): [True: 0, False: 5.27k]
  ------------------
 1204|      0|    case MSTATE_COMPLETED:
  ------------------
  |  Branch (1204:5): [True: 0, False: 5.27k]
  ------------------
 1205|      0|    case MSTATE_MSGSENT:
  ------------------
  |  Branch (1205:5): [True: 0, False: 5.27k]
  ------------------
 1206|       |      /* nothing more to poll for */
 1207|      0|      break;
 1208|       |
 1209|      0|    default:
  ------------------
  |  Branch (1209:5): [True: 0, False: 5.27k]
  ------------------
 1210|      0|      failf(data, "multi_getsock: unexpected multi state %d",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1211|      0|            (int)data->mstate);
 1212|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1212:7): [Folded, False: 0]
  |  Branch (1212:7): [Folded, False: 0]
  ------------------
 1213|      0|      break;
 1214|  5.27k|    }
 1215|  5.27k|  }
 1216|       |
 1217|  10.1k|  if(result) {
  ------------------
  |  Branch (1217:6): [True: 0, False: 10.1k]
  ------------------
 1218|      0|    if(result == CURLE_OUT_OF_MEMORY)
  ------------------
  |  Branch (1218:8): [True: 0, False: 0]
  ------------------
 1219|      0|      return CURLM_OUT_OF_MEMORY;
 1220|      0|    failf(data, "error determining pollset: %d", (int)result);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1221|      0|    return CURLM_INTERNAL_ERROR;
 1222|      0|  }
 1223|       |
 1224|  10.1k|#ifdef CURLVERBOSE
 1225|  10.1k|  if(CURL_TRC_M_is_verbose(data)) {
  ------------------
  |  |  135|  10.1k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  ------------------
  |  |  |  |  326|  10.1k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  20.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 10.1k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  20.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|  10.1k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1226|      0|    size_t timeout_count = Curl_llist_count(&data->state.timeoutlist);
 1227|      0|    switch(ps->n) {
 1228|      0|    case 0:
  ------------------
  |  Branch (1228:5): [True: 0, False: 0]
  ------------------
 1229|      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]
  |  |  ------------------
  ------------------
 1230|      0|                 timeout_count,
 1231|      0|                 Curl_xfer_send_is_paused(data),
 1232|      0|                 Curl_xfer_recv_is_paused(data));
 1233|      0|      break;
 1234|      0|    case 1:
  ------------------
  |  Branch (1234:5): [True: 0, False: 0]
  ------------------
 1235|      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]
  |  |  ------------------
  ------------------
 1236|      0|                 ps->sockets[0],
 1237|      0|                 (ps->actions[0] & CURL_POLL_IN) ? "IN" : "",
 1238|      0|                 (ps->actions[0] & CURL_POLL_OUT) ? "OUT" : "",
 1239|      0|                 timeout_count);
 1240|      0|      break;
 1241|      0|    case 2:
  ------------------
  |  Branch (1241:5): [True: 0, False: 0]
  ------------------
 1242|      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]
  |  |  ------------------
  ------------------
 1243|      0|                 "fd=%" FMT_SOCKET_T " %s%s], timeouts=%zu",
 1244|      0|                 ps->sockets[0],
 1245|      0|                 (ps->actions[0] & CURL_POLL_IN) ? "IN" : "",
 1246|      0|                 (ps->actions[0] & CURL_POLL_OUT) ? "OUT" : "",
 1247|      0|                 ps->sockets[1],
 1248|      0|                 (ps->actions[1] & CURL_POLL_IN) ? "IN" : "",
 1249|      0|                 (ps->actions[1] & CURL_POLL_OUT) ? "OUT" : "",
 1250|      0|                 timeout_count);
 1251|      0|      break;
 1252|      0|    default:
  ------------------
  |  Branch (1252:5): [True: 0, False: 0]
  ------------------
 1253|      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]
  |  |  ------------------
  ------------------
 1254|      0|      break;
 1255|      0|    }
 1256|      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]
  |  |  ------------------
  ------------------
 1257|      0|  }
 1258|  10.1k|#endif
 1259|       |
 1260|  10.1k|  return CURLM_OK;
 1261|  10.1k|}
curl_multi_fdset:
 1266|  4.89k|{
 1267|       |  /* Scan through all the easy handles to get the file descriptors set.
 1268|       |     Some easy handles may not have connected to the remote host yet,
 1269|       |     and then we must make sure that is done. */
 1270|  4.89k|  int this_max_fd = -1;
 1271|  4.89k|  struct Curl_multi *multi = m;
 1272|  4.89k|  struct easy_pollset ps;
 1273|  4.89k|  unsigned int i;
 1274|  4.89k|  uint32_t mid;
 1275|  4.89k|  (void)exc_fd_set;
 1276|       |
 1277|  4.89k|  if(!GOOD_MULTI_HANDLE(multi))
  ------------------
  |  |   82|  4.89k|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|  4.89k|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|  4.89k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 4.89k, False: 0]
  |  |  |  Branch (82:12): [True: 4.89k, False: 0]
  |  |  ------------------
  |  |   83|  4.89k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (1277:6): [True: 0, False: 4.89k]
  |  Branch (1277:7): [True: 0, False: 0]
  |  Branch (1277:7): [True: 0, False: 0]
  ------------------
 1278|      0|    return CURLM_BAD_HANDLE;
 1279|       |
 1280|  4.89k|  if(multi->in_callback)
  ------------------
  |  Branch (1280:6): [True: 0, False: 4.89k]
  ------------------
 1281|      0|    return CURLM_RECURSIVE_API_CALL;
 1282|       |
 1283|  4.89k|  Curl_pollset_init(&ps);
 1284|  4.89k|  if(Curl_uint32_bset_first(&multi->process, &mid)) {
  ------------------
  |  Branch (1284:6): [True: 4.89k, False: 0]
  ------------------
 1285|  10.1k|    do {
 1286|  10.1k|      struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 1287|       |
 1288|  10.1k|      if(!data) {
  ------------------
  |  Branch (1288:10): [True: 0, False: 10.1k]
  ------------------
 1289|      0|        DEBUGASSERT(0);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1289:9): [Folded, False: 0]
  |  Branch (1289:9): [Folded, False: 0]
  ------------------
 1290|      0|        continue;
 1291|      0|      }
 1292|       |
 1293|  10.1k|      Curl_multi_pollset(data, &ps);
 1294|  19.3k|      for(i = 0; i < ps.n; i++) {
  ------------------
  |  Branch (1294:18): [True: 9.20k, False: 10.1k]
  ------------------
 1295|  9.20k|        if(!FDSET_SOCK(ps.sockets[i]))
  ------------------
  |  |  101|  9.20k|#define FDSET_SOCK(s) ((s) < FD_SETSIZE)
  ------------------
  |  Branch (1295:12): [True: 0, False: 9.20k]
  ------------------
 1296|       |          /* pretend it does not exist */
 1297|      0|          continue;
 1298|  9.20k|        if(ps.actions[i] & CURL_POLL_IN)
  ------------------
  |  |  283|  9.20k|#define CURL_POLL_IN     1
  ------------------
  |  Branch (1298:12): [True: 9.13k, False: 69]
  ------------------
 1299|  9.20k|          FD_SET(ps.sockets[i], read_fd_set);
 1300|  9.20k|        if(ps.actions[i] & CURL_POLL_OUT)
  ------------------
  |  |  284|  9.20k|#define CURL_POLL_OUT    2
  ------------------
  |  Branch (1300:12): [True: 69, False: 9.13k]
  ------------------
 1301|  9.20k|          FD_SET(ps.sockets[i], write_fd_set);
 1302|  9.20k|        if((int)ps.sockets[i] > this_max_fd)
  ------------------
  |  Branch (1302:12): [True: 9.20k, False: 0]
  ------------------
 1303|  9.20k|          this_max_fd = (int)ps.sockets[i];
 1304|  9.20k|      }
 1305|  10.1k|    } while(Curl_uint32_bset_next(&multi->process, mid, &mid));
  ------------------
  |  Branch (1305:13): [True: 5.27k, False: 4.89k]
  ------------------
 1306|  4.89k|  }
 1307|       |
 1308|  4.89k|  Curl_cshutdn_setfds(&multi->cshutdn, multi->admin,
 1309|  4.89k|                      read_fd_set, write_fd_set, &this_max_fd);
 1310|       |
 1311|  4.89k|  *max_fd = this_max_fd;
 1312|  4.89k|  Curl_pollset_cleanup(&ps);
 1313|       |
 1314|  4.89k|  return CURLM_OK;
 1315|  4.89k|}
curl_multi_wakeup:
 1691|    380|{
 1692|       |  /* this function is usually called from another thread,
 1693|       |     it has to be careful only to access parts of the
 1694|       |     Curl_multi struct that are constant */
 1695|    380|  struct Curl_multi *multi = m;
 1696|    380|  CURLMcode mresult = CURLM_WAKEUP_FAILURE;
 1697|       |
 1698|       |  /* GOOD_MULTI_HANDLE can be safely called */
 1699|    380|  if(!GOOD_MULTI_HANDLE(multi))
  ------------------
  |  |   82|    380|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|    380|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|    380|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 380, False: 0]
  |  |  |  Branch (82:12): [True: 380, False: 0]
  |  |  ------------------
  |  |   83|    380|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (1699:6): [True: 0, False: 380]
  |  Branch (1699:7): [True: 0, False: 0]
  |  Branch (1699:7): [True: 0, False: 0]
  ------------------
 1700|      0|    return CURLM_BAD_HANDLE;
 1701|       |
 1702|    380|#ifdef ENABLE_WAKEUP
 1703|       |  /* the wakeup_pair variable is only written during init and cleanup,
 1704|       |     making it safe to access from another thread after the init part
 1705|       |     and before cleanup */
 1706|    380|  if(!Curl_wakeup_signal(multi->wakeup_pair))
  ------------------
  |  Branch (1706:6): [True: 380, False: 0]
  ------------------
 1707|    380|    mresult = CURLM_OK;
 1708|    380|#endif
 1709|       |#ifdef USE_WINSOCK
 1710|       |  if(WSASetEvent(multi->wsa_event))
 1711|       |    mresult = CURLM_OK;
 1712|       |#endif
 1713|    380|  return mresult;
 1714|    380|}
Curl_multi_connchanged:
 1744|  7.93k|{
 1745|       |  multi->recheckstate = TRUE;
  ------------------
  |  | 1051|  7.93k|#define TRUE true
  ------------------
 1746|  7.93k|}
curl_multi_perform:
 2969|  17.1k|{
 2970|  17.1k|  struct Curl_multi *multi = m;
 2971|       |
 2972|  17.1k|  if(!GOOD_MULTI_HANDLE(multi))
  ------------------
  |  |   82|  17.1k|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|  17.1k|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|  17.1k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 17.1k, False: 0]
  |  |  |  Branch (82:12): [True: 17.1k, False: 0]
  |  |  ------------------
  |  |   83|  17.1k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (2972:6): [True: 0, False: 17.1k]
  |  Branch (2972:7): [True: 0, False: 0]
  |  Branch (2972:7): [True: 0, False: 0]
  ------------------
 2973|      0|    return CURLM_BAD_HANDLE;
 2974|       |
 2975|  17.1k|  return multi_perform(multi, running_handles);
 2976|  17.1k|}
curl_multi_cleanup:
 2979|  13.0k|{
 2980|  13.0k|  struct Curl_multi *multi = m;
 2981|  13.0k|  if(GOOD_MULTI_HANDLE(multi)) {
  ------------------
  |  |   82|  13.0k|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|  13.0k|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|  13.0k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:3): [True: 13.0k, False: 0]
  |  |  |  Branch (82:5): [True: 13.0k, False: 0]
  |  |  |  Branch (82:12): [True: 13.0k, False: 0]
  |  |  ------------------
  |  |   83|  13.0k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (2981:6): [True: 0, False: 0]
  |  Branch (2981:6): [True: 0, False: 0]
  ------------------
 2982|  13.0k|    void *entry;
 2983|  13.0k|    uint32_t mid;
 2984|  13.0k|    if(multi->in_callback)
  ------------------
  |  Branch (2984:8): [True: 0, False: 13.0k]
  ------------------
 2985|      0|      return CURLM_RECURSIVE_API_CALL;
 2986|  13.0k|    if(multi->in_ntfy_callback)
  ------------------
  |  Branch (2986:8): [True: 0, False: 13.0k]
  ------------------
 2987|      0|      return CURLM_RECURSIVE_API_CALL;
 2988|       |
 2989|       |    /* First remove all remaining easy handles,
 2990|       |     * close internal ones. admin handle is special */
 2991|  13.0k|    if(Curl_uint32_tbl_first(&multi->xfers, &mid, &entry)) {
  ------------------
  |  Branch (2991:8): [True: 13.0k, False: 0]
  ------------------
 2992|  13.0k|      do {
 2993|  13.0k|        struct Curl_easy *data = entry;
 2994|  13.0k|        if(!GOOD_EASY_HANDLE(data))
  ------------------
  |  |  141|  13.0k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  135|  13.0k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|  13.0k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (141:5): [True: 13.0k, False: 0]
  |  |  |  Branch (141:12): [True: 13.0k, False: 0]
  |  |  ------------------
  |  |  142|  13.0k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (2994:12): [True: 0, False: 13.0k]
  |  Branch (2994:13): [True: 0, False: 0]
  |  Branch (2994:13): [True: 0, False: 0]
  ------------------
 2995|      0|          return CURLM_BAD_HANDLE;
 2996|       |
 2997|  13.0k|#ifdef DEBUGBUILD
 2998|  13.0k|        if(mid != data->mid) {
  ------------------
  |  Branch (2998:12): [True: 0, False: 13.0k]
  ------------------
 2999|      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]
  |  |  ------------------
  ------------------
 3000|      0|                     "but unexpected data->mid=%u\n", mid, data->mid);
 3001|      0|          DEBUGASSERT(0);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3001:11): [Folded, False: 0]
  |  Branch (3001:11): [Folded, False: 0]
  ------------------
 3002|      0|        }
 3003|  13.0k|#endif
 3004|       |
 3005|  13.0k|        if(data == multi->admin)
  ------------------
  |  Branch (3005:12): [True: 13.0k, False: 0]
  ------------------
 3006|  13.0k|          continue;
 3007|       |
 3008|      0|        if(!data->state.done && data->conn)
  ------------------
  |  Branch (3008:12): [True: 0, False: 0]
  |  Branch (3008:33): [True: 0, False: 0]
  ------------------
 3009|       |          /* if DONE was never called for this handle */
 3010|      0|          (void)multi_done(data, CURLE_OK, TRUE);
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 3011|       |
 3012|      0|        data->multi = NULL; /* clear the association */
 3013|      0|        Curl_uint32_tbl_remove(&multi->xfers, mid);
 3014|      0|        data->mid = UINT32_MAX;
 3015|       |
 3016|       |#ifdef USE_LIBPSL
 3017|       |        if(data->psl == &multi->psl)
 3018|       |          data->psl = NULL;
 3019|       |#endif
 3020|      0|        if(data->state.internal)
  ------------------
  |  Branch (3020:12): [True: 0, False: 0]
  ------------------
 3021|      0|          Curl_close(&data);
 3022|  13.0k|      } while(Curl_uint32_tbl_next(&multi->xfers, mid, &mid, &entry));
  ------------------
  |  Branch (3022:15): [True: 0, False: 13.0k]
  ------------------
 3023|  13.0k|    }
 3024|       |
 3025|  13.0k|#ifdef USE_RESOLV_THREADED
 3026|  13.0k|    Curl_async_thrdd_multi_destroy(multi, !multi->quick_exit);
 3027|  13.0k|#endif
 3028|  13.0k|    Curl_cpool_destroy(&multi->cpool);
 3029|  13.0k|    Curl_cshutdn_destroy(&multi->cshutdn, multi->admin);
 3030|  13.0k|    if(multi->admin) {
  ------------------
  |  Branch (3030:8): [True: 13.0k, False: 0]
  ------------------
 3031|  13.0k|      CURL_TRC_M(multi->admin, "multi_cleanup, closing admin handle, done");
  ------------------
  |  |  148|  13.0k|  do {                                   \
  |  |  149|  13.0k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  13.0k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  13.0k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  26.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 13.0k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 13.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  26.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|  13.0k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  13.0k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  13.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 13.0k]
  |  |  ------------------
  ------------------
 3032|  13.0k|      multi->admin->multi = NULL;
 3033|  13.0k|      Curl_uint32_tbl_remove(&multi->xfers, multi->admin->mid);
 3034|  13.0k|      Curl_close(&multi->admin);
 3035|  13.0k|    }
 3036|       |
 3037|  13.0k|    multi->magic = 0; /* not good anymore */
 3038|       |
 3039|  13.0k|    Curl_multi_ev_cleanup(multi);
 3040|  13.0k|    Curl_hash_destroy(&multi->proto_hash);
 3041|  13.0k|    Curl_dnscache_destroy(&multi->dnscache);
 3042|  13.0k|    Curl_psl_destroy(&multi->psl);
 3043|  13.0k|#ifdef USE_SSL
 3044|  13.0k|    Curl_ssl_scache_destroy(multi->ssl_scache);
 3045|  13.0k|#endif
 3046|       |
 3047|       |#ifdef USE_WINSOCK
 3048|       |    WSACloseEvent(multi->wsa_event);
 3049|       |#endif
 3050|  13.0k|#ifdef ENABLE_WAKEUP
 3051|  13.0k|  Curl_wakeup_destroy(multi->wakeup_pair);
 3052|  13.0k|#endif
 3053|       |
 3054|  13.0k|    multi_xfer_bufs_free(multi);
 3055|  13.0k|    Curl_mntfy_cleanup(multi);
 3056|  13.0k|#ifdef DEBUGBUILD
 3057|  13.0k|    if(Curl_uint32_tbl_count(&multi->xfers)) {
  ------------------
  |  Branch (3057:8): [True: 0, False: 13.0k]
  ------------------
 3058|      0|      multi_xfer_tbl_dump(multi);
 3059|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3059:7): [Folded, False: 0]
  |  Branch (3059:7): [Folded, False: 0]
  ------------------
 3060|      0|    }
 3061|  13.0k|#endif
 3062|  13.0k|    Curl_uint32_bset_destroy(&multi->process);
 3063|  13.0k|    Curl_uint32_bset_destroy(&multi->dirty);
 3064|  13.0k|    Curl_uint32_bset_destroy(&multi->pending);
 3065|  13.0k|    Curl_uint32_bset_destroy(&multi->msgsent);
 3066|  13.0k|    Curl_uint32_tbl_destroy(&multi->xfers);
 3067|  13.0k|    curlx_free(multi);
  ------------------
  |  | 1488|  13.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 3068|       |
 3069|  13.0k|    return CURLM_OK;
 3070|  13.0k|  }
 3071|      0|  return CURLM_BAD_HANDLE;
 3072|  13.0k|}
Curl_multi_will_close:
 3113|  7.41k|{
 3114|  7.41k|  if(data) {
  ------------------
  |  Branch (3114:6): [True: 7.41k, False: 0]
  ------------------
 3115|  7.41k|    struct Curl_multi *multi = data->multi;
 3116|  7.41k|    if(multi) {
  ------------------
  |  Branch (3116:8): [True: 7.41k, False: 0]
  ------------------
 3117|  7.41k|      CURL_TRC_M(data, "Curl_multi_will_close fd=%" FMT_SOCKET_T, s);
  ------------------
  |  |  148|  7.41k|  do {                                   \
  |  |  149|  7.41k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  7.41k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  7.41k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  14.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 7.41k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 7.41k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  14.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|  7.41k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  7.41k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  7.41k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 7.41k]
  |  |  ------------------
  ------------------
 3118|  7.41k|      Curl_multi_ev_socket_done(multi, data, s);
 3119|  7.41k|    }
 3120|  7.41k|  }
 3121|  7.41k|}
Curl_update_timer:
 3598|  44.4k|{
 3599|  44.4k|  struct curltime expire_ts;
 3600|  44.4k|  long timeout_ms;
 3601|  44.4k|  int rc;
 3602|  44.4k|  bool set_value = FALSE;
  ------------------
  |  | 1054|  44.4k|#define FALSE false
  ------------------
 3603|       |
 3604|  44.4k|  if(!multi->timer_cb || multi->dead)
  ------------------
  |  Branch (3604:6): [True: 44.4k, False: 0]
  |  Branch (3604:26): [True: 0, False: 0]
  ------------------
 3605|  44.4k|    return CURLM_OK;
 3606|      0|  multi_timeout(multi, &expire_ts, &timeout_ms);
 3607|       |
 3608|      0|  if(timeout_ms < 0 && multi->last_timeout_ms < 0) {
  ------------------
  |  Branch (3608:6): [True: 0, False: 0]
  |  Branch (3608:24): [True: 0, False: 0]
  ------------------
 3609|       |    /* nothing to do */
 3610|      0|  }
 3611|      0|  else if(timeout_ms < 0) {
  ------------------
  |  Branch (3611:11): [True: 0, False: 0]
  ------------------
 3612|       |    /* there is no timeout now but there was one previously */
 3613|      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]
  |  |  ------------------
  ------------------
 3614|      0|    timeout_ms = -1; /* normalize */
 3615|      0|    set_value = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 3616|      0|  }
 3617|      0|  else if(multi->last_timeout_ms < 0) {
  ------------------
  |  Branch (3617:11): [True: 0, False: 0]
  ------------------
 3618|      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]
  |  |  ------------------
  ------------------
 3619|      0|    set_value = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 3620|      0|  }
 3621|      0|  else if(curlx_ptimediff_us(&multi->last_expire_ts, &expire_ts)) {
  ------------------
  |  Branch (3621:11): [True: 0, False: 0]
  ------------------
 3622|       |    /* We had a timeout before and have one now, the absolute timestamp
 3623|       |     * differs. The relative timeout_ms may be the same, but the starting
 3624|       |     * point differs. Let the application restart its timer. */
 3625|      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]
  |  |  ------------------
  ------------------
 3626|      0|               timeout_ms);
 3627|      0|    set_value = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 3628|      0|  }
 3629|      0|  else {
 3630|       |    /* We have same expire time as previously. Our relative 'timeout_ms'
 3631|       |     * may be different now, but the application has the timer running
 3632|       |     * and we do not to tell it to start this again. */
 3633|      0|  }
 3634|       |
 3635|      0|  if(set_value) {
  ------------------
  |  Branch (3635:6): [True: 0, False: 0]
  ------------------
 3636|      0|    multi->last_expire_ts = expire_ts;
 3637|      0|    multi->last_timeout_ms = timeout_ms;
 3638|      0|    set_in_callback(multi, TRUE);
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 3639|      0|    rc = multi->timer_cb(multi, timeout_ms, multi->timer_userp);
 3640|      0|    set_in_callback(multi, FALSE);
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 3641|      0|    if(rc == -1) {
  ------------------
  |  Branch (3641:8): [True: 0, False: 0]
  ------------------
 3642|      0|      multi->dead = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 3643|      0|      return CURLM_ABORTED_BY_CALLBACK;
 3644|      0|    }
 3645|      0|  }
 3646|      0|  return CURLM_OK;
 3647|      0|}
Curl_expire_ex:
 3713|  10.7k|{
 3714|  10.7k|  struct Curl_multi *multi = data->multi;
 3715|  10.7k|  struct curltime *curr_expire = &data->state.expiretime;
 3716|  10.7k|  struct curltime set;
 3717|       |
 3718|       |  /* this is only interesting while there is still an associated multi struct
 3719|       |     remaining! */
 3720|  10.7k|  if(!multi)
  ------------------
  |  Branch (3720:6): [True: 0, False: 10.7k]
  ------------------
 3721|      0|    return;
 3722|       |
 3723|  10.7k|  DEBUGASSERT(id < EXPIRE_LAST);
  ------------------
  |  | 1077|  10.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3723:3): [True: 0, False: 10.7k]
  |  Branch (3723:3): [True: 10.7k, False: 0]
  ------------------
 3724|       |
 3725|  10.7k|  set = *Curl_pgrs_now(data);
 3726|  10.7k|  set.tv_sec += (time_t)(milli / 1000); /* may be a 64 to 32-bit conversion */
 3727|  10.7k|  set.tv_usec += (int)(milli % 1000) * 1000;
 3728|       |
 3729|  10.7k|  if(set.tv_usec >= 1000000) {
  ------------------
  |  Branch (3729:6): [True: 2.06k, False: 8.71k]
  ------------------
 3730|  2.06k|    set.tv_sec++;
 3731|  2.06k|    set.tv_usec -= 1000000;
 3732|  2.06k|  }
 3733|       |
 3734|       |  /* Remove any timer with the same id */
 3735|  10.7k|  multi_deltimeout(data, id);
 3736|       |
 3737|       |  /* Add it to the timer list. It must stay in the list until it has expired
 3738|       |     in case we need to recompute the minimum timer later. */
 3739|  10.7k|  multi_addtimeout(data, &set, id);
 3740|       |
 3741|  10.7k|  if(curr_expire->tv_sec || curr_expire->tv_usec) {
  ------------------
  |  Branch (3741:6): [True: 1.01k, False: 9.76k]
  |  Branch (3741:29): [True: 0, False: 9.76k]
  ------------------
 3742|       |    /* This means that the struct is added as a node in the splay tree.
 3743|       |       Compare if the new time is earlier, and only remove-old/add-new if it
 3744|       |       is. */
 3745|  1.01k|    timediff_t diff = curlx_ptimediff_ms(&set, curr_expire);
 3746|  1.01k|    int rc;
 3747|       |
 3748|  1.01k|    if(diff > 0) {
  ------------------
  |  Branch (3748:8): [True: 552, False: 466]
  ------------------
 3749|       |      /* The current splay tree entry is sooner than this new expiry time.
 3750|       |         We do not need to update our splay tree entry. */
 3751|    552|      return;
 3752|    552|    }
 3753|       |
 3754|       |    /* Since this is an updated time, we must remove the previous entry from
 3755|       |       the splay tree first and then re-add the new value */
 3756|    466|    rc = Curl_splayremove(multi->timetree, &data->state.timenode,
 3757|    466|                          &multi->timetree);
 3758|    466|    if(rc)
  ------------------
  |  Branch (3758:8): [True: 0, False: 466]
  ------------------
 3759|      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]
  |  |  ------------------
  ------------------
 3760|    466|  }
 3761|       |
 3762|       |  /* Indicate that we are in the splay tree and insert the new timer expiry
 3763|       |     value since it is our local minimum. */
 3764|  10.2k|  *curr_expire = set;
 3765|  10.2k|  Curl_splayset(&data->state.timenode, data);
 3766|  10.2k|  multi->timetree = Curl_splayinsert(curr_expire, multi->timetree,
 3767|  10.2k|                                     &data->state.timenode);
 3768|  10.2k|}
Curl_expire:
 3782|  10.7k|{
 3783|  10.7k|  Curl_expire_ex(data, milli, id);
 3784|  10.7k|}
Curl_expire_done:
 3793|  7.32k|{
 3794|       |  /* remove the timer, if there */
 3795|  7.32k|  multi_deltimeout(data, id);
 3796|  7.32k|  CURL_TRC_TIMER(data, id, "cleared");
  ------------------
  |  |  173|  7.32k|  do {                                        \
  |  |  174|  7.32k|    if(CURL_TRC_TIMER_is_verbose(data))       \
  |  |  ------------------
  |  |  |  |  139|  7.32k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_timer)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  7.32k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  14.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 7.32k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 7.32k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  14.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|  7.32k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  175|  7.32k|      Curl_trc_timer(data, tid, __VA_ARGS__); \
  |  |  176|  7.32k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (176:11): [Folded, False: 7.32k]
  |  |  ------------------
  ------------------
 3797|  7.32k|}
Curl_expire_clear:
 3805|  54.5k|{
 3806|  54.5k|  struct Curl_multi *multi = data->multi;
 3807|  54.5k|  struct curltime *nowp = &data->state.expiretime;
 3808|       |
 3809|       |  /* this is only interesting while there is still an associated multi struct
 3810|       |     remaining! */
 3811|  54.5k|  if(!multi)
  ------------------
  |  Branch (3811:6): [True: 28.3k, False: 26.1k]
  ------------------
 3812|  28.3k|    return;
 3813|       |
 3814|  26.1k|  if(nowp->tv_sec || nowp->tv_usec) {
  ------------------
  |  Branch (3814:6): [True: 9.76k, False: 16.4k]
  |  Branch (3814:22): [True: 0, False: 16.4k]
  ------------------
 3815|       |    /* Since this is an cleared time, we must remove the previous entry from
 3816|       |       the splay tree */
 3817|  9.76k|    struct Curl_llist *list = &data->state.timeoutlist;
 3818|  9.76k|    int rc;
 3819|       |
 3820|  9.76k|    rc = Curl_splayremove(multi->timetree, &data->state.timenode,
 3821|  9.76k|                          &multi->timetree);
 3822|  9.76k|    if(rc)
  ------------------
  |  Branch (3822:8): [True: 0, False: 9.76k]
  ------------------
 3823|      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]
  |  |  ------------------
  ------------------
 3824|       |
 3825|       |    /* clear the timeout list too */
 3826|  9.76k|    Curl_llist_destroy(list, NULL);
 3827|       |
 3828|  9.76k|    if(data->id >= 0)
  ------------------
  |  Branch (3828:8): [True: 9.76k, False: 0]
  ------------------
 3829|  9.76k|      CURL_TRC_M(data, "[TIMEOUT] all cleared");
  ------------------
  |  |  148|  9.76k|  do {                                   \
  |  |  149|  9.76k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  9.76k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  9.76k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  19.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 9.76k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 9.76k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  19.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|  9.76k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  9.76k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  9.76k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 9.76k]
  |  |  ------------------
  ------------------
 3830|  9.76k|    nowp->tv_sec = 0;
 3831|  9.76k|    nowp->tv_usec = 0;
 3832|  9.76k|  }
 3833|  26.1k|}
Curl_set_in_callback:
 3910|  41.8k|{
 3911|  41.8k|  if(data && data->multi)
  ------------------
  |  Branch (3911:6): [True: 41.8k, False: 0]
  |  Branch (3911:14): [True: 41.8k, False: 0]
  ------------------
 3912|  41.8k|    data->multi->in_callback = value;
 3913|  41.8k|}
Curl_multi_xfer_buf_borrow:
 3991|  1.33k|{
 3992|  1.33k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  1.33k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3992:3): [True: 0, False: 1.33k]
  |  Branch (3992:3): [True: 1.33k, False: 0]
  ------------------
 3993|  1.33k|  DEBUGASSERT(data->multi);
  ------------------
  |  | 1077|  1.33k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3993:3): [True: 0, False: 1.33k]
  |  Branch (3993:3): [True: 1.33k, False: 0]
  ------------------
 3994|  1.33k|  *pbuf = NULL;
 3995|  1.33k|  *pbuflen = 0;
 3996|  1.33k|  if(!data->multi) {
  ------------------
  |  Branch (3996:6): [True: 0, False: 1.33k]
  ------------------
 3997|      0|    failf(data, "transfer has no multi handle");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3998|      0|    return CURLE_FAILED_INIT;
 3999|      0|  }
 4000|  1.33k|  if(!data->set.buffer_size) {
  ------------------
  |  Branch (4000:6): [True: 0, False: 1.33k]
  ------------------
 4001|      0|    failf(data, "transfer buffer size is 0");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4002|      0|    return CURLE_FAILED_INIT;
 4003|      0|  }
 4004|  1.33k|  if(data->multi->xfer_buf_borrowed) {
  ------------------
  |  Branch (4004:6): [True: 0, False: 1.33k]
  ------------------
 4005|      0|    failf(data, "attempt to borrow xfer_buf when already borrowed");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4006|      0|    return CURLE_AGAIN;
 4007|      0|  }
 4008|       |
 4009|  1.33k|  if(data->multi->xfer_buf &&
  ------------------
  |  Branch (4009:6): [True: 434, False: 904]
  ------------------
 4010|    434|     data->set.buffer_size > data->multi->xfer_buf_len) {
  ------------------
  |  Branch (4010:6): [True: 0, False: 434]
  ------------------
 4011|       |    /* not large enough, get a new one */
 4012|      0|    curlx_safefree(data->multi->xfer_buf);
  ------------------
  |  | 1332|      0|  do {                      \
  |  | 1333|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|      0|    (ptr) = NULL;           \
  |  | 1335|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4013|      0|    data->multi->xfer_buf_len = 0;
 4014|      0|  }
 4015|       |
 4016|  1.33k|  if(!data->multi->xfer_buf) {
  ------------------
  |  Branch (4016:6): [True: 904, False: 434]
  ------------------
 4017|    904|    data->multi->xfer_buf = curlx_malloc(curlx_uitouz(data->set.buffer_size));
  ------------------
  |  | 1483|    904|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
 4018|    904|    if(!data->multi->xfer_buf) {
  ------------------
  |  Branch (4018:8): [True: 0, False: 904]
  ------------------
 4019|      0|      failf(data, "could not allocate xfer_buf of %u bytes",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4020|      0|            data->set.buffer_size);
 4021|      0|      return CURLE_OUT_OF_MEMORY;
 4022|      0|    }
 4023|    904|    data->multi->xfer_buf_len = data->set.buffer_size;
 4024|    904|  }
 4025|       |
 4026|  1.33k|  data->multi->xfer_buf_borrowed = TRUE;
  ------------------
  |  | 1051|  1.33k|#define TRUE true
  ------------------
 4027|  1.33k|  *pbuf = data->multi->xfer_buf;
 4028|  1.33k|  *pbuflen = data->multi->xfer_buf_len;
 4029|  1.33k|  return CURLE_OK;
 4030|  1.33k|}
Curl_multi_xfer_buf_release:
 4033|  1.33k|{
 4034|  1.33k|  (void)buf;
 4035|  1.33k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  1.33k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4035:3): [True: 0, False: 1.33k]
  |  Branch (4035:3): [True: 1.33k, False: 0]
  ------------------
 4036|  1.33k|  DEBUGASSERT(data->multi);
  ------------------
  |  | 1077|  1.33k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4036:3): [True: 0, False: 1.33k]
  |  Branch (4036:3): [True: 1.33k, False: 0]
  ------------------
 4037|  1.33k|  DEBUGASSERT(!buf || data->multi->xfer_buf == buf);
  ------------------
  |  | 1077|  1.33k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4037:3): [True: 1.33k, False: 0]
  |  Branch (4037:3): [True: 0, False: 0]
  |  Branch (4037:3): [True: 0, False: 1.33k]
  |  Branch (4037:3): [True: 1.33k, False: 0]
  ------------------
 4038|  1.33k|  data->multi->xfer_buf_borrowed = FALSE;
  ------------------
  |  | 1054|  1.33k|#define FALSE false
  ------------------
 4039|  1.33k|}
Curl_multi_get_easy:
 4160|  46.6k|{
 4161|  46.6k|  struct Curl_easy *data = Curl_uint32_tbl_get(&multi->xfers, mid);
 4162|  46.6k|  if(GOOD_EASY_HANDLE(data))
  ------------------
  |  |  141|  46.6k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  135|  46.6k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|  46.6k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (141:3): [True: 46.6k, False: 0]
  |  |  |  Branch (141:5): [True: 46.6k, False: 0]
  |  |  |  Branch (141:12): [True: 46.6k, False: 0]
  |  |  ------------------
  |  |  142|  46.6k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (4162:6): [True: 0, False: 0]
  |  Branch (4162:6): [True: 0, False: 0]
  ------------------
 4163|  46.6k|    return data;
 4164|      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]
  |  |  ------------------
  ------------------
 4165|      0|             mid);
 4166|      0|  Curl_uint32_tbl_remove(&multi->xfers, mid);
 4167|       |  return NULL;
 4168|  46.6k|}
Curl_multi_xfers_running:
 4171|  17.1k|{
 4172|  17.1k|  DEBUGASSERT(multi);
  ------------------
  |  | 1077|  17.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4172:3): [True: 0, False: 17.1k]
  |  Branch (4172:3): [True: 17.1k, False: 0]
  ------------------
 4173|  17.1k|  if(!multi)
  ------------------
  |  Branch (4173:6): [True: 0, False: 17.1k]
  ------------------
 4174|      0|    return 0;
 4175|  17.1k|  return multi->xfers_alive;
 4176|  17.1k|}
Curl_multi_mark_dirty:
 4179|  14.2k|{
 4180|  14.2k|  if(data->multi && data->mid != UINT32_MAX)
  ------------------
  |  Branch (4180:6): [True: 14.2k, False: 0]
  |  Branch (4180:21): [True: 14.2k, False: 0]
  ------------------
 4181|  14.2k|    Curl_uint32_bset_add(&data->multi->dirty, data->mid);
 4182|  14.2k|}
Curl_multi_clear_dirty:
 4185|     65|{
 4186|     65|  if(data->multi && data->mid != UINT32_MAX)
  ------------------
  |  Branch (4186:6): [True: 65, False: 0]
  |  Branch (4186:21): [True: 65, False: 0]
  ------------------
 4187|     65|    Curl_uint32_bset_remove(&data->multi->dirty, data->mid);
 4188|     65|}
multi.c:multi_xfers_add:
  409|  13.6k|{
  410|  13.6k|  uint32_t capacity = Curl_uint32_tbl_capacity(&multi->xfers);
  411|  13.6k|  uint32_t new_size = 0;
  412|       |  /* Prepare to make this into a CURLMOPT_MAX_TRANSFERS, because some
  413|       |   * applications may want to prevent a run-away of their memory use. */
  414|       |  /* UINT_MAX is our "invalid" id, do not let the table grow up to that. */
  415|  13.6k|  const uint32_t max_capacity = UINT_MAX - 1;
  416|       |
  417|  13.6k|  if(capacity < max_capacity) {
  ------------------
  |  Branch (417:6): [True: 13.6k, False: 0]
  ------------------
  418|       |    /* We want `multi->xfers` to have "sufficient" free rows, so that we do
  419|       |     * not have to reuse the `mid` from a removed easy right away.
  420|       |     * Since uint_tbl and uint_bset are memory efficient,
  421|       |     * regard less than 25% free as insufficient.
  422|       |     * (for low capacities, e.g. multi_easy, 4 or less). */
  423|  13.6k|    uint32_t used = Curl_uint32_tbl_count(&multi->xfers);
  424|  13.6k|    uint32_t unused = capacity - used;
  425|  13.6k|    uint32_t min_unused = CURLMAX(capacity >> 2, 4);
  ------------------
  |  | 1291|  13.6k|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1291:24): [True: 13.6k, False: 0]
  |  |  ------------------
  ------------------
  426|  13.6k|    if(unused <= min_unused) {
  ------------------
  |  Branch (426:8): [True: 0, False: 13.6k]
  ------------------
  427|       |      /* Make sure the uint arithmetic here works on the corner
  428|       |       * cases where we are close to max_capacity or UINT_MAX */
  429|      0|      if((min_unused >= max_capacity) ||
  ------------------
  |  Branch (429:10): [True: 0, False: 0]
  ------------------
  430|      0|         ((max_capacity - min_unused) <= capacity) ||
  ------------------
  |  Branch (430:10): [True: 0, False: 0]
  ------------------
  431|      0|         ((UINT_MAX - min_unused - 63) <= capacity)) {
  ------------------
  |  Branch (431:10): [True: 0, False: 0]
  ------------------
  432|      0|        new_size = max_capacity; /* can not be larger than this */
  433|      0|      }
  434|      0|      else {
  435|       |        /* make it a 64 multiple, since our bitsets grow by that and
  436|       |         * small (easy_multi) grows to at least 64 on first resize. */
  437|      0|        new_size = (((used + min_unused) + 63) / 64) * 64;
  438|      0|      }
  439|      0|    }
  440|  13.6k|  }
  441|       |
  442|  13.6k|  if(new_size > capacity) {
  ------------------
  |  Branch (442:6): [True: 0, False: 13.6k]
  ------------------
  443|       |    /* Grow the bitsets first. Should one fail, we do not need
  444|       |     * to downsize the already resized ones. The sets continue
  445|       |     * to work properly when larger than the table, but not
  446|       |     * the other way around. */
  447|      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]
  |  |  ------------------
  ------------------
  448|      0|    if(Curl_uint32_bset_resize(&multi->process, new_size) ||
  ------------------
  |  Branch (448:8): [True: 0, False: 0]
  ------------------
  449|      0|       Curl_uint32_bset_resize(&multi->dirty, new_size) ||
  ------------------
  |  Branch (449:8): [True: 0, False: 0]
  ------------------
  450|      0|       Curl_uint32_bset_resize(&multi->pending, new_size) ||
  ------------------
  |  Branch (450:8): [True: 0, False: 0]
  ------------------
  451|      0|       Curl_uint32_bset_resize(&multi->msgsent, new_size) ||
  ------------------
  |  Branch (451:8): [True: 0, False: 0]
  ------------------
  452|      0|       Curl_uint32_tbl_resize(&multi->xfers, new_size))
  ------------------
  |  Branch (452:8): [True: 0, False: 0]
  ------------------
  453|      0|      return CURLM_OUT_OF_MEMORY;
  454|      0|  }
  455|       |
  456|       |  /* Insert the easy into the table now */
  457|  13.6k|  if(!Curl_uint32_tbl_add(&multi->xfers, data, &data->mid)) {
  ------------------
  |  Branch (457:6): [True: 0, False: 13.6k]
  ------------------
  458|       |    /* MUST only happen when table is full */
  459|      0|    DEBUGASSERT(Curl_uint32_tbl_capacity(&multi->xfers) <=
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (459:5): [True: 0, False: 0]
  |  Branch (459:5): [True: 0, False: 0]
  ------------------
  460|      0|                Curl_uint32_tbl_count(&multi->xfers));
  461|      0|    return CURLM_OUT_OF_MEMORY;
  462|      0|  }
  463|  13.6k|  return CURLM_OK;
  464|  13.6k|}
multi.c:mstate:
  171|  76.5k|{
  172|  76.5k|  CURLMstate oldstate = data->mstate;
  173|  76.5k|  static const mstate_enter_func state_enter[MSTATE_LAST] = {
  174|  76.5k|    NULL,                      /* INIT */
  175|  76.5k|    NULL,                      /* PENDING */
  176|  76.5k|    NULL,                      /* SETUP */
  177|  76.5k|    mstate_enter_connect,      /* CONNECT */
  178|  76.5k|    NULL,                      /* CONNECTING */
  179|  76.5k|    NULL,                      /* PROTOCONNECT */
  180|  76.5k|    NULL,                      /* PROTOCONNECTING */
  181|  76.5k|    NULL,                      /* DO */
  182|  76.5k|    NULL,                      /* DOING */
  183|  76.5k|    NULL,                      /* DOING_MORE */
  184|  76.5k|    mstate_enter_did,          /* DID */
  185|  76.5k|    NULL,                      /* PERFORMING */
  186|  76.5k|    NULL,                      /* RATELIMITING */
  187|  76.5k|    mstate_enter_done,         /* DONE */
  188|  76.5k|    mstate_enter_completed,    /* COMPLETED */
  189|       |    NULL                       /* MSGSENT */
  190|  76.5k|  };
  191|       |
  192|  76.5k|  if(oldstate == state)
  ------------------
  |  Branch (192:6): [True: 13.6k, False: 62.8k]
  ------------------
  193|       |    /* do not bother when the new state is the same as the old state */
  194|  13.6k|    return;
  195|       |
  196|  62.8k|#ifdef DEBUGBUILD
  197|  62.8k|  NOVERBOSE((void)lineno);
  ------------------
  |  | 1624|  62.8k|#define NOVERBOSE(x) Curl_nop_stmt
  |  |  ------------------
  |  |  |  | 1185|  62.8k|#define Curl_nop_stmt do {} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1185:35): [Folded, False: 62.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  198|  62.8k|  CURL_TRC_M(data, "-> [%s] (line %d)", CURL_MSTATE_NAME(state), lineno);
  ------------------
  |  |  148|  62.8k|  do {                                   \
  |  |  149|  62.8k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  62.8k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  62.8k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|   125k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 62.8k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 62.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|   125k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((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|  62.8k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  62.8k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  62.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 62.8k]
  |  |  ------------------
  ------------------
  199|       |#else
  200|       |  CURL_TRC_M(data, "-> [%s]", CURL_MSTATE_NAME(state));
  201|       |#endif
  202|       |
  203|       |  /* really switching state */
  204|  62.8k|  data->mstate = state;
  205|  62.8k|  if(state_enter[state])
  ------------------
  |  Branch (205:6): [True: 23.4k, False: 39.4k]
  ------------------
  206|  23.4k|    state_enter[state](data, oldstate);
  207|  62.8k|}
multi.c:mstate_enter_connect:
  115|  9.94k|{
  116|  9.94k|  (void)from_state;
  117|  9.94k|  Curl_init_CONNECT(data);
  118|  9.94k|}
multi.c:mstate_enter_did:
  122|    906|{
  123|    906|  (void)from_state;
  124|    906|  data->req.chunk = FALSE;
  ------------------
  |  | 1054|    906|#define FALSE false
  ------------------
  125|    906|  Curl_pgrsTime(data, TIMER_PRETRANSFER);
  126|    906|  if(!CURL_REQ_WANT_SEND(data))
  ------------------
  |  |   39|    906|#define CURL_REQ_WANT_SEND(d)  ((d)->req.io_flags & REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|    906|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  ------------------
  |  Branch (126:6): [True: 906, False: 0]
  ------------------
  127|    906|    Curl_pgrsTime(data, TIMER_POSTRANSFER);
  128|    906|}
multi.c:mstate_enter_done:
  132|     61|{
  133|     61|  (void)from_state;
  134|     61|  CURLM_NTFY(data, CURLMNOTIFY_EASY_DONE);
  ------------------
  |  |   51|     61|  do {                                                \
  |  |   52|     61|    if((d) && (d)->multi && (d)->multi->ntfy.ntfy_cb) \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 61, False: 0]
  |  |  |  Branch (52:15): [True: 61, False: 0]
  |  |  |  Branch (52:29): [True: 0, False: 61]
  |  |  ------------------
  |  |   53|     61|      Curl_mntfy_add((d), (t));                       \
  |  |   54|     61|  } while(0)
  |  |  ------------------
  |  |  |  Branch (54:11): [Folded, False: 61]
  |  |  ------------------
  ------------------
  135|     61|}
multi.c:mstate_enter_completed:
  139|  12.5k|{
  140|       |  /* we sometimes directly jump to COMPLETED, trigger things
  141|       |   * we then missed. */
  142|  12.5k|  if(from_state < MSTATE_DID) {
  ------------------
  |  Branch (142:6): [True: 11.8k, False: 685]
  ------------------
  143|  11.8k|    Curl_pgrsTime(data, TIMER_PRETRANSFER);
  144|  11.8k|    Curl_pgrsTime(data, TIMER_POSTRANSFER);
  145|  11.8k|    Curl_pgrsTime(data, TIMER_STARTTRANSFER);
  146|  11.8k|  }
  147|  12.5k|  Curl_pgrsCompleted(data);
  148|  12.5k|  if(from_state < MSTATE_DONE)
  ------------------
  |  Branch (148:6): [True: 12.4k, False: 61]
  ------------------
  149|  12.4k|    CURLM_NTFY(data, CURLMNOTIFY_EASY_DONE);
  ------------------
  |  |   51|  12.4k|  do {                                                \
  |  |   52|  12.4k|    if((d) && (d)->multi && (d)->multi->ntfy.ntfy_cb) \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 12.4k, False: 0]
  |  |  |  Branch (52:15): [True: 12.4k, False: 0]
  |  |  |  Branch (52:29): [True: 0, False: 12.4k]
  |  |  ------------------
  |  |   53|  12.4k|      Curl_mntfy_add((d), (t));                       \
  |  |   54|  12.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (54:11): [Folded, False: 12.4k]
  |  |  ------------------
  ------------------
  150|       |  /* changing to COMPLETED means it is in process and needs to go */
  151|  12.5k|  DEBUGASSERT(Curl_uint32_bset_contains(&data->multi->process, data->mid));
  ------------------
  |  | 1077|  12.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (151:3): [True: 0, False: 12.5k]
  |  Branch (151:3): [True: 12.5k, False: 0]
  ------------------
  152|  12.5k|  Curl_uint32_bset_remove(&data->multi->process, data->mid);
  153|  12.5k|  Curl_uint32_bset_remove(&data->multi->pending, data->mid); /* to be sure */
  154|       |
  155|  12.5k|  if(Curl_uint32_bset_empty(&data->multi->process)) {
  ------------------
  |  Branch (155:6): [True: 0, False: 12.5k]
  ------------------
  156|       |    /* free the transfer buffer when we have no more active transfers */
  157|      0|    multi_xfer_bufs_free(data->multi);
  158|      0|  }
  159|       |  /* Important: reset the conn pointer so that we do not point to memory
  160|       |     that could be freed anytime */
  161|  12.5k|  Curl_detach_connection(data);
  162|  12.5k|  Curl_expire_clear(data); /* stop all timers */
  163|  12.5k|}
multi.c:multi_warn_debug:
  379|  48.7k|{
  380|  48.7k|  if(!multi->warned) {
  ------------------
  |  Branch (380:6): [True: 13.0k, False: 35.7k]
  ------------------
  381|  13.0k|    infof(data, "!!! WARNING !!!");
  ------------------
  |  |  143|  13.0k|  do {                               \
  |  |  144|  13.0k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  13.0k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 13.0k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 13.0k]
  |  |  |  |  ------------------
  |  |  |  |  320|  13.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|  13.0k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  13.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 13.0k]
  |  |  ------------------
  ------------------
  382|  13.0k|    infof(data, "This is a debug build of libcurl, "
  ------------------
  |  |  143|  13.0k|  do {                               \
  |  |  144|  13.0k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  13.0k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 13.0k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 13.0k]
  |  |  |  |  ------------------
  |  |  |  |  320|  13.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|  13.0k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  13.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 13.0k]
  |  |  ------------------
  ------------------
  383|  13.0k|                "do not use in production.");
  384|       |    multi->warned = TRUE;
  ------------------
  |  | 1051|  13.0k|#define TRUE true
  ------------------
  385|  13.0k|  }
  386|  48.7k|}
multi.c:multi_done:
  698|  7.93k|{
  699|  7.93k|  CURLcode result;
  700|  7.93k|  struct connectdata *conn = data->conn;
  701|       |
  702|  7.93k|  CURL_TRC_M(data, "multi_done: status: %d prem: %d done: %d",
  ------------------
  |  |  148|  7.93k|  do {                                   \
  |  |  149|  7.93k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  7.93k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  7.93k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  15.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 7.93k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 7.93k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  15.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|  7.93k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  7.93k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  7.93k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 7.93k]
  |  |  ------------------
  ------------------
  703|  7.93k|             (int)status, (int)premature, data->state.done);
  704|       |
  705|  7.93k|  if(data->state.done)
  ------------------
  |  Branch (705:6): [True: 0, False: 7.93k]
  ------------------
  706|       |    /* Stop if multi_done() has already been called */
  707|      0|    return CURLE_OK;
  708|       |
  709|       |  /* Shut down any ongoing async resolver operation. */
  710|  7.93k|  Curl_resolv_shutdown_all(data);
  711|       |
  712|       |  /* Cleanup possible redirect junk */
  713|  7.93k|  curlx_safefree(data->req.newurl);
  ------------------
  |  | 1332|  7.93k|  do {                      \
  |  | 1333|  7.93k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  7.93k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.93k|    (ptr) = NULL;           \
  |  | 1335|  7.93k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.93k]
  |  |  ------------------
  ------------------
  714|  7.93k|  curlx_safefree(data->req.location);
  ------------------
  |  | 1332|  7.93k|  do {                      \
  |  | 1333|  7.93k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  7.93k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.93k|    (ptr) = NULL;           \
  |  | 1335|  7.93k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.93k]
  |  |  ------------------
  ------------------
  715|       |
  716|  7.93k|  switch(status) {
  717|      0|  case CURLE_ABORTED_BY_CALLBACK:
  ------------------
  |  Branch (717:3): [True: 0, False: 7.93k]
  ------------------
  718|      0|  case CURLE_READ_ERROR:
  ------------------
  |  Branch (718:3): [True: 0, False: 7.93k]
  ------------------
  719|      0|  case CURLE_WRITE_ERROR:
  ------------------
  |  Branch (719:3): [True: 0, False: 7.93k]
  ------------------
  720|       |    /* When we are aborted due to a callback return code it has to be counted
  721|       |       as premature as there is trouble ahead if we do not. We have many
  722|       |       callbacks and protocols work differently, we could potentially do this
  723|       |       more fine-grained in the future. */
  724|      0|    premature = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  725|      0|    FALLTHROUGH();
  ------------------
  |  |  817|      0|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  726|  7.93k|  default:
  ------------------
  |  Branch (726:3): [True: 7.93k, False: 0]
  ------------------
  727|  7.93k|    break;
  728|  7.93k|  }
  729|       |
  730|       |  /* this calls the protocol-specific function pointer previously set */
  731|  7.93k|  if(conn && conn->scheme->run->done && (data->mstate >= MSTATE_PROTOCONNECT))
  ------------------
  |  Branch (731:6): [True: 7.93k, False: 0]
  |  Branch (731:14): [True: 7.93k, False: 0]
  |  Branch (731:41): [True: 3.40k, False: 4.52k]
  ------------------
  732|  3.40k|    result = conn->scheme->run->done(data, status, premature);
  733|  4.52k|  else
  734|  4.52k|    result = status;
  735|       |
  736|  7.93k|  if(data->mstate > MSTATE_CONNECTING &&
  ------------------
  |  Branch (736:6): [True: 3.40k, False: 4.52k]
  ------------------
  737|  3.40k|     (result != CURLE_ABORTED_BY_CALLBACK)) {
  ------------------
  |  Branch (737:6): [True: 3.40k, False: 0]
  ------------------
  738|       |    /* avoid this if
  739|       |     * - the transfer has not connected
  740|       |     * - we already aborted by callback to avoid this calling another callback
  741|       |     */
  742|  3.40k|    int rc = Curl_pgrsDone(data);
  743|  3.40k|    if(!result && rc)
  ------------------
  |  Branch (743:8): [True: 3.40k, False: 0]
  |  Branch (743:19): [True: 0, False: 3.40k]
  ------------------
  744|      0|      result = CURLE_ABORTED_BY_CALLBACK;
  745|  3.40k|  }
  746|       |
  747|       |  /* Make sure that transfer client writes are really done now. */
  748|  7.93k|  result = Curl_1st_fatal(result, Curl_xfer_write_done(data, premature));
  749|       |
  750|       |  /* Inform connection filters that this transfer is done */
  751|  7.93k|  if(conn)
  ------------------
  |  Branch (751:6): [True: 7.93k, False: 0]
  ------------------
  752|  7.93k|    Curl_conn_ev_data_done(data, premature);
  753|       |
  754|  7.93k|  process_pending_handles(data->multi); /* connection / multiplex */
  755|       |
  756|  7.93k|  if(!result)
  ------------------
  |  Branch (756:6): [True: 3.84k, False: 4.08k]
  ------------------
  757|  3.84k|    result = Curl_req_done(&data->req, data, premature);
  758|       |
  759|  7.93k|  if(conn) {
  ------------------
  |  Branch (759:6): [True: 7.93k, False: 0]
  ------------------
  760|       |    /* Under the potential connection pool's share lock, decide what to
  761|       |     * do with the transfer's connection. */
  762|  7.93k|    struct multi_done_ctx mdctx;
  763|       |
  764|  7.93k|    memset(&mdctx, 0, sizeof(mdctx));
  765|  7.93k|    mdctx.premature = premature;
  766|  7.93k|    Curl_cpool_do_locked(data, data->conn, multi_done_locked, &mdctx);
  767|  7.93k|  }
  768|       |
  769|       |  /* flush the netrc cache */
  770|  7.93k|  Curl_netrc_cleanup(&data->state.netrc);
  771|  7.93k|  return result;
  772|  7.93k|}
multi.c:multi_done_locked:
  645|  7.93k|{
  646|  7.93k|  struct multi_done_ctx *mdctx = userdata;
  647|       |
  648|  7.93k|  Curl_detach_connection(data);
  649|       |
  650|  7.93k|  CURL_TRC_M(data, "multi_done_locked, in use=%u", conn->attached_xfers);
  ------------------
  |  |  148|  7.93k|  do {                                   \
  |  |  149|  7.93k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  7.93k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  7.93k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  15.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 7.93k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 7.93k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  15.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|  7.93k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  7.93k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  7.93k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 7.93k]
  |  |  ------------------
  ------------------
  651|  7.93k|  if(CONN_INUSE(conn)) {
  ------------------
  |  |  284|  7.93k|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  |  |  ------------------
  |  |  |  Branch (284:23): [True: 0, False: 7.93k]
  |  |  ------------------
  ------------------
  652|       |    /* Stop if still used. */
  653|      0|    CURL_TRC_M(data, "Connection still in use %u, no more multi_done now!",
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  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]
  |  |  ------------------
  ------------------
  654|      0|               conn->attached_xfers);
  655|      0|    return;
  656|      0|  }
  657|       |
  658|  7.93k|  data->state.done = TRUE; /* called now! */
  ------------------
  |  | 1051|  7.93k|#define TRUE true
  ------------------
  659|  7.93k|  data->state.recent_conn_id = conn->connection_id;
  660|       |
  661|  7.93k|  Curl_dnscache_prune(data);
  662|       |
  663|  7.93k|  if(multi_conn_should_close(conn, data, (bool)mdctx->premature)) {
  ------------------
  |  Branch (663:6): [True: 7.93k, False: 2]
  ------------------
  664|  7.93k|    CURL_TRC_M(data, "multi_done, terminating conn #%" FMT_OFF_T " to %s, "
  ------------------
  |  |  148|  7.93k|  do {                                   \
  |  |  149|  7.93k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  7.93k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  7.93k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  15.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 7.93k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 7.93k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  15.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|  7.93k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  7.93k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  7.93k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 7.93k]
  |  |  ------------------
  ------------------
  665|  7.93k|               "forbid=%d, close=%d, premature=%d, conn_multiplex=%d",
  666|  7.93k|               conn->connection_id, conn->destination,
  667|  7.93k|               data->set.reuse_forbid, conn->bits.close, mdctx->premature,
  668|  7.93k|               Curl_conn_is_multiplex(conn, FIRSTSOCKET));
  669|  7.93k|    connclose(conn, "disconnecting");
  ------------------
  |  |   97|  7.93k|#define connclose(x, y)   Curl_conncontrol(x, CONNCTRL_CONNECTION, y)
  |  |  ------------------
  |  |  |  |   85|  7.93k|#define CONNCTRL_CONNECTION 1
  |  |  ------------------
  ------------------
  670|  7.93k|    Curl_conn_terminate(data, conn, (bool)mdctx->premature);
  671|  7.93k|  }
  672|      2|  else if(!Curl_conn_get_max_concurrent(data, conn, FIRSTSOCKET)) {
  ------------------
  |  |  245|      2|#define FIRSTSOCKET     0
  ------------------
  |  Branch (672:11): [True: 0, False: 2]
  ------------------
  673|      0|    CURL_TRC_M(data, "multi_done, conn #%" FMT_OFF_T " to %s was shutdown"
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  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]
  |  |  ------------------
  ------------------
  674|      0|               " by server, not reusing", conn->connection_id,
  675|      0|               conn->destination);
  676|      0|    connclose(conn, "server shutdown");
  ------------------
  |  |   97|      0|#define connclose(x, y)   Curl_conncontrol(x, CONNCTRL_CONNECTION, y)
  |  |  ------------------
  |  |  |  |   85|      0|#define CONNCTRL_CONNECTION 1
  |  |  ------------------
  ------------------
  677|      0|    Curl_conn_terminate(data, conn, (bool)mdctx->premature);
  678|      0|  }
  679|      2|  else {
  680|       |    /* the connection is no longer in use by any transfer */
  681|      2|    if(Curl_cpool_conn_now_idle(data, conn)) {
  ------------------
  |  Branch (681:8): [True: 2, False: 0]
  ------------------
  682|       |      /* connection kept in the cpool */
  683|      2|      data->state.lastconnect_id = conn->connection_id;
  684|      2|      infof(data, "Connection #%" FMT_OFF_T " to host %s left intact",
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  685|      2|            conn->connection_id, conn->destination);
  686|      2|    }
  687|      0|    else {
  688|       |      /* connection was removed from the cpool and destroyed. */
  689|      0|      data->state.lastconnect_id = -1;
  690|      0|    }
  691|      2|  }
  692|  7.93k|}
multi.c:multi_conn_should_close:
  604|  7.93k|{
  605|       |  /* if conn->bits.close is TRUE, it means that the connection should be
  606|       |     closed in spite of everything else. */
  607|  7.93k|  if(conn->bits.close)
  ------------------
  |  Branch (607:6): [True: 846, False: 7.08k]
  ------------------
  608|    846|    return TRUE;
  ------------------
  |  | 1051|    846|#define TRUE true
  ------------------
  609|       |
  610|       |  /* if data->set.reuse_forbid is TRUE, it means the libcurl client has
  611|       |     forced us to close this connection. This is ignored for requests taking
  612|       |     place in a NTLM/NEGOTIATE authentication handshake. */
  613|  7.08k|  if(data->set.reuse_forbid
  ------------------
  |  Branch (613:6): [True: 1, False: 7.08k]
  ------------------
  614|       |#ifdef USE_NTLM
  615|       |     && !(conn->http_ntlm_state == NTLMSTATE_TYPE2 ||
  616|       |          conn->proxy_ntlm_state == NTLMSTATE_TYPE2)
  617|       |#endif
  618|       |#ifdef USE_SPNEGO
  619|       |     && !(conn->http_negotiate_state == GSS_AUTHRECV ||
  620|       |          conn->proxy_negotiate_state == GSS_AUTHRECV)
  621|       |#endif
  622|  7.08k|    )
  623|      1|    return TRUE;
  ------------------
  |  | 1051|      1|#define TRUE true
  ------------------
  624|       |
  625|       |  /* Unless this connection is for a "connect-only" transfer, it
  626|       |   * needs to be closed if the protocol handler does not support reuse. */
  627|  7.08k|  if(!data->set.connect_only && conn->scheme &&
  ------------------
  |  Branch (627:6): [True: 7.08k, False: 5]
  |  Branch (627:33): [True: 7.08k, False: 0]
  ------------------
  628|  7.08k|     !(conn->scheme->flags & PROTOPT_CONN_REUSE))
  ------------------
  |  |  238|  7.08k|#define PROTOPT_CONN_REUSE (1 << 16)  /* this protocol can reuse connections */
  ------------------
  |  Branch (628:6): [True: 6.83k, False: 247]
  ------------------
  629|  6.83k|    return TRUE;
  ------------------
  |  | 1051|  6.83k|#define TRUE true
  ------------------
  630|       |
  631|       |  /* if premature is TRUE, it means this connection was said to be DONE before
  632|       |     the entire request operation is complete and thus we cannot know in what
  633|       |     state it is for reusing, so we are forced to close it. In a perfect world
  634|       |     we can add code that keep track of if we really must close it here or not,
  635|       |     but currently we have no such detail knowledge. */
  636|    252|  if(premature && !Curl_conn_is_multiplex(conn, FIRSTSOCKET))
  ------------------
  |  |  245|    250|#define FIRSTSOCKET     0
  ------------------
  |  Branch (636:6): [True: 250, False: 2]
  |  Branch (636:19): [True: 250, False: 0]
  ------------------
  637|    250|    return TRUE;
  ------------------
  |  | 1051|    250|#define TRUE true
  ------------------
  638|       |
  639|      2|  return FALSE;
  ------------------
  |  | 1054|      2|#define FALSE false
  ------------------
  640|    252|}
multi.c:multi_assess_wakeup:
  397|  52.0k|{
  398|  52.0k|#ifdef ENABLE_WAKEUP
  399|  52.0k|  if(multi->socket_cb)
  ------------------
  |  Branch (399:6): [True: 0, False: 52.0k]
  ------------------
  400|      0|    return Curl_multi_ev_assess_xfer(multi, multi->admin);
  401|       |#else
  402|       |  (void)multi;
  403|       |#endif
  404|  52.0k|  return CURLM_OK;
  405|  52.0k|}
multi.c:mstate_connecting_pollset:
 1037|  1.18k|{
 1038|  1.18k|  struct connectdata *conn = data->conn;
 1039|  1.18k|  curl_socket_t sockfd;
 1040|  1.18k|  CURLcode result = CURLE_OK;
 1041|       |
 1042|  1.18k|  if(Curl_xfer_recv_is_paused(data))
  ------------------
  |  Branch (1042:6): [True: 0, False: 1.18k]
  ------------------
 1043|      0|    return CURLE_OK;
 1044|       |  /* If a socket is set, receiving is default. If the socket
 1045|       |   * has not been determined yet (eyeballing), always ask the
 1046|       |   * connection filters for what to monitor. */
 1047|  1.18k|  sockfd = Curl_conn_get_first_socket(data);
 1048|  1.18k|  if(sockfd != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  1.18k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1048:6): [True: 218, False: 968]
  ------------------
 1049|    218|    result = Curl_pollset_change(data, ps, sockfd, CURL_POLL_IN, 0);
  ------------------
  |  |  283|    218|#define CURL_POLL_IN     1
  ------------------
 1050|    218|    if(!result)
  ------------------
  |  Branch (1050:8): [True: 218, False: 0]
  ------------------
 1051|    218|      result = multi_adjust_pollset(data, ps);
 1052|    218|  }
 1053|  1.18k|  if(!result)
  ------------------
  |  Branch (1053:6): [True: 1.18k, False: 0]
  ------------------
 1054|  1.18k|    result = Curl_conn_adjust_pollset(data, conn, ps);
 1055|  1.18k|  return result;
 1056|  1.18k|}
multi.c:multi_adjust_pollset:
  993|  4.23k|{
  994|  4.23k|  CURLcode result = CURLE_OK;
  995|       |
  996|  4.23k|  if(ps->n) {
  ------------------
  |  Branch (996:6): [True: 4.23k, False: 0]
  ------------------
  997|  4.23k|    bool send_blocked, recv_blocked;
  998|       |
  999|  4.23k|    recv_blocked = (Curl_rlimit_avail(&data->progress.dl.rlimit, NULL) <= 0);
 1000|  4.23k|    send_blocked = (Curl_rlimit_avail(&data->progress.ul.rlimit, NULL) <= 0);
 1001|  4.23k|    if(send_blocked || recv_blocked) {
  ------------------
  |  Branch (1001:8): [True: 0, False: 4.23k]
  |  Branch (1001:24): [True: 0, False: 4.23k]
  ------------------
 1002|      0|      int i;
 1003|      0|      for(i = 0; i <= SECONDARYSOCKET; ++i) {
  ------------------
  |  |  246|      0|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (1003:18): [True: 0, False: 0]
  ------------------
 1004|      0|        curl_socket_t sock = data->conn->sock[i];
 1005|      0|        if(sock == CURL_SOCKET_BAD)
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1005:12): [True: 0, False: 0]
  ------------------
 1006|      0|          continue;
 1007|      0|        if(recv_blocked && Curl_pollset_want_recv(data, ps, sock)) {
  ------------------
  |  Branch (1007:12): [True: 0, False: 0]
  |  Branch (1007:28): [True: 0, False: 0]
  ------------------
 1008|      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
  |  |  ------------------
  ------------------
 1009|      0|          if(result)
  ------------------
  |  Branch (1009:14): [True: 0, False: 0]
  ------------------
 1010|      0|            break;
 1011|      0|        }
 1012|      0|        if(send_blocked && Curl_pollset_want_send(data, ps, sock)) {
  ------------------
  |  Branch (1012:12): [True: 0, False: 0]
  |  Branch (1012:28): [True: 0, False: 0]
  ------------------
 1013|      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
  |  |  ------------------
  ------------------
 1014|      0|          if(result)
  ------------------
  |  Branch (1014:14): [True: 0, False: 0]
  ------------------
 1015|      0|            break;
 1016|      0|        }
 1017|      0|      }
 1018|      0|    }
 1019|       |
 1020|       |    /* Not blocked and wanting to receive. If there is data pending
 1021|       |     * in the connection filters, make transfer run again. */
 1022|  4.23k|    if(!recv_blocked &&
  ------------------
  |  Branch (1022:8): [True: 4.23k, False: 0]
  ------------------
 1023|  4.23k|       ((Curl_pollset_want_recv(data, ps, data->conn->sock[FIRSTSOCKET]) &&
  ------------------
  |  |  245|  4.23k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (1023:10): [True: 4.02k, False: 218]
  ------------------
 1024|  4.02k|         Curl_conn_data_pending(data, FIRSTSOCKET)) ||
  ------------------
  |  |  245|  4.02k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (1024:10): [True: 0, False: 4.02k]
  ------------------
 1025|  4.23k|        (Curl_pollset_want_recv(data, ps, data->conn->sock[SECONDARYSOCKET]) &&
  ------------------
  |  |  246|  4.23k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (1025:10): [True: 0, False: 4.23k]
  ------------------
 1026|      0|         Curl_conn_data_pending(data, SECONDARYSOCKET)))) {
  ------------------
  |  |  246|      0|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (1026:10): [True: 0, False: 0]
  ------------------
 1027|      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]
  |  |  ------------------
  ------------------
 1028|      0|                 "buffered input -> mark as dirty");
 1029|      0|      Curl_multi_mark_dirty(data);
 1030|      0|    }
 1031|  4.23k|  }
 1032|  4.23k|  return result;
 1033|  4.23k|}
multi.c:mstate_protocol_pollset:
 1060|  3.39k|{
 1061|  3.39k|  struct connectdata *conn = data->conn;
 1062|  3.39k|  CURLcode result = CURLE_OK;
 1063|       |
 1064|  3.39k|  if(conn->scheme->run->proto_pollset)
  ------------------
  |  Branch (1064:6): [True: 0, False: 3.39k]
  ------------------
 1065|      0|    result = conn->scheme->run->proto_pollset(data, ps);
 1066|  3.39k|  else {
 1067|  3.39k|    curl_socket_t sockfd = conn->sock[FIRSTSOCKET];
  ------------------
  |  |  245|  3.39k|#define FIRSTSOCKET     0
  ------------------
 1068|  3.39k|    if(sockfd != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  3.39k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1068:8): [True: 3.39k, False: 0]
  ------------------
 1069|       |      /* Default is to wait to something from the server */
 1070|  3.39k|      result = Curl_pollset_change(data, ps, sockfd, CURL_POLL_IN, 0);
  ------------------
  |  |  283|  3.39k|#define CURL_POLL_IN     1
  ------------------
 1071|  3.39k|    }
 1072|  3.39k|  }
 1073|  3.39k|  if(!result)
  ------------------
  |  Branch (1073:6): [True: 3.39k, False: 0]
  ------------------
 1074|  3.39k|    result = multi_adjust_pollset(data, ps);
 1075|  3.39k|  if(!result)
  ------------------
  |  Branch (1075:6): [True: 3.39k, False: 0]
  ------------------
 1076|  3.39k|    result = Curl_conn_adjust_pollset(data, conn, ps);
 1077|  3.39k|  return result;
 1078|  3.39k|}
multi.c:mstate_perform_pollset:
 1120|    624|{
 1121|    624|  struct connectdata *conn = data->conn;
 1122|    624|  CURLcode result = CURLE_OK;
 1123|       |
 1124|    624|  if(conn->scheme->run->perform_pollset)
  ------------------
  |  Branch (1124:6): [True: 0, False: 624]
  ------------------
 1125|      0|    result = conn->scheme->run->perform_pollset(data, ps);
 1126|    624|  else {
 1127|       |    /* Default is to obey the request flags for send/recv */
 1128|    624|    if(Curl_req_want_recv(data) && CONN_SOCK_IDX_VALID(conn->recv_idx)) {
  ------------------
  |  |  322|    624|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (322:36): [True: 624, False: 0]
  |  |  |  Branch (322:50): [True: 624, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1128:8): [True: 624, False: 0]
  ------------------
 1129|    624|      result = Curl_pollset_add_in(data, ps, conn->sock[conn->recv_idx]);
  ------------------
  |  |  162|    624|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, 0)
  |  |  ------------------
  |  |  |  |  283|    624|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
 1130|    624|    }
 1131|    624|    if(!result && Curl_req_want_send(data) &&
  ------------------
  |  Branch (1131:8): [True: 624, False: 0]
  |  Branch (1131:19): [True: 0, False: 624]
  ------------------
 1132|      0|       CONN_SOCK_IDX_VALID(conn->send_idx)) {
  ------------------
  |  |  322|      0|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (322:36): [True: 0, False: 0]
  |  |  |  Branch (322:50): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1133|      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
  |  |  ------------------
  ------------------
 1134|      0|    }
 1135|    624|  }
 1136|    624|  if(!result)
  ------------------
  |  Branch (1136:6): [True: 624, False: 0]
  ------------------
 1137|    624|    result = multi_adjust_pollset(data, ps);
 1138|    624|  if(!result)
  ------------------
  |  Branch (1138:6): [True: 624, False: 0]
  ------------------
 1139|    624|    result = Curl_conn_adjust_pollset(data, conn, ps);
 1140|    624|  return result;
 1141|    624|}
multi.c:multi_perform:
 2888|  17.1k|{
 2889|  17.1k|  CURLMcode returncode = CURLM_OK;
 2890|  17.1k|  struct curltime start = *multi_now(multi);
 2891|  17.1k|  uint32_t mid;
 2892|  17.1k|  struct Curl_sigpipe_ctx sigpipe_ctx;
 2893|       |
 2894|  17.1k|  if(multi->in_callback)
  ------------------
  |  Branch (2894:6): [True: 0, False: 17.1k]
  ------------------
 2895|      0|    return CURLM_RECURSIVE_API_CALL;
 2896|       |
 2897|  17.1k|  if(multi->in_ntfy_callback)
  ------------------
  |  Branch (2897:6): [True: 0, False: 17.1k]
  ------------------
 2898|      0|    return CURLM_RECURSIVE_API_CALL;
 2899|       |
 2900|  17.1k|  sigpipe_init(&sigpipe_ctx);
 2901|       |
 2902|  17.1k|  if(Curl_uint32_bset_first(&multi->process, &mid)) {
  ------------------
  |  Branch (2902:6): [True: 17.1k, False: 0]
  ------------------
 2903|  17.1k|    CURL_TRC_M(multi->admin, "multi_perform(running=%u)",
  ------------------
  |  |  148|  17.1k|  do {                                   \
  |  |  149|  17.1k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  17.1k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  17.1k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  34.2k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 17.1k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 17.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  34.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|  17.1k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  17.1k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  17.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 17.1k]
  |  |  ------------------
  ------------------
 2904|  17.1k|               Curl_multi_xfers_running(multi));
 2905|  35.1k|    do {
 2906|  35.1k|      struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 2907|  35.1k|      CURLMcode mresult;
 2908|  35.1k|      if(!data) {
  ------------------
  |  Branch (2908:10): [True: 0, False: 35.1k]
  ------------------
 2909|      0|        DEBUGASSERT(0);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2909:9): [Folded, False: 0]
  |  Branch (2909:9): [Folded, False: 0]
  ------------------
 2910|      0|        Curl_uint32_bset_remove(&multi->process, mid);
 2911|      0|        Curl_uint32_bset_remove(&multi->dirty, mid);
 2912|      0|        continue;
 2913|      0|      }
 2914|  35.1k|      mresult = multi_runsingle(multi, data, &sigpipe_ctx);
 2915|  35.1k|      if(mresult)
  ------------------
  |  Branch (2915:10): [True: 0, False: 35.1k]
  ------------------
 2916|      0|        returncode = mresult;
 2917|  35.1k|    } while(Curl_uint32_bset_next(&multi->process, mid, &mid));
  ------------------
  |  Branch (2917:13): [True: 17.9k, False: 17.1k]
  ------------------
 2918|  17.1k|  }
 2919|  17.1k|  sigpipe_restore(&sigpipe_ctx);
 2920|       |
 2921|  17.1k|  if(multi_ischanged(multi, TRUE))
  ------------------
  |  | 1051|  17.1k|#define TRUE true
  ------------------
  |  Branch (2921:6): [True: 6.90k, False: 10.2k]
  ------------------
 2922|  6.90k|    process_pending_handles(multi);
 2923|       |
 2924|  17.1k|  if(!returncode && CURL_MNTFY_HAS_ENTRIES(multi))
  ------------------
  |  |   56|  17.1k|#define CURL_MNTFY_HAS_ENTRIES(m)       ((m)->ntfy.has_entries)
  |  |  ------------------
  |  |  |  Branch (56:41): [True: 0, False: 17.1k]
  |  |  ------------------
  ------------------
  |  Branch (2924:6): [True: 17.1k, False: 0]
  ------------------
 2925|      0|    returncode = Curl_mntfy_dispatch_all(multi);
 2926|       |
 2927|       |  /*
 2928|       |   * Remove all expired timers from the splay since handles are dealt
 2929|       |   * with unconditionally by this function and curl_multi_timeout() requires
 2930|       |   * that already passed/handled expire times are removed from the splay.
 2931|       |   *
 2932|       |   * It is important that the 'now' value is set at the entry of this function
 2933|       |   * and not for the current time as it may have ticked a little while since
 2934|       |   * then and then we risk this loop to remove timers that actually have not
 2935|       |   * been handled!
 2936|       |   */
 2937|  17.1k|  if(multi->timetree) {
  ------------------
  |  Branch (2937:6): [True: 4.89k, False: 12.2k]
  ------------------
 2938|  4.89k|    struct Curl_tree *t = NULL;
 2939|  4.90k|    do {
 2940|  4.90k|      multi->timetree = Curl_splaygetbest(&start, multi->timetree, &t);
 2941|  4.90k|      if(t) {
  ------------------
  |  Branch (2941:10): [True: 11, False: 4.89k]
  ------------------
 2942|       |        /* the removed may have another timeout in queue */
 2943|     11|        struct Curl_easy *data = Curl_splayget(t);
 2944|     11|        (void)add_next_timeout(&start, multi, data);
 2945|     11|        if(data->mstate == MSTATE_PENDING) {
  ------------------
  |  Branch (2945:12): [True: 0, False: 11]
  ------------------
 2946|      0|          bool stream_unused;
 2947|      0|          CURLcode result_unused;
 2948|      0|          if(multi_handle_timeout(data, &stream_unused, &result_unused)) {
  ------------------
  |  Branch (2948:14): [True: 0, False: 0]
  ------------------
 2949|      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]
  |  |  ------------------
  ------------------
 2950|      0|            move_pending_to_connect(multi, data);
 2951|      0|          }
 2952|      0|        }
 2953|     11|      }
 2954|  4.90k|    } while(t);
  ------------------
  |  Branch (2954:13): [True: 11, False: 4.89k]
  ------------------
 2955|  4.89k|  }
 2956|       |
 2957|  17.1k|  if(running_handles) {
  ------------------
  |  Branch (2957:6): [True: 17.1k, False: 0]
  ------------------
 2958|  17.1k|    unsigned int running = Curl_multi_xfers_running(multi);
 2959|  17.1k|    *running_handles = (running < INT_MAX) ? (int)running : INT_MAX;
  ------------------
  |  Branch (2959:24): [True: 17.1k, False: 0]
  ------------------
 2960|  17.1k|  }
 2961|       |
 2962|  17.1k|  if(CURLM_OK >= returncode)
  ------------------
  |  Branch (2962:6): [True: 17.1k, False: 0]
  ------------------
 2963|  17.1k|    returncode = Curl_update_timer(multi);
 2964|       |
 2965|  17.1k|  return returncode;
 2966|  17.1k|}
multi.c:multi_now:
  104|  17.1k|{
  105|  17.1k|  curlx_pnow(&multi->now);
  106|  17.1k|  return &multi->now;
  107|  17.1k|}
multi.c:multi_runsingle:
 2719|  35.1k|{
 2720|  35.1k|  CURLMcode mresult;
 2721|  35.1k|  CURLcode result = CURLE_OK;
 2722|       |
 2723|  35.1k|  if(!GOOD_EASY_HANDLE(data))
  ------------------
  |  |  141|  35.1k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  135|  35.1k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|  35.1k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (141:5): [True: 35.1k, False: 0]
  |  |  |  Branch (141:12): [True: 35.1k, False: 0]
  |  |  ------------------
  |  |  142|  35.1k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (2723:6): [True: 0, False: 35.1k]
  |  Branch (2723:7): [True: 0, False: 0]
  |  Branch (2723:7): [True: 0, False: 0]
  ------------------
 2724|      0|    return CURLM_BAD_EASY_HANDLE;
 2725|       |
 2726|  35.1k|  if(multi->dead) {
  ------------------
  |  Branch (2726:6): [True: 0, False: 35.1k]
  ------------------
 2727|       |    /* a multi-level callback returned error before, meaning every individual
 2728|       |     transfer now has failed */
 2729|      0|    result = CURLE_ABORTED_BY_CALLBACK;
 2730|      0|    multi_posttransfer(data);
 2731|      0|    multi_done(data, result, FALSE);
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 2732|      0|    multistate(data, MSTATE_COMPLETED);
  ------------------
  |  |  212|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2733|      0|  }
 2734|       |
 2735|  35.1k|  multi_warn_debug(multi, data);
 2736|       |
 2737|       |  /* transfer runs now, clear the dirty bit. This may be set
 2738|       |   * again during processing, triggering a re-run later. */
 2739|  35.1k|  Curl_uint32_bset_remove(&multi->dirty, data->mid);
 2740|       |
 2741|  35.1k|  if(data == multi->admin) {
  ------------------
  |  Branch (2741:6): [True: 17.1k, False: 17.9k]
  ------------------
 2742|  17.1k|#ifdef ENABLE_WAKEUP
 2743|       |    /* Consume any pending wakeup signals before processing.
 2744|       |     * This is necessary for event based processing. See #21547 */
 2745|  17.1k|    (void)Curl_wakeup_consume(multi->wakeup_pair, TRUE);
  ------------------
  |  | 1051|  17.1k|#define TRUE true
  ------------------
 2746|  17.1k|#endif
 2747|  17.1k|#ifdef USE_RESOLV_THREADED
 2748|  17.1k|    Curl_async_thrdd_multi_process(multi);
 2749|  17.1k|#endif
 2750|  17.1k|    Curl_cshutdn_perform(&multi->cshutdn, multi->admin, sigpipe_ctx);
 2751|  17.1k|    return CURLM_OK;
 2752|  17.1k|  }
 2753|       |
 2754|  17.9k|  sigpipe_apply(data, sigpipe_ctx);
 2755|  55.3k|  do {
 2756|       |    /* A "stream" here is a logical stream if the protocol can handle that
 2757|       |       (HTTP/2), or the full connection for older protocols */
 2758|  55.3k|    bool stream_error = FALSE;
  ------------------
  |  | 1054|  55.3k|#define FALSE false
  ------------------
 2759|  55.3k|    mresult = CURLM_OK;
 2760|       |
 2761|  55.3k|    if(multi_ischanged(multi, TRUE)) {
  ------------------
  |  | 1051|  55.3k|#define TRUE true
  ------------------
  |  Branch (2761:8): [True: 38, False: 55.3k]
  ------------------
 2762|     38|      CURL_TRC_M(data, "multi changed, check CONNECT_PEND queue");
  ------------------
  |  |  148|     38|  do {                                   \
  |  |  149|     38|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|     38|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|     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]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|     38|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|     38|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|     38|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 38]
  |  |  ------------------
  ------------------
 2763|     38|      process_pending_handles(multi); /* multiplexed */
 2764|     38|    }
 2765|       |
 2766|  55.3k|    if(data->mstate > MSTATE_CONNECT &&
  ------------------
  |  Branch (2766:8): [True: 22.1k, False: 33.2k]
  ------------------
 2767|  22.1k|       data->mstate < MSTATE_COMPLETED) {
  ------------------
  |  Branch (2767:8): [True: 22.1k, False: 0]
  ------------------
 2768|       |      /* Make sure we set the connection's current owner */
 2769|  22.1k|      DEBUGASSERT(data->conn);
  ------------------
  |  | 1077|  22.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2769:7): [True: 0, False: 22.1k]
  |  Branch (2769:7): [True: 22.1k, False: 0]
  ------------------
 2770|  22.1k|      if(!data->conn)
  ------------------
  |  Branch (2770:10): [True: 0, False: 22.1k]
  ------------------
 2771|      0|        return CURLM_INTERNAL_ERROR;
 2772|  22.1k|    }
 2773|       |
 2774|       |    /* Wait for the connect state as only then is the start time stored, but
 2775|       |       we must not check already completed handles */
 2776|  55.3k|    if((data->mstate >= MSTATE_CONNECT) && (data->mstate < MSTATE_COMPLETED) &&
  ------------------
  |  Branch (2776:8): [True: 31.9k, False: 23.4k]
  |  Branch (2776:44): [True: 31.9k, False: 0]
  ------------------
 2777|  31.9k|       multi_handle_timeout(data, &stream_error, &result))
  ------------------
  |  Branch (2777:8): [True: 9, False: 31.9k]
  ------------------
 2778|       |      /* Skip the statemachine and go directly to error handling section. */
 2779|      9|      goto statemachine_end;
 2780|       |
 2781|  55.3k|    switch(data->mstate) {
 2782|  13.6k|    case MSTATE_INIT:
  ------------------
  |  Branch (2782:5): [True: 13.6k, False: 41.7k]
  ------------------
 2783|       |      /* Transitional state. init this transfer. A handle never comes back to
 2784|       |         this state. */
 2785|  13.6k|      mresult = multistate_init(data, &result);
 2786|  13.6k|      break;
 2787|       |
 2788|  9.76k|    case MSTATE_SETUP:
  ------------------
  |  Branch (2788:5): [True: 9.76k, False: 45.6k]
  ------------------
 2789|       |      /* Transitional state. Setup things for a new transfer. The handle
 2790|       |         can come back to this state on a redirect. */
 2791|  9.76k|      mresult = multistate_setup(data);
 2792|  9.76k|      break;
 2793|       |
 2794|  9.78k|    case MSTATE_CONNECT:
  ------------------
  |  Branch (2794:5): [True: 9.78k, False: 45.5k]
  ------------------
 2795|  9.78k|      mresult = multistate_connect(multi, data, &result);
 2796|  9.78k|      break;
 2797|       |
 2798|  8.67k|    case MSTATE_CONNECTING:
  ------------------
  |  Branch (2798:5): [True: 8.67k, False: 46.7k]
  ------------------
 2799|       |      /* awaiting a completion of an asynch TCP connect */
 2800|  8.67k|      mresult = multistate_connecting(data, &stream_error, &result);
 2801|  8.67k|      break;
 2802|       |
 2803|  3.40k|    case MSTATE_PROTOCONNECT:
  ------------------
  |  Branch (2803:5): [True: 3.40k, False: 51.9k]
  ------------------
 2804|  3.40k|      mresult = multistate_protoconnect(data, &stream_error, &result);
 2805|  3.40k|      break;
 2806|       |
 2807|  6.46k|    case MSTATE_PROTOCONNECTING:
  ------------------
  |  Branch (2807:5): [True: 6.46k, False: 48.9k]
  ------------------
 2808|       |      /* protocol-specific connect phase */
 2809|  6.46k|      mresult = multistate_protoconnecting(data, &stream_error, &result);
 2810|  6.46k|      break;
 2811|       |
 2812|  1.28k|    case MSTATE_DO:
  ------------------
  |  Branch (2812:5): [True: 1.28k, False: 54.0k]
  ------------------
 2813|  1.28k|      mresult = multistate_do(data, &stream_error, &result);
 2814|  1.28k|      break;
 2815|       |
 2816|      0|    case MSTATE_DOING:
  ------------------
  |  Branch (2816:5): [True: 0, False: 55.3k]
  ------------------
 2817|       |      /* we continue DOING until the DO phase is complete */
 2818|      0|      mresult = multistate_doing(data, &stream_error, &result);
 2819|      0|      break;
 2820|       |
 2821|      0|    case MSTATE_DOING_MORE:
  ------------------
  |  Branch (2821:5): [True: 0, False: 55.3k]
  ------------------
 2822|       |      /*
 2823|       |       * When we are connected, DOING MORE and then go DID
 2824|       |       */
 2825|      0|      mresult = multistate_doing_more(data, &stream_error, &result);
 2826|      0|      break;
 2827|       |
 2828|    906|    case MSTATE_DID:
  ------------------
  |  Branch (2828:5): [True: 906, False: 54.4k]
  ------------------
 2829|    906|      mresult = multistate_did(multi, data);
 2830|    906|      break;
 2831|       |
 2832|     33|    case MSTATE_RATELIMITING: /* limit-rate exceeded in either direction */
  ------------------
  |  Branch (2832:5): [True: 33, False: 55.3k]
  ------------------
 2833|     33|      mresult = multistate_ratelimiting(data, &result);
 2834|     33|      break;
 2835|       |
 2836|  1.34k|    case MSTATE_PERFORMING:
  ------------------
  |  Branch (2836:5): [True: 1.34k, False: 54.0k]
  ------------------
 2837|  1.34k|      mresult = multistate_performing(data, &stream_error, &result);
 2838|  1.34k|      break;
 2839|       |
 2840|     61|    case MSTATE_DONE:
  ------------------
  |  Branch (2840:5): [True: 61, False: 55.3k]
  ------------------
 2841|     61|      mresult = multistate_done(data, &result);
 2842|     61|      break;
 2843|       |
 2844|      0|    case MSTATE_COMPLETED:
  ------------------
  |  Branch (2844:5): [True: 0, False: 55.3k]
  ------------------
 2845|      0|      break;
 2846|       |
 2847|      0|    case MSTATE_PENDING:
  ------------------
  |  Branch (2847:5): [True: 0, False: 55.3k]
  ------------------
 2848|      0|    case MSTATE_MSGSENT:
  ------------------
  |  Branch (2848:5): [True: 0, False: 55.3k]
  ------------------
 2849|       |      /* handles in these states should NOT be in this list */
 2850|      0|      break;
 2851|       |
 2852|      0|    default:
  ------------------
  |  Branch (2852:5): [True: 0, False: 55.3k]
  ------------------
 2853|      0|      return CURLM_INTERNAL_ERROR;
 2854|  55.3k|    }
 2855|       |
 2856|  55.3k|    if(data->mstate >= MSTATE_CONNECT &&
  ------------------
  |  Branch (2856:8): [True: 41.5k, False: 13.8k]
  ------------------
 2857|  41.5k|       data->mstate < MSTATE_DO &&
  ------------------
  |  Branch (2857:8): [True: 36.6k, False: 4.90k]
  ------------------
 2858|  36.6k|       mresult != CURLM_CALL_MULTI_PERFORM &&
  ------------------
  |  Branch (2858:8): [True: 12.1k, False: 24.4k]
  ------------------
 2859|  12.1k|       !multi_ischanged(multi, FALSE)) {
  ------------------
  |  | 1054|  12.1k|#define FALSE false
  ------------------
  |  Branch (2859:8): [True: 6.26k, False: 5.87k]
  ------------------
 2860|       |      /* We now handle stream timeouts if and only if this will be the last
 2861|       |       * loop iteration. We only check this on the last iteration to ensure
 2862|       |       * that if we know we have additional work to do immediately
 2863|       |       * (i.e. CURLM_CALL_MULTI_PERFORM == TRUE) then we should do that before
 2864|       |       * declaring the connection timed out as we may almost have a completed
 2865|       |       * connection. */
 2866|  6.26k|      multi_handle_timeout(data, &stream_error, &result);
 2867|  6.26k|    }
 2868|       |
 2869|  55.3k|statemachine_end:
 2870|       |
 2871|  55.3k|    result = is_finished(multi, data, stream_error, result);
 2872|  55.3k|    if(result)
  ------------------
  |  Branch (2872:8): [True: 12.4k, False: 42.9k]
  ------------------
 2873|  12.4k|      mresult = CURLM_CALL_MULTI_PERFORM;
 2874|       |
 2875|  55.3k|    if(MSTATE_COMPLETED == data->mstate) {
  ------------------
  |  Branch (2875:8): [True: 12.5k, False: 42.8k]
  ------------------
 2876|  12.5k|      handle_completed(multi, data, result);
 2877|  12.5k|      return CURLM_OK;
 2878|  12.5k|    }
 2879|  55.3k|  } while((mresult == CURLM_CALL_MULTI_PERFORM) ||
  ------------------
  |  Branch (2879:11): [True: 37.4k, False: 5.45k]
  ------------------
 2880|  5.45k|          multi_ischanged(multi, FALSE));
  ------------------
  |  | 1054|  5.45k|#define FALSE false
  ------------------
  |  Branch (2880:11): [True: 0, False: 5.45k]
  ------------------
 2881|       |
 2882|  5.45k|  data->result = result;
 2883|  5.45k|  return mresult;
 2884|  17.9k|}
multi.c:multi_posttransfer:
 1947|  8.60k|{
 1948|       |#if defined(HAVE_SIGNAL) && defined(SIGPIPE) && !defined(MSG_NOSIGNAL)
 1949|       |  /* restore the signal handler for SIGPIPE before we get back */
 1950|       |  if(!data->set.no_signal)
 1951|       |    signal(SIGPIPE, data->state.prev_signal);
 1952|       |#else
 1953|  8.60k|  (void)data;
 1954|  8.60k|#endif
 1955|  8.60k|}
multi.c:multistate_init:
 2477|  13.6k|{
 2478|  13.6k|  if(!data->state.really_alive) {
  ------------------
  |  Branch (2478:6): [True: 13.6k, False: 0]
  ------------------
 2479|  13.6k|    data->state.really_alive = TRUE;
  ------------------
  |  | 1051|  13.6k|#define TRUE true
  ------------------
 2480|  13.6k|    ++data->multi->xfers_really_alive;
 2481|  13.6k|    if(data->multi->xfers_really_alive == 1) {
  ------------------
  |  Branch (2481:8): [True: 13.0k, False: 613]
  ------------------
 2482|  13.0k|      CURLMcode mresult = multi_assess_wakeup(data->multi);
 2483|  13.0k|      if(mresult) {
  ------------------
  |  Branch (2483:10): [True: 0, False: 13.0k]
  ------------------
 2484|      0|        failf(data, "error enabling wakeup listening: %d", mresult);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2485|      0|        return mresult;
 2486|      0|      }
 2487|  13.0k|    }
 2488|  13.6k|  }
 2489|       |
 2490|  13.6k|  *result = Curl_pretransfer(data);
 2491|  13.6k|  if(*result)
  ------------------
  |  Branch (2491:6): [True: 3.90k, False: 9.76k]
  ------------------
 2492|  3.90k|    return CURLM_OK;
 2493|       |
 2494|       |  /* after init, go SETUP */
 2495|  9.76k|  multistate(data, MSTATE_SETUP);
  ------------------
  |  |  212|  9.76k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2496|  9.76k|  Curl_pgrsTime(data, TIMER_STARTOP);
 2497|  9.76k|  return CURLM_CALL_MULTI_PERFORM;
 2498|  13.6k|}
multi.c:multistate_setup:
 2501|  9.76k|{
 2502|  9.76k|  Curl_pgrsTime(data, TIMER_STARTSINGLE);
 2503|  9.76k|  if(data->set.timeout)
  ------------------
  |  Branch (2503:6): [True: 9.76k, False: 0]
  ------------------
 2504|  9.76k|    Curl_expire(data, data->set.timeout, EXPIRE_TIMEOUT);
 2505|  9.76k|  if(data->set.connecttimeout)
  ------------------
  |  Branch (2505:6): [True: 167, False: 9.59k]
  ------------------
 2506|       |    /* Since a connection might go to pending and back to CONNECT several
 2507|       |       times before it actually takes off, we need to set the timeout once
 2508|       |       in SETUP before we enter CONNECT the first time. */
 2509|    167|    Curl_expire(data, data->set.connecttimeout, EXPIRE_CONNECTTIMEOUT);
 2510|       |
 2511|  9.76k|  multistate(data, MSTATE_CONNECT);
  ------------------
  |  |  212|  9.76k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2512|  9.76k|  return CURLM_CALL_MULTI_PERFORM;
 2513|  9.76k|}
multi.c:multistate_connect:
 2325|  9.78k|{
 2326|       |  /* Connect. We want to get a connection identifier filled in. This state can
 2327|       |     be entered from SETUP and from PENDING. */
 2328|  9.78k|  bool connected;
 2329|  9.78k|  CURLMcode mresult = CURLM_OK;
 2330|  9.78k|  CURLcode result = Curl_connect(data, &connected);
 2331|  9.78k|  if(result == CURLE_NO_CONNECTION_AVAILABLE) {
  ------------------
  |  Branch (2331:6): [True: 178, False: 9.60k]
  ------------------
 2332|       |    /* There was no connection available. We will go to the pending state and
 2333|       |       wait for an available connection. */
 2334|    178|    multistate(data, MSTATE_PENDING);
  ------------------
  |  |  212|    178|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2335|       |    /* move from process to pending set */
 2336|    178|    Curl_uint32_bset_remove(&multi->process, data->mid);
 2337|    178|    Curl_uint32_bset_remove(&multi->dirty, data->mid);
 2338|    178|    Curl_uint32_bset_add(&multi->pending, data->mid);
 2339|    178|    *resultp = CURLE_OK;
 2340|    178|    return mresult;
 2341|    178|  }
 2342|  9.60k|  else
 2343|  9.60k|    process_pending_handles(data->multi);
 2344|       |
 2345|  9.60k|  if(!result) {
  ------------------
  |  Branch (2345:6): [True: 7.93k, False: 1.67k]
  ------------------
 2346|       |    /* after the connect has been sent off, go WAITCONNECT unless the
 2347|       |       protocol connect is already done and we can go directly to WAITDO or
 2348|       |       DO! */
 2349|  7.93k|    mresult = CURLM_CALL_MULTI_PERFORM;
 2350|       |
 2351|  7.93k|    if(connected) {
  ------------------
  |  Branch (2351:8): [True: 0, False: 7.93k]
  ------------------
 2352|      0|      if(!data->conn->bits.reuse &&
  ------------------
  |  Branch (2352:10): [True: 0, False: 0]
  ------------------
 2353|      0|         Curl_conn_is_multiplex(data->conn, FIRSTSOCKET)) {
  ------------------
  |  |  245|      0|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2353:10): [True: 0, False: 0]
  ------------------
 2354|       |        /* new connection, can multiplex, wake pending handles */
 2355|      0|        process_pending_handles(data->multi);
 2356|      0|      }
 2357|      0|      multistate(data, MSTATE_PROTOCONNECT);
  ------------------
  |  |  212|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2358|      0|    }
 2359|  7.93k|    else {
 2360|  7.93k|      multistate(data, MSTATE_CONNECTING);
  ------------------
  |  |  212|  7.93k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2361|  7.93k|    }
 2362|  7.93k|  }
 2363|  9.60k|  *resultp = result;
 2364|  9.60k|  return mresult;
 2365|  9.78k|}
multi.c:multistate_connecting:
 2518|  8.67k|{
 2519|  8.67k|  bool connected;
 2520|       |
 2521|  8.67k|  if(!data->conn) {
  ------------------
  |  Branch (2521:6): [True: 0, False: 8.67k]
  ------------------
 2522|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2522:5): [Folded, False: 0]
  |  Branch (2522:5): [Folded, False: 0]
  ------------------
 2523|      0|    *result = CURLE_FAILED_INIT;
 2524|      0|    return CURLM_OK;
 2525|      0|  }
 2526|  8.67k|  if(!Curl_xfer_recv_is_paused(data)) {
  ------------------
  |  Branch (2526:6): [True: 8.67k, False: 0]
  ------------------
 2527|  8.67k|    *result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &connected);
  ------------------
  |  |  245|  8.67k|#define FIRSTSOCKET     0
  ------------------
                  *result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &connected);
  ------------------
  |  | 1054|  8.67k|#define FALSE false
  ------------------
 2528|  8.67k|    if(connected && !*result) {
  ------------------
  |  Branch (2528:8): [True: 3.40k, False: 5.26k]
  |  Branch (2528:21): [True: 3.40k, False: 0]
  ------------------
 2529|  3.40k|      if(!data->conn->bits.reuse &&
  ------------------
  |  Branch (2529:10): [True: 3.40k, False: 0]
  ------------------
 2530|  3.40k|         Curl_conn_is_multiplex(data->conn, FIRSTSOCKET)) {
  ------------------
  |  |  245|  3.40k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2530:10): [True: 0, False: 3.40k]
  ------------------
 2531|       |        /* new connection, can multiplex, wake pending handles */
 2532|      0|        process_pending_handles(data->multi);
 2533|      0|      }
 2534|  3.40k|      multistate(data, MSTATE_PROTOCONNECT);
  ------------------
  |  |  212|  3.40k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2535|  3.40k|      return CURLM_CALL_MULTI_PERFORM;
 2536|  3.40k|    }
 2537|  5.26k|    else if(*result) {
  ------------------
  |  Branch (2537:13): [True: 4.07k, False: 1.18k]
  ------------------
 2538|       |      /* failure detected */
 2539|  4.07k|      CURL_TRC_M(data, "connect failed -> %d", (int)*result);
  ------------------
  |  |  148|  4.07k|  do {                                   \
  |  |  149|  4.07k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  4.07k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  4.07k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  8.15k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 4.07k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.07k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  8.15k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((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.07k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  4.07k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  4.07k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 4.07k]
  |  |  ------------------
  ------------------
 2540|  4.07k|      multi_posttransfer(data);
 2541|  4.07k|      multi_done(data, *result, TRUE);
  ------------------
  |  | 1051|  4.07k|#define TRUE true
  ------------------
 2542|  4.07k|      *stream_error = TRUE;
  ------------------
  |  | 1051|  4.07k|#define TRUE true
  ------------------
 2543|  4.07k|      return CURLM_OK;
 2544|  4.07k|    }
 2545|  8.67k|  }
 2546|  1.18k|  return CURLM_OK;
 2547|  8.67k|}
multi.c:multistate_protoconnect:
 2552|  3.40k|{
 2553|  3.40k|  bool protocol_connected = FALSE;
  ------------------
  |  | 1054|  3.40k|#define FALSE false
  ------------------
 2554|       |
 2555|  3.40k|  if(!*result && data->conn->bits.reuse) {
  ------------------
  |  Branch (2555:6): [True: 3.40k, False: 0]
  |  Branch (2555:18): [True: 0, False: 3.40k]
  ------------------
 2556|       |    /* ftp seems to hang when protoconnect on reused connection since we
 2557|       |     * handle PROTOCONNECT in general inside the filters, it seems wrong to
 2558|       |     * restart this on a reused connection.
 2559|       |     */
 2560|      0|    multistate(data, MSTATE_DO);
  ------------------
  |  |  212|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2561|      0|    return CURLM_CALL_MULTI_PERFORM;
 2562|      0|  }
 2563|  3.40k|  if(!*result)
  ------------------
  |  Branch (2563:6): [True: 3.40k, False: 0]
  ------------------
 2564|  3.40k|    *result = protocol_connect(data, &protocol_connected);
 2565|  3.40k|  if(!*result && !protocol_connected) {
  ------------------
  |  Branch (2565:6): [True: 3.39k, False: 18]
  |  Branch (2565:18): [True: 3.39k, False: 0]
  ------------------
 2566|       |    /* switch to waiting state */
 2567|  3.39k|    multistate(data, MSTATE_PROTOCONNECTING);
  ------------------
  |  |  212|  3.39k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2568|  3.39k|    return CURLM_CALL_MULTI_PERFORM;
 2569|  3.39k|  }
 2570|     18|  else if(!*result) {
  ------------------
  |  Branch (2570:11): [True: 0, False: 18]
  ------------------
 2571|       |    /* protocol connect has completed, go WAITDO or DO */
 2572|      0|    multistate(data, MSTATE_DO);
  ------------------
  |  |  212|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2573|      0|    return CURLM_CALL_MULTI_PERFORM;
 2574|      0|  }
 2575|       |
 2576|       |  /* failure detected */
 2577|     18|  multi_posttransfer(data);
 2578|     18|  multi_done(data, *result, TRUE);
  ------------------
  |  | 1051|     18|#define TRUE true
  ------------------
 2579|       |  *stream_error = TRUE;
  ------------------
  |  | 1051|     18|#define TRUE true
  ------------------
 2580|     18|  return CURLM_OK;
 2581|  3.40k|}
multi.c:protocol_connect:
 1912|  3.40k|{
 1913|  3.40k|  struct connectdata *conn = data->conn;
 1914|  3.40k|  CURLcode result = CURLE_OK;
 1915|       |
 1916|  3.40k|  DEBUGASSERT(conn);
  ------------------
  |  | 1077|  3.40k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1916:3): [True: 0, False: 3.40k]
  |  Branch (1916:3): [True: 3.40k, False: 0]
  ------------------
 1917|  3.40k|  DEBUGASSERT(protocol_done);
  ------------------
  |  | 1077|  3.40k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1917:3): [True: 0, False: 3.40k]
  |  Branch (1917:3): [True: 3.40k, False: 0]
  ------------------
 1918|  3.40k|  DEBUGASSERT(Curl_conn_is_connected(conn, FIRSTSOCKET));
  ------------------
  |  | 1077|  3.40k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1918:3): [True: 0, False: 3.40k]
  |  Branch (1918:3): [True: 3.40k, False: 0]
  ------------------
 1919|       |
 1920|  3.40k|  *protocol_done = FALSE;
  ------------------
  |  | 1054|  3.40k|#define FALSE false
  ------------------
 1921|  3.40k|  if(!conn->bits.protoconnstart) {
  ------------------
  |  Branch (1921:6): [True: 3.40k, False: 0]
  ------------------
 1922|  3.40k|    if(conn->scheme->run->connect_it) {
  ------------------
  |  Branch (1922:8): [True: 3.40k, False: 0]
  ------------------
 1923|       |      /* Call the protocol-specific connect function */
 1924|  3.40k|      result = conn->scheme->run->connect_it(data, protocol_done);
 1925|  3.40k|      if(result)
  ------------------
  |  Branch (1925:10): [True: 18, False: 3.39k]
  ------------------
 1926|     18|        return result;
 1927|  3.40k|    }
 1928|  3.39k|    conn->bits.protoconnstart = TRUE;
  ------------------
  |  | 1051|  3.39k|#define TRUE true
  ------------------
 1929|  3.39k|  }
 1930|       |
 1931|       |  /* Unless this protocol does not have any protocol-connect callback, as
 1932|       |     then we know we are done. */
 1933|  3.39k|  if(!conn->scheme->run->connecting)
  ------------------
  |  Branch (1933:6): [True: 0, False: 3.39k]
  ------------------
 1934|      0|    *protocol_done = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 1935|  3.39k|  return CURLE_OK;
 1936|  3.40k|}
multi.c:multistate_protoconnecting:
 2586|  6.46k|{
 2587|  6.46k|  bool protocol_connected = FALSE;
  ------------------
  |  | 1054|  6.46k|#define FALSE false
  ------------------
 2588|       |
 2589|       |  /* protocol-specific connect phase */
 2590|  6.46k|  *result = protocol_connecting(data, &protocol_connected);
 2591|  6.46k|  if(!*result && protocol_connected) {
  ------------------
  |  Branch (2591:6): [True: 4.67k, False: 1.78k]
  |  Branch (2591:18): [True: 1.28k, False: 3.39k]
  ------------------
 2592|       |    /* after the connect has completed, go WAITDO or DO */
 2593|  1.28k|    multistate(data, MSTATE_DO);
  ------------------
  |  |  212|  1.28k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2594|  1.28k|    return CURLM_CALL_MULTI_PERFORM;
 2595|  1.28k|  }
 2596|  5.17k|  else if(*result) {
  ------------------
  |  Branch (2596:11): [True: 1.78k, False: 3.39k]
  ------------------
 2597|       |    /* failure detected */
 2598|  1.78k|    multi_posttransfer(data);
 2599|  1.78k|    multi_done(data, *result, TRUE);
  ------------------
  |  | 1051|  1.78k|#define TRUE true
  ------------------
 2600|  1.78k|    *stream_error = TRUE;
  ------------------
  |  | 1051|  1.78k|#define TRUE true
  ------------------
 2601|  1.78k|  }
 2602|  5.17k|  return CURLM_OK;
 2603|  6.46k|}
multi.c:protocol_connecting:
 1872|  6.46k|{
 1873|  6.46k|  CURLcode result = CURLE_OK;
 1874|  6.46k|  struct connectdata *conn = data->conn;
 1875|       |
 1876|  6.46k|  if(conn && conn->scheme->run->connecting) {
  ------------------
  |  Branch (1876:6): [True: 6.46k, False: 0]
  |  Branch (1876:14): [True: 6.46k, False: 0]
  ------------------
 1877|  6.46k|    *done = FALSE;
  ------------------
  |  | 1054|  6.46k|#define FALSE false
  ------------------
 1878|  6.46k|    result = conn->scheme->run->connecting(data, done);
 1879|  6.46k|  }
 1880|      0|  else
 1881|      0|    *done = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 1882|       |
 1883|  6.46k|  return result;
 1884|  6.46k|}
multi.c:multistate_do:
 2165|  1.28k|{
 2166|  1.28k|  CURLMcode mresult = CURLM_OK;
 2167|  1.28k|  CURLcode result = CURLE_OK;
 2168|  1.28k|  if(data->set.fprereq) {
  ------------------
  |  Branch (2168:6): [True: 0, False: 1.28k]
  ------------------
 2169|      0|    int prereq_rc;
 2170|       |
 2171|       |    /* call the prerequest callback function */
 2172|      0|    Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 2173|      0|    prereq_rc = data->set.fprereq(data->set.prereq_userp,
 2174|      0|                                  data->info.primary.remote_ip,
 2175|      0|                                  data->info.primary.local_ip,
 2176|      0|                                  data->info.primary.remote_port,
 2177|      0|                                  data->info.primary.local_port);
 2178|      0|    Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 2179|      0|    if(prereq_rc != CURL_PREREQFUNC_OK) {
  ------------------
  |  |  506|      0|#define CURL_PREREQFUNC_OK 0
  ------------------
  |  Branch (2179:8): [True: 0, False: 0]
  ------------------
 2180|      0|      failf(data, "operation aborted by pre-request callback");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2181|       |      /* failure in pre-request callback - do not do any other processing */
 2182|      0|      result = CURLE_ABORTED_BY_CALLBACK;
 2183|      0|      multi_posttransfer(data);
 2184|      0|      multi_done(data, result, FALSE);
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 2185|      0|      *stream_errorp = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 2186|      0|      goto end;
 2187|      0|    }
 2188|      0|  }
 2189|       |
 2190|  1.28k|  if(data->set.connect_only && !data->set.connect_only_ws) {
  ------------------
  |  Branch (2190:6): [True: 5, False: 1.27k]
  |  Branch (2190:32): [True: 1, False: 4]
  ------------------
 2191|      1|    multistate(data, MSTATE_DONE);
  ------------------
  |  |  212|      1|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2192|      1|    mresult = CURLM_CALL_MULTI_PERFORM;
 2193|      1|  }
 2194|  1.28k|  else {
 2195|  1.28k|    bool dophase_done = FALSE;
  ------------------
  |  | 1054|  1.28k|#define FALSE false
  ------------------
 2196|       |    /* Perform the protocol's DO action */
 2197|  1.28k|    result = multi_do(data, &dophase_done);
 2198|       |
 2199|  1.28k|    if(!result) {
  ------------------
  |  Branch (2199:8): [True: 906, False: 375]
  ------------------
 2200|    906|      if(!dophase_done) {
  ------------------
  |  Branch (2200:10): [True: 0, False: 906]
  ------------------
 2201|      0|#ifndef CURL_DISABLE_FTP
 2202|       |        /* some steps needed for wildcard matching */
 2203|      0|        if(data->state.wildcardmatch) {
  ------------------
  |  Branch (2203:12): [True: 0, False: 0]
  ------------------
 2204|      0|          struct WildcardData *wc = data->wildcard;
 2205|      0|          if(wc->state == CURLWC_DONE || wc->state == CURLWC_SKIP) {
  ------------------
  |  Branch (2205:14): [True: 0, False: 0]
  |  Branch (2205:42): [True: 0, False: 0]
  ------------------
 2206|       |            /* skip some states if it is important */
 2207|      0|            multi_done(data, CURLE_OK, FALSE);
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 2208|       |
 2209|       |            /* if there is no connection left, skip the DONE state */
 2210|      0|            multistate(data, data->conn ? MSTATE_DONE : MSTATE_COMPLETED);
  ------------------
  |  |  212|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  |  |  ------------------
  |  |  |  Branch (212:36): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2211|      0|            mresult = CURLM_CALL_MULTI_PERFORM;
 2212|      0|            goto end;
 2213|      0|          }
 2214|      0|        }
 2215|      0|#endif
 2216|       |        /* DO was not completed in one function call, we must continue
 2217|       |           DOING... */
 2218|      0|        multistate(data, MSTATE_DOING);
  ------------------
  |  |  212|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2219|      0|        mresult = CURLM_CALL_MULTI_PERFORM;
 2220|      0|      }
 2221|       |
 2222|       |      /* after DO, go DO_DONE... or DO_MORE */
 2223|    906|      else if(data->conn->bits.do_more) {
  ------------------
  |  Branch (2223:15): [True: 0, False: 906]
  ------------------
 2224|       |        /* we are supposed to do more, but we need to sit down, relax and wait
 2225|       |           a little while first */
 2226|      0|        multistate(data, MSTATE_DOING_MORE);
  ------------------
  |  |  212|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2227|      0|        mresult = CURLM_CALL_MULTI_PERFORM;
 2228|      0|      }
 2229|    906|      else {
 2230|       |        /* we are done with the DO, now DID */
 2231|    906|        multistate(data, MSTATE_DID);
  ------------------
  |  |  212|    906|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2232|    906|        mresult = CURLM_CALL_MULTI_PERFORM;
 2233|    906|      }
 2234|    906|    }
 2235|    375|    else if((result == CURLE_SEND_ERROR) &&
  ------------------
  |  Branch (2235:13): [True: 0, False: 375]
  ------------------
 2236|      0|            data->conn->bits.reuse) {
  ------------------
  |  Branch (2236:13): [True: 0, False: 0]
  ------------------
 2237|       |      /*
 2238|       |       * In this situation, a connection that we were trying to use may have
 2239|       |       * unexpectedly died. If possible, send the connection back to the
 2240|       |       * CONNECT phase so we can try again.
 2241|       |       */
 2242|      0|      const struct Curl_scheme *handler = data->conn->scheme;
 2243|      0|      char *newurl = NULL;
 2244|      0|      followtype follow = FOLLOW_NONE;
 2245|      0|      CURLcode drc;
 2246|       |
 2247|      0|      drc = Curl_retry_request(data, &newurl);
 2248|      0|      if(drc) {
  ------------------
  |  Branch (2248:10): [True: 0, False: 0]
  ------------------
 2249|       |        /* a failure here pretty much implies an out of memory */
 2250|      0|        result = drc;
 2251|      0|        *stream_errorp = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 2252|      0|      }
 2253|       |
 2254|      0|      multi_posttransfer(data);
 2255|      0|      drc = multi_done(data, result, FALSE);
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 2256|       |
 2257|       |      /* When set to retry the connection, we must go back to the CONNECT
 2258|       |       * state */
 2259|      0|      if(newurl) {
  ------------------
  |  Branch (2259:10): [True: 0, False: 0]
  ------------------
 2260|      0|        if(!drc || (drc == CURLE_SEND_ERROR)) {
  ------------------
  |  Branch (2260:12): [True: 0, False: 0]
  |  Branch (2260:20): [True: 0, False: 0]
  ------------------
 2261|      0|          follow = FOLLOW_RETRY;
 2262|      0|          drc = multi_follow(data, handler, newurl, follow);
 2263|      0|          if(!drc) {
  ------------------
  |  Branch (2263:14): [True: 0, False: 0]
  ------------------
 2264|      0|            multistate(data, MSTATE_SETUP);
  ------------------
  |  |  212|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2265|      0|            mresult = CURLM_CALL_MULTI_PERFORM;
 2266|      0|            result = CURLE_OK;
 2267|      0|          }
 2268|      0|          else {
 2269|       |            /* Follow failed */
 2270|      0|            result = drc;
 2271|      0|          }
 2272|      0|        }
 2273|      0|        else {
 2274|       |          /* done did not return OK or SEND_ERROR */
 2275|      0|          result = drc;
 2276|      0|        }
 2277|      0|      }
 2278|      0|      else {
 2279|       |        /* Have error handler disconnect conn if we cannot retry */
 2280|      0|        *stream_errorp = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 2281|      0|      }
 2282|      0|      curlx_free(newurl);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2283|      0|    }
 2284|    375|    else {
 2285|       |      /* failure detected */
 2286|    375|      multi_posttransfer(data);
 2287|    375|      if(data->conn)
  ------------------
  |  Branch (2287:10): [True: 375, False: 0]
  ------------------
 2288|    375|        multi_done(data, result, FALSE);
  ------------------
  |  | 1054|    375|#define FALSE false
  ------------------
 2289|    375|      *stream_errorp = TRUE;
  ------------------
  |  | 1051|    375|#define TRUE true
  ------------------
 2290|    375|    }
 2291|  1.28k|  }
 2292|  1.28k|end:
 2293|  1.28k|  *resultp = result;
 2294|  1.28k|  return mresult;
 2295|  1.28k|}
multi.c:multi_do:
 1778|  1.28k|{
 1779|  1.28k|  CURLcode result = CURLE_OK;
 1780|  1.28k|  struct connectdata *conn = data->conn;
 1781|       |
 1782|  1.28k|  DEBUGASSERT(conn);
  ------------------
  |  | 1077|  1.28k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1782:3): [True: 0, False: 1.28k]
  |  Branch (1782:3): [True: 1.28k, False: 0]
  ------------------
 1783|  1.28k|  DEBUGASSERT(conn->scheme);
  ------------------
  |  | 1077|  1.28k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1783:3): [True: 0, False: 1.28k]
  |  Branch (1783:3): [True: 1.28k, False: 0]
  ------------------
 1784|       |
 1785|  1.28k|  if(conn->scheme->run->do_it)
  ------------------
  |  Branch (1785:6): [True: 1.28k, False: 0]
  ------------------
 1786|  1.28k|    result = conn->scheme->run->do_it(data, done);
 1787|       |
 1788|  1.28k|  return result;
 1789|  1.28k|}
multi.c:multistate_did:
 2664|    906|{
 2665|    906|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1077|    906|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2665:3): [True: 0, False: 906]
  |  Branch (2665:3): [True: 906, False: 0]
  ------------------
 2666|    906|  if(data->conn->bits.multiplex)
  ------------------
  |  Branch (2666:6): [True: 0, False: 906]
  ------------------
 2667|       |    /* Check if we can move pending requests to send pipe */
 2668|      0|    process_pending_handles(multi); /* multiplexed */
 2669|       |
 2670|       |  /* Only perform the transfer if there is a good socket to work with.
 2671|       |     Having both BAD is a signal to skip immediately to DONE */
 2672|    906|  if(CONN_SOCK_IDX_VALID(data->conn->recv_idx) ||
  ------------------
  |  |  322|  1.81k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (322:36): [True: 906, False: 0]
  |  |  |  Branch (322:50): [True: 906, False: 0]
  |  |  ------------------
  ------------------
 2673|      0|     CONN_SOCK_IDX_VALID(data->conn->send_idx))
  ------------------
  |  |  322|      0|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (322:36): [True: 0, False: 0]
  |  |  |  Branch (322:50): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2674|    906|    multistate(data, MSTATE_PERFORMING);
  ------------------
  |  |  212|    906|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2675|      0|  else {
 2676|      0|#ifndef CURL_DISABLE_FTP
 2677|      0|    if(data->state.wildcardmatch &&
  ------------------
  |  Branch (2677:8): [True: 0, False: 0]
  ------------------
 2678|      0|       ((data->conn->scheme->flags & PROTOPT_WILDCARD) == 0)) {
  ------------------
  |  |  231|      0|#define PROTOPT_WILDCARD (1 << 12)  /* protocol supports wildcard matching */
  ------------------
  |  Branch (2678:8): [True: 0, False: 0]
  ------------------
 2679|      0|      data->wildcard->state = CURLWC_DONE;
 2680|      0|    }
 2681|      0|#endif
 2682|      0|    multistate(data, MSTATE_DONE);
  ------------------
  |  |  212|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2683|      0|  }
 2684|    906|  return CURLM_CALL_MULTI_PERFORM;
 2685|    906|}
multi.c:multistate_ratelimiting:
 2299|     33|{
 2300|     33|  CURLcode result = CURLE_OK;
 2301|     33|  CURLMcode mresult = CURLM_OK;
 2302|     33|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1077|     33|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2302:3): [True: 0, False: 33]
  |  Branch (2302:3): [True: 33, False: 0]
  ------------------
 2303|       |  /* if both rates are within spec, resume transfer */
 2304|     33|  result = Curl_pgrsCheck(data);
 2305|       |
 2306|     33|  if(result) {
  ------------------
  |  Branch (2306:6): [True: 0, False: 33]
  ------------------
 2307|      0|    if(!(data->conn->scheme->flags & PROTOPT_DUAL) &&
  ------------------
  |  |  208|      0|#define PROTOPT_DUAL (1 << 1)      /* this protocol uses two connections */
  ------------------
  |  Branch (2307:8): [True: 0, False: 0]
  ------------------
 2308|      0|       result != CURLE_HTTP2_STREAM)
  ------------------
  |  Branch (2308:8): [True: 0, False: 0]
  ------------------
 2309|      0|      streamclose(data->conn, "Transfer returned error");
  ------------------
  |  |   96|      0|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   86|      0|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 2310|       |
 2311|      0|    multi_posttransfer(data);
 2312|      0|    multi_done(data, result, TRUE);
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 2313|      0|  }
 2314|     33|  else {
 2315|     33|    if(!mspeed_check(data))
  ------------------
  |  Branch (2315:8): [True: 0, False: 33]
  ------------------
 2316|      0|      mresult = CURLM_CALL_MULTI_PERFORM;
 2317|     33|  }
 2318|     33|  *resultp = result;
 2319|     33|  return mresult;
 2320|     33|}
multi.c:mspeed_check:
 1980|  2.02k|{
 1981|  2.02k|  if(Curl_rlimit_active(&data->progress.dl.rlimit) ||
  ------------------
  |  Branch (1981:6): [True: 361, False: 1.66k]
  ------------------
 1982|  1.66k|     Curl_rlimit_active(&data->progress.ul.rlimit)) {
  ------------------
  |  Branch (1982:6): [True: 64, False: 1.60k]
  ------------------
 1983|       |    /* check if our send/recv limits require idle waits */
 1984|    425|    const struct curltime *pnow = Curl_pgrs_now(data);
 1985|    425|    timediff_t recv_ms, send_ms;
 1986|       |
 1987|    425|    send_ms = Curl_rlimit_wait_ms(&data->progress.ul.rlimit, pnow);
 1988|    425|    recv_ms = Curl_rlimit_wait_ms(&data->progress.dl.rlimit, pnow);
 1989|       |
 1990|    425|    if(send_ms || recv_ms) {
  ------------------
  |  Branch (1990:8): [True: 0, False: 425]
  |  Branch (1990:19): [True: 65, False: 360]
  ------------------
 1991|     65|      if(data->mstate != MSTATE_RATELIMITING) {
  ------------------
  |  Branch (1991:10): [True: 32, False: 33]
  ------------------
 1992|     32|        multistate(data, MSTATE_RATELIMITING);
  ------------------
  |  |  212|     32|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 1993|     32|      }
 1994|     65|      Curl_expire(data, CURLMAX(send_ms, recv_ms), EXPIRE_TOOFAST);
  ------------------
  |  | 1291|     65|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1291:24): [True: 0, False: 65]
  |  |  ------------------
  ------------------
 1995|     65|      Curl_multi_clear_dirty(data);
 1996|     65|      CURL_TRC_M(data, "[RLIMIT] waiting %" FMT_TIMEDIFF_T "ms",
  ------------------
  |  |  148|     65|  do {                                   \
  |  |  149|     65|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|     65|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|     65|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|    130|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 65, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 65]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|    130|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((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|     65|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|     65|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|     65|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 65]
  |  |  ------------------
  ------------------
 1997|     65|                 CURLMAX(send_ms, recv_ms));
 1998|     65|      return CURLE_AGAIN;
 1999|     65|    }
 2000|    360|    else {
 2001|       |      /* when will the rate limits increase next? The transfer needs
 2002|       |       * to run again at that time or it may stall. */
 2003|    360|      send_ms = Curl_rlimit_next_step_ms(&data->progress.ul.rlimit, pnow);
 2004|    360|      recv_ms = Curl_rlimit_next_step_ms(&data->progress.dl.rlimit, pnow);
 2005|    360|      if(send_ms || recv_ms) {
  ------------------
  |  Branch (2005:10): [True: 83, False: 277]
  |  Branch (2005:21): [True: 277, False: 0]
  ------------------
 2006|    360|        timediff_t next_ms = CURLMIN(send_ms, recv_ms);
  ------------------
  |  | 1292|    360|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1292:24): [True: 277, False: 83]
  |  |  ------------------
  ------------------
 2007|    360|        if(!next_ms)
  ------------------
  |  Branch (2007:12): [True: 341, False: 19]
  ------------------
 2008|    341|          next_ms = CURLMAX(send_ms, recv_ms);
  ------------------
  |  | 1291|    341|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1291:24): [True: 64, False: 277]
  |  |  ------------------
  ------------------
 2009|    360|        Curl_expire(data, next_ms, EXPIRE_TOOFAST);
 2010|    360|        CURL_TRC_M(data, "[RLIMIT] next token update in %" FMT_TIMEDIFF_T "ms",
  ------------------
  |  |  148|    360|  do {                                   \
  |  |  149|    360|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|    360|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    360|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|    720|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 360, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 360]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|    720|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((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|    360|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|    360|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|    360|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 360]
  |  |  ------------------
  ------------------
 2011|    360|                   next_ms);
 2012|    360|      }
 2013|    360|    }
 2014|    425|  }
 2015|       |
 2016|  1.96k|  if(data->mstate != MSTATE_PERFORMING) {
  ------------------
  |  Branch (2016:6): [True: 0, False: 1.96k]
  ------------------
 2017|      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]
  |  |  ------------------
  ------------------
 2018|      0|    multistate(data, MSTATE_PERFORMING);
  ------------------
  |  |  212|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2019|      0|  }
 2020|  1.96k|  return CURLE_OK;
 2021|  2.02k|}
multi.c:multistate_performing:
 2026|  1.34k|{
 2027|  1.34k|  char *newurl = NULL;
 2028|  1.34k|  bool retry = FALSE;
  ------------------
  |  | 1054|  1.34k|#define FALSE false
  ------------------
 2029|  1.34k|  CURLMcode mresult = CURLM_OK;
 2030|  1.34k|  CURLcode result = *resultp = CURLE_OK;
 2031|  1.34k|  *stream_errorp = FALSE;
  ------------------
  |  | 1054|  1.34k|#define FALSE false
  ------------------
 2032|       |
 2033|  1.34k|  if(mspeed_check(data) == CURLE_AGAIN)
  ------------------
  |  Branch (2033:6): [True: 0, False: 1.34k]
  ------------------
 2034|      0|    return CURLM_OK;
 2035|       |
 2036|       |  /* read/write data if it is ready to do so */
 2037|  1.34k|  result = Curl_sendrecv(data);
 2038|       |
 2039|  1.34k|  if(data->req.done || (result == CURLE_RECV_ERROR)) {
  ------------------
  |  Branch (2039:6): [True: 60, False: 1.28k]
  |  Branch (2039:24): [True: 477, False: 803]
  ------------------
 2040|       |    /* If CURLE_RECV_ERROR happens early enough, we assume it was a race
 2041|       |     * condition and the server closed the reused connection exactly when we
 2042|       |     * wanted to use it, so figure out if that is indeed the case.
 2043|       |     */
 2044|    537|    CURLcode ret = Curl_retry_request(data, &newurl);
 2045|    537|    if(!ret)
  ------------------
  |  Branch (2045:8): [True: 537, False: 0]
  ------------------
 2046|    537|      retry = !!newurl;
 2047|      0|    else if(!result)
  ------------------
  |  Branch (2047:13): [True: 0, False: 0]
  ------------------
 2048|      0|      result = ret;
 2049|       |
 2050|    537|    if(retry) {
  ------------------
  |  Branch (2050:8): [True: 0, False: 537]
  ------------------
 2051|       |      /* if we are to retry, set the result to OK and consider the
 2052|       |         request as done */
 2053|      0|      result = CURLE_OK;
 2054|      0|      data->req.done = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 2055|      0|    }
 2056|    537|  }
 2057|    803|#ifndef CURL_DISABLE_HTTP
 2058|    803|  else if((result == CURLE_HTTP2_STREAM) &&
  ------------------
  |  Branch (2058:11): [True: 0, False: 803]
  ------------------
 2059|      0|          Curl_h2_http_1_1_error(data)) {
  ------------------
  |  Branch (2059:11): [True: 0, False: 0]
  ------------------
 2060|      0|    CURLcode ret = Curl_retry_request(data, &newurl);
 2061|       |
 2062|      0|    if(!ret) {
  ------------------
  |  Branch (2062:8): [True: 0, False: 0]
  ------------------
 2063|      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]
  |  |  ------------------
  ------------------
 2064|      0|      streamclose(data->conn, "Disconnect HTTP/2 for HTTP/1");
  ------------------
  |  |   96|      0|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   86|      0|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 2065|      0|      data->state.http_neg.wanted = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 2066|      0|      data->state.http_neg.allowed = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 2067|       |      /* clear the error message bit too as we ignore the one we got */
 2068|      0|      data->state.errorbuf = FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 2069|      0|      if(!newurl)
  ------------------
  |  Branch (2069:10): [True: 0, False: 0]
  ------------------
 2070|       |        /* typically for HTTP_1_1_REQUIRED error on first flight */
 2071|      0|        newurl = Curl_bufref_dup(&data->state.url);
  ------------------
  |  |   49|      0|#define Curl_bufref_dup(x) curlx_strdup(Curl_bufref_ptr(x))
  |  |  ------------------
  |  |  |  | 1482|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
 2072|      0|      if(!newurl) {
  ------------------
  |  Branch (2072:10): [True: 0, False: 0]
  ------------------
 2073|      0|        result = CURLE_OUT_OF_MEMORY;
 2074|      0|      }
 2075|      0|      else {
 2076|       |        /* if we are to retry, set the result to OK and consider the request
 2077|       |          as done */
 2078|      0|        retry = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 2079|      0|        result = CURLE_OK;
 2080|      0|        data->req.done = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 2081|      0|      }
 2082|      0|    }
 2083|      0|    else
 2084|      0|      result = ret;
 2085|      0|  }
 2086|  1.34k|#endif
 2087|       |
 2088|  1.34k|  if(result) {
  ------------------
  |  Branch (2088:6): [True: 624, False: 716]
  ------------------
 2089|       |    /*
 2090|       |     * The transfer phase returned error, we mark the connection to get closed
 2091|       |     * to prevent being reused. This is because we cannot possibly know if the
 2092|       |     * connection is in a good shape or not now. Unless it is a protocol which
 2093|       |     * uses two "channels" like FTP, as then the error happened in the data
 2094|       |     * connection.
 2095|       |     */
 2096|       |
 2097|    624|    if(!(data->conn->scheme->flags & PROTOPT_DUAL) &&
  ------------------
  |  |  208|    624|#define PROTOPT_DUAL (1 << 1)      /* this protocol uses two connections */
  ------------------
  |  Branch (2097:8): [True: 624, False: 0]
  ------------------
 2098|    624|       result != CURLE_HTTP2_STREAM)
  ------------------
  |  Branch (2098:8): [True: 624, False: 0]
  ------------------
 2099|    624|      streamclose(data->conn, "Transfer returned error");
  ------------------
  |  |   96|    624|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   86|    624|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 2100|       |
 2101|    624|    multi_posttransfer(data);
 2102|    624|    multi_done(data, result, TRUE);
  ------------------
  |  | 1051|    624|#define TRUE true
  ------------------
 2103|    624|  }
 2104|    716|  else if(data->req.done && !Curl_cwriter_is_paused(data)) {
  ------------------
  |  Branch (2104:11): [True: 60, False: 656]
  |  Branch (2104:29): [True: 60, False: 0]
  ------------------
 2105|     60|    const struct Curl_scheme *handler = data->conn->scheme;
 2106|       |
 2107|       |    /* call this even if the readwrite function returned error */
 2108|     60|    multi_posttransfer(data);
 2109|       |
 2110|       |    /* When we follow redirects or is set to retry the connection, we must to
 2111|       |       go back to the CONNECT state */
 2112|     60|    if(data->req.newurl || retry) {
  ------------------
  |  Branch (2112:8): [True: 0, False: 60]
  |  Branch (2112:28): [True: 0, False: 60]
  ------------------
 2113|      0|      followtype follow = FOLLOW_NONE;
 2114|      0|      if(!retry) {
  ------------------
  |  Branch (2114:10): [True: 0, False: 0]
  ------------------
 2115|       |        /* if the URL is a follow-location and not a retried request then
 2116|       |           figure out the URL here */
 2117|      0|        curlx_free(newurl);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2118|      0|        newurl = data->req.newurl;
 2119|      0|        data->req.newurl = NULL;
 2120|      0|        follow = FOLLOW_REDIR;
 2121|      0|      }
 2122|      0|      else
 2123|      0|        follow = FOLLOW_RETRY;
 2124|      0|      (void)multi_done(data, CURLE_OK, FALSE);
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 2125|       |      /* multi_done() might return CURLE_GOT_NOTHING */
 2126|      0|      result = multi_follow(data, handler, newurl, follow);
 2127|      0|      if(!result) {
  ------------------
  |  Branch (2127:10): [True: 0, False: 0]
  ------------------
 2128|      0|        multistate(data, MSTATE_SETUP);
  ------------------
  |  |  212|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2129|      0|        mresult = CURLM_CALL_MULTI_PERFORM;
 2130|      0|      }
 2131|      0|    }
 2132|     60|    else {
 2133|       |      /* after the transfer is done, go DONE */
 2134|       |
 2135|       |      /* but first check to see if we got a location info even though we are
 2136|       |         not following redirects */
 2137|     60|      if(data->req.location) {
  ------------------
  |  Branch (2137:10): [True: 0, False: 60]
  ------------------
 2138|      0|        curlx_free(newurl);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2139|      0|        newurl = data->req.location;
 2140|      0|        data->req.location = NULL;
 2141|      0|        result = multi_follow(data, handler, newurl, FOLLOW_FAKE);
 2142|      0|        if(result) {
  ------------------
  |  Branch (2142:12): [True: 0, False: 0]
  ------------------
 2143|      0|          *stream_errorp = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 2144|      0|          result = multi_done(data, result, TRUE);
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 2145|      0|        }
 2146|      0|      }
 2147|       |
 2148|     60|      if(!result) {
  ------------------
  |  Branch (2148:10): [True: 60, False: 0]
  ------------------
 2149|     60|        multistate(data, MSTATE_DONE);
  ------------------
  |  |  212|     60|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2150|     60|        mresult = CURLM_CALL_MULTI_PERFORM;
 2151|     60|      }
 2152|     60|    }
 2153|     60|  }
 2154|    656|  else { /* not errored, not done */
 2155|    656|    mspeed_check(data);
 2156|    656|  }
 2157|  1.34k|  curlx_free(newurl);
  ------------------
  |  | 1488|  1.34k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2158|  1.34k|  *resultp = result;
 2159|  1.34k|  return mresult;
 2160|  1.34k|}
multi.c:multistate_done:
 2688|     61|{
 2689|     61|  if(data->conn) {
  ------------------
  |  Branch (2689:6): [True: 61, False: 0]
  ------------------
 2690|     61|    CURLcode result;
 2691|       |
 2692|       |    /* post-transfer command */
 2693|     61|    result = multi_done(data, *presult, FALSE);
  ------------------
  |  | 1054|     61|#define FALSE false
  ------------------
 2694|       |
 2695|       |    /* allow a previously set error code take precedence */
 2696|     61|    if(!(*presult))
  ------------------
  |  Branch (2696:8): [True: 61, False: 0]
  ------------------
 2697|     61|      *presult = result;
 2698|     61|  }
 2699|       |
 2700|     61|#ifndef CURL_DISABLE_FTP
 2701|     61|  if(data->state.wildcardmatch) {
  ------------------
  |  Branch (2701:6): [True: 0, False: 61]
  ------------------
 2702|      0|    if(data->wildcard->state != CURLWC_DONE) {
  ------------------
  |  Branch (2702:8): [True: 0, False: 0]
  ------------------
 2703|       |      /* if a wildcard is set and we are not ending -> lets start again
 2704|       |         with MSTATE_INIT */
 2705|      0|      multistate(data, MSTATE_INIT);
  ------------------
  |  |  212|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2706|      0|      return CURLM_CALL_MULTI_PERFORM;
 2707|      0|    }
 2708|      0|  }
 2709|     61|#endif
 2710|       |  /* after we have DONE what we are supposed to do, go COMPLETED, and
 2711|       |     it does not matter what the multi_done() returned! */
 2712|     61|  multistate(data, MSTATE_COMPLETED);
  ------------------
  |  |  212|     61|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2713|     61|  return CURLM_CALL_MULTI_PERFORM;
 2714|     61|}
multi.c:is_finished:
 2372|  55.3k|{
 2373|  55.3k|  if(data->mstate < MSTATE_COMPLETED) {
  ------------------
  |  Branch (2373:6): [True: 55.3k, False: 61]
  ------------------
 2374|  55.3k|    if(result) {
  ------------------
  |  Branch (2374:8): [True: 12.4k, False: 42.8k]
  ------------------
 2375|       |      /*
 2376|       |       * If an error was returned, and we are not in completed state now,
 2377|       |       * then we go to completed and consider this transfer aborted.
 2378|       |       */
 2379|       |
 2380|       |      /* No attempt to disconnect connections must be made before this -
 2381|       |         connection detach and termination happens only here */
 2382|       |
 2383|       |      /* Check if we can move pending requests to send pipe */
 2384|  12.4k|      process_pending_handles(multi); /* connection */
 2385|       |
 2386|  12.4k|      if(data->conn) {
  ------------------
  |  Branch (2386:10): [True: 0, False: 12.4k]
  ------------------
 2387|      0|        if(stream_error) {
  ------------------
  |  Branch (2387:12): [True: 0, False: 0]
  ------------------
 2388|       |          /* Do not attempt to send data over a connection that timed out */
 2389|      0|          bool dead_connection = result == CURLE_OPERATION_TIMEDOUT;
 2390|      0|          struct connectdata *conn = data->conn;
 2391|       |
 2392|       |          /* This is where we make sure that the conn pointer is reset.
 2393|       |             We do not have to do this in every case block above where a
 2394|       |             failure is detected */
 2395|      0|          Curl_detach_connection(data);
 2396|      0|          Curl_conn_terminate(data, conn, dead_connection);
 2397|      0|        }
 2398|      0|      }
 2399|  12.4k|      else if(data->mstate == MSTATE_CONNECT) {
  ------------------
  |  Branch (2399:15): [True: 1.67k, False: 10.7k]
  ------------------
 2400|       |        /* Curl_connect() failed */
 2401|  1.67k|        multi_posttransfer(data);
 2402|  1.67k|        Curl_pgrsUpdate_nometer(data);
 2403|  1.67k|      }
 2404|       |
 2405|  12.4k|      multistate(data, MSTATE_COMPLETED);
  ------------------
  |  |  212|  12.4k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2406|  12.4k|      return result;
 2407|  12.4k|    }
 2408|       |    /* if there is still a connection to use, call the progress function */
 2409|  42.8k|    else if(data->conn && Curl_conn_is_connected(data->conn, FIRSTSOCKET)) {
  ------------------
  |  |  245|  23.1k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2409:13): [True: 23.1k, False: 19.7k]
  |  Branch (2409:27): [True: 14.0k, False: 9.11k]
  ------------------
 2410|  14.0k|      result = Curl_pgrsUpdate(data);
 2411|  14.0k|      if(result) {
  ------------------
  |  Branch (2411:10): [True: 0, False: 14.0k]
  ------------------
 2412|       |        /* aborted due to progress callback return code must close the
 2413|       |           connection */
 2414|      0|        streamclose(data->conn, "Aborted by callback");
  ------------------
  |  |   96|      0|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   86|      0|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 2415|       |
 2416|       |        /* if not yet in DONE state, go there, otherwise COMPLETED */
 2417|      0|        multistate(data, (data->mstate < MSTATE_DONE) ?
  ------------------
  |  |  212|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  |  |  ------------------
  |  |  |  Branch (212:36): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2418|      0|                   MSTATE_DONE : MSTATE_COMPLETED);
 2419|      0|        return result;
 2420|      0|      }
 2421|  14.0k|    }
 2422|  55.3k|  }
 2423|  42.9k|  return result;
 2424|  55.3k|}
multi.c:handle_completed:
 2429|  12.5k|{
 2430|  12.5k|  if(data->master_mid != UINT32_MAX) {
  ------------------
  |  Branch (2430:6): [True: 278, False: 12.2k]
  ------------------
 2431|       |    /* A sub transfer, not for msgsent to application */
 2432|    278|    struct Curl_easy *mdata;
 2433|       |
 2434|    278|    CURL_TRC_M(data, "sub xfer done for master %u", data->master_mid);
  ------------------
  |  |  148|    278|  do {                                   \
  |  |  149|    278|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|    278|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    278|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|    556|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 278, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 278]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  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]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|    278|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|    278|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|    278|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 278]
  |  |  ------------------
  ------------------
 2435|    278|    mdata = Curl_multi_get_easy(multi, data->master_mid);
 2436|    278|    if(mdata) {
  ------------------
  |  Branch (2436:8): [True: 278, False: 0]
  ------------------
 2437|    278|      if(mdata->sub_xfer_done)
  ------------------
  |  Branch (2437:10): [True: 278, False: 0]
  ------------------
 2438|    278|        mdata->sub_xfer_done(mdata, data, result);
 2439|      0|      else
 2440|      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]
  |  |  ------------------
  ------------------
 2441|    278|                   data->master_mid);
 2442|    278|    }
 2443|      0|    else {
 2444|      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]
  |  |  ------------------
  ------------------
 2445|      0|    }
 2446|    278|  }
 2447|  12.2k|  else {
 2448|       |    /* now fill in the Curl_message with this info */
 2449|  12.2k|    struct Curl_message *msg = &data->msg;
 2450|       |
 2451|  12.2k|    msg->extmsg.msg = CURLMSG_DONE;
 2452|  12.2k|    msg->extmsg.easy_handle = data;
 2453|  12.2k|    msg->extmsg.data.result = result;
 2454|       |
 2455|  12.2k|    multi_addmsg(multi, msg);
 2456|  12.2k|    DEBUGASSERT(!data->conn);
  ------------------
  |  | 1077|  12.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2456:5): [True: 0, False: 12.2k]
  |  Branch (2456:5): [True: 12.2k, False: 0]
  ------------------
 2457|  12.2k|  }
 2458|  12.5k|  multistate(data, MSTATE_MSGSENT);
  ------------------
  |  |  212|  12.5k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2459|       |
 2460|       |  /* remove from the other sets, add to msgsent */
 2461|  12.5k|  Curl_uint32_bset_remove(&multi->process, data->mid);
 2462|  12.5k|  Curl_uint32_bset_remove(&multi->dirty, data->mid);
 2463|  12.5k|  Curl_uint32_bset_remove(&multi->pending, data->mid);
 2464|  12.5k|  Curl_uint32_bset_add(&multi->msgsent, data->mid);
 2465|  12.5k|  if(data->state.really_alive) {
  ------------------
  |  Branch (2465:6): [True: 12.5k, False: 0]
  ------------------
 2466|  12.5k|    data->state.really_alive = FALSE;
  ------------------
  |  | 1054|  12.5k|#define FALSE false
  ------------------
 2467|  12.5k|    --multi->xfers_really_alive;
 2468|  12.5k|    if(!multi->xfers_really_alive)
  ------------------
  |  Branch (2468:8): [True: 12.2k, False: 278]
  ------------------
 2469|  12.2k|      (void)multi_assess_wakeup(multi);
 2470|  12.5k|  }
 2471|  12.5k|  --multi->xfers_alive;
 2472|  12.5k|  if(!multi->xfers_alive)
  ------------------
  |  Branch (2472:6): [True: 12.2k, False: 278]
  ------------------
 2473|  12.2k|    multi_assess_wakeup(multi);
 2474|  12.5k|}
multi.c:multi_addmsg:
  233|  12.2k|{
  234|  12.2k|  if(!Curl_llist_count(&multi->msglist))
  ------------------
  |  Branch (234:6): [True: 12.2k, False: 0]
  ------------------
  235|  12.2k|    CURLM_NTFY(multi->admin, CURLMNOTIFY_INFO_READ);
  ------------------
  |  |   51|  12.2k|  do {                                                \
  |  |   52|  12.2k|    if((d) && (d)->multi && (d)->multi->ntfy.ntfy_cb) \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 12.2k, False: 0]
  |  |  |  Branch (52:15): [True: 12.2k, False: 0]
  |  |  |  Branch (52:29): [True: 0, False: 12.2k]
  |  |  ------------------
  |  |   53|  12.2k|      Curl_mntfy_add((d), (t));                       \
  |  |   54|  12.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (54:11): [Folded, False: 12.2k]
  |  |  ------------------
  ------------------
  236|  12.2k|  Curl_llist_append(&multi->msglist, msg, &msg->list);
  237|  12.2k|}
multi.c:multi_ischanged:
 1725|  90.1k|{
 1726|  90.1k|  bool retval = FALSE;
  ------------------
  |  | 1054|  90.1k|#define FALSE false
  ------------------
 1727|  90.1k|  DEBUGASSERT(multi);
  ------------------
  |  | 1077|  90.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1727:3): [True: 0, False: 90.1k]
  |  Branch (1727:3): [True: 90.1k, False: 0]
  ------------------
 1728|  90.1k|  if(multi) {
  ------------------
  |  Branch (1728:6): [True: 90.1k, False: 0]
  ------------------
 1729|  90.1k|    retval = (bool)multi->recheckstate;
 1730|  90.1k|    if(clear)
  ------------------
  |  Branch (1730:8): [True: 72.5k, False: 17.5k]
  ------------------
 1731|  72.5k|      multi->recheckstate = FALSE;
  ------------------
  |  | 1054|  72.5k|#define FALSE false
  ------------------
 1732|  90.1k|  }
 1733|  90.1k|  return retval;
 1734|  90.1k|}
multi.c:add_next_timeout:
 3138|     11|{
 3139|     11|  struct curltime *tv = &d->state.expiretime;
 3140|     11|  struct Curl_llist *list = &d->state.timeoutlist;
 3141|     11|  struct Curl_llist_node *e;
 3142|       |
 3143|       |  /* move over the timeout list for this specific handle and remove all
 3144|       |     timeouts that are now passed tense and store the next pending
 3145|       |     timeout in *tv */
 3146|     22|  for(e = Curl_llist_head(list); e;) {
  ------------------
  |  Branch (3146:34): [True: 22, False: 0]
  ------------------
 3147|     22|    struct Curl_llist_node *n = Curl_node_next(e);
 3148|     22|    struct time_node *node = Curl_node_elem(e);
 3149|     22|    timediff_t diff = curlx_ptimediff_us(&node->time, pnow);
 3150|     22|    if(diff <= 0)
  ------------------
  |  Branch (3150:8): [True: 11, False: 11]
  ------------------
 3151|       |      /* remove outdated entry */
 3152|     11|      Curl_node_remove(e);
 3153|     11|    else
 3154|       |      /* the list is sorted so get out on the first mismatch */
 3155|     11|      break;
 3156|     11|    e = n;
 3157|     11|  }
 3158|     11|  e = Curl_llist_head(list);
 3159|     11|  if(!e) {
  ------------------
  |  Branch (3159:6): [True: 0, False: 11]
  ------------------
 3160|       |    /* clear the expire times within the handles that we remove from the
 3161|       |       splay tree */
 3162|      0|    tv->tv_sec = 0;
 3163|      0|    tv->tv_usec = 0;
 3164|      0|  }
 3165|     11|  else {
 3166|     11|    struct time_node *node = Curl_node_elem(e);
 3167|       |    /* copy the first entry to 'tv' */
 3168|     11|    memcpy(tv, &node->time, sizeof(*tv));
 3169|       |
 3170|       |    /* Insert this node again into the splay. Keep the timer in the list in
 3171|       |       case we need to recompute future timers. */
 3172|     11|    multi->timetree = Curl_splayinsert(tv, multi->timetree,
 3173|     11|                                       &d->state.timenode);
 3174|     11|  }
 3175|     11|  return CURLM_OK;
 3176|     11|}
multi.c:multi_handle_timeout:
 1819|  38.2k|{
 1820|  38.2k|  timediff_t timeout_ms;
 1821|       |
 1822|  38.2k|  timeout_ms = Curl_timeleft_ms(data);
 1823|  38.2k|  if(timeout_ms < 0) {
  ------------------
  |  Branch (1823:6): [True: 11, False: 38.2k]
  ------------------
 1824|       |    /* Handle timed out */
 1825|     11|    struct curltime since;
 1826|     11|    if(Curl_is_connecting(data))
  ------------------
  |  Branch (1826:8): [True: 11, False: 0]
  ------------------
 1827|     11|      since = data->progress.t_startsingle;
 1828|      0|    else
 1829|      0|      since = data->progress.t_startop;
 1830|     11|    if(data->mstate == MSTATE_CONNECTING)
  ------------------
  |  Branch (1830:8): [True: 9, False: 2]
  ------------------
 1831|      9|      failf(data, "%s timed out after %" FMT_TIMEDIFF_T " milliseconds",
  ------------------
  |  |   62|      9|#define failf Curl_failf
  ------------------
 1832|      9|            data->conn->bits.dns_resolved ? "Connection" : "Resolving",
  ------------------
  |  Branch (1832:13): [True: 3, False: 6]
  ------------------
 1833|      9|            curlx_ptimediff_ms(Curl_pgrs_now(data), &since));
 1834|      2|    else {
 1835|      2|      struct SingleRequest *k = &data->req;
 1836|      2|      if(k->size != -1) {
  ------------------
  |  Branch (1836:10): [True: 0, False: 2]
  ------------------
 1837|      0|        failf(data, "Operation timed out after %" FMT_TIMEDIFF_T
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1838|      0|              " milliseconds with %" FMT_OFF_T " out of %"
 1839|      0|              FMT_OFF_T " bytes received",
 1840|      0|              curlx_ptimediff_ms(Curl_pgrs_now(data), &since),
 1841|      0|              k->bytecount, k->size);
 1842|      0|      }
 1843|      2|      else {
 1844|      2|        failf(data, "Operation timed out after %" FMT_TIMEDIFF_T
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
 1845|      2|              " milliseconds with %" FMT_OFF_T " bytes received",
 1846|      2|              curlx_ptimediff_ms(Curl_pgrs_now(data), &since),
 1847|      2|              k->bytecount);
 1848|      2|      }
 1849|      2|    }
 1850|     11|    *result = CURLE_OPERATION_TIMEDOUT;
 1851|     11|    if(data->conn) {
  ------------------
  |  Branch (1851:8): [True: 10, False: 1]
  ------------------
 1852|       |      /* Force connection closed if the connection has indeed been used */
 1853|     10|      if(data->mstate > MSTATE_DO) {
  ------------------
  |  Branch (1853:10): [True: 0, False: 10]
  ------------------
 1854|      0|        streamclose(data->conn, "Disconnect due to timeout");
  ------------------
  |  |   96|      0|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   86|      0|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 1855|      0|        *stream_error = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 1856|      0|      }
 1857|     10|      (void)multi_done(data, *result, TRUE);
  ------------------
  |  | 1051|     10|#define TRUE true
  ------------------
 1858|     10|    }
 1859|     11|    return TRUE;
  ------------------
  |  | 1051|     11|#define TRUE true
  ------------------
 1860|     11|  }
 1861|       |
 1862|  38.2k|  return FALSE;
  ------------------
  |  | 1054|  38.2k|#define FALSE false
  ------------------
 1863|  38.2k|}
multi.c:move_pending_to_connect:
 3847|    178|{
 3848|    178|  DEBUGASSERT(data->mstate == MSTATE_PENDING);
  ------------------
  |  | 1077|    178|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3848:3): [True: 0, False: 178]
  |  Branch (3848:3): [True: 178, False: 0]
  ------------------
 3849|       |
 3850|       |  /* Remove this node from the pending set, add into process set */
 3851|    178|  Curl_uint32_bset_remove(&multi->pending, data->mid);
 3852|    178|  Curl_uint32_bset_add(&multi->process, data->mid);
 3853|       |
 3854|    178|  multistate(data, MSTATE_CONNECT);
  ------------------
  |  |  212|    178|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 3855|    178|  Curl_multi_mark_dirty(data); /* make it run */
 3856|    178|}
multi.c:multi_deltimeout:
 3655|  18.1k|{
 3656|  18.1k|  struct Curl_llist_node *e;
 3657|  18.1k|  struct Curl_llist *timeoutlist = &data->state.timeoutlist;
 3658|       |  /* find and remove the specific node from the list */
 3659|  26.5k|  for(e = Curl_llist_head(timeoutlist); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (3659:41): [True: 8.96k, False: 17.6k]
  ------------------
 3660|  8.96k|    struct time_node *n = Curl_node_elem(e);
 3661|  8.96k|    if(n->eid == eid) {
  ------------------
  |  Branch (3661:8): [True: 502, False: 8.46k]
  ------------------
 3662|    502|      Curl_node_remove(e);
 3663|    502|      return;
 3664|    502|    }
 3665|  8.96k|  }
 3666|  18.1k|}
multi.c:multi_addtimeout:
 3678|  10.7k|{
 3679|  10.7k|  struct Curl_llist_node *e;
 3680|  10.7k|  struct time_node *node;
 3681|  10.7k|  struct Curl_llist_node *prev = NULL;
 3682|  10.7k|  size_t n;
 3683|  10.7k|  struct Curl_llist *timeoutlist = &data->state.timeoutlist;
 3684|       |
 3685|  10.7k|  node = &data->state.expires[eid];
 3686|       |
 3687|       |  /* copy the timestamp and id */
 3688|  10.7k|  memcpy(&node->time, stamp, sizeof(*stamp));
 3689|  10.7k|  node->eid = eid; /* also marks it as in use */
 3690|       |
 3691|  10.7k|  n = Curl_llist_count(timeoutlist);
 3692|  10.7k|  if(n) {
  ------------------
  |  Branch (3692:6): [True: 1.01k, False: 9.76k]
  ------------------
 3693|       |    /* find the correct spot in the list */
 3694|  2.03k|    for(e = Curl_llist_head(timeoutlist); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (3694:43): [True: 1.09k, False: 939]
  ------------------
 3695|  1.09k|      struct time_node *check = Curl_node_elem(e);
 3696|  1.09k|      timediff_t diff = curlx_ptimediff_ms(&check->time, &node->time);
 3697|  1.09k|      if(diff > 0)
  ------------------
  |  Branch (3697:10): [True: 79, False: 1.01k]
  ------------------
 3698|     79|        break;
 3699|  1.01k|      prev = e;
 3700|  1.01k|    }
 3701|  1.01k|  }
 3702|       |  /* else
 3703|       |     this is the first timeout on the list */
 3704|       |
 3705|  10.7k|  Curl_llist_insert_next(timeoutlist, prev, node, &node->list);
 3706|  10.7k|  CURL_TRC_TIMER(data, eid, "set for %" FMT_TIMEDIFF_T "us",
  ------------------
  |  |  173|  10.7k|  do {                                        \
  |  |  174|  10.7k|    if(CURL_TRC_TIMER_is_verbose(data))       \
  |  |  ------------------
  |  |  |  |  139|  10.7k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_timer)
  |  |  |  |  ------------------
  |  |  |  |  |  |  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]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  175|  10.7k|      Curl_trc_timer(data, tid, __VA_ARGS__); \
  |  |  176|  10.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (176:11): [Folded, False: 10.7k]
  |  |  ------------------
  ------------------
 3707|  10.7k|                 curlx_ptimediff_us(&node->time, Curl_pgrs_now(data)));
 3708|  10.7k|  return CURLM_OK;
 3709|  10.7k|}
multi.c:process_pending_handles:
 3873|  50.6k|{
 3874|  50.6k|  uint32_t mid = multi->last_pending_mid;
 3875|       |
 3876|  50.6k|  if(mid) {
  ------------------
  |  Branch (3876:6): [True: 178, False: 50.4k]
  ------------------
 3877|    178|    while(Curl_uint32_bset_next(&multi->pending, mid, &mid)) {
  ------------------
  |  Branch (3877:11): [True: 0, False: 178]
  ------------------
 3878|      0|      struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 3879|      0|      if(data) {
  ------------------
  |  Branch (3879:10): [True: 0, False: 0]
  ------------------
 3880|      0|        move_pending_to_connect(multi, data);
 3881|      0|        multi->last_pending_mid = mid;
 3882|      0|        return;
 3883|      0|      }
 3884|       |      /* transfer no longer known, should not happen */
 3885|      0|      Curl_uint32_bset_remove(&multi->pending, mid);
 3886|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3886:7): [Folded, False: 0]
  |  Branch (3886:7): [Folded, False: 0]
  ------------------
 3887|      0|    }
 3888|       |    /* found no pending transfers with `mid` larger than `last_pending_mid`.
 3889|       |     * Start at the beginning of the pending set again. */
 3890|    178|    multi->last_pending_mid = 0;
 3891|    178|  }
 3892|       |
 3893|  50.6k|  if(Curl_uint32_bset_first(&multi->pending, &mid)) {
  ------------------
  |  Branch (3893:6): [True: 178, False: 50.4k]
  ------------------
 3894|    178|    do {
 3895|    178|      struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 3896|    178|      if(data) {
  ------------------
  |  Branch (3896:10): [True: 178, False: 0]
  ------------------
 3897|    178|        move_pending_to_connect(multi, data);
 3898|    178|        multi->last_pending_mid = mid;
 3899|    178|        return;
 3900|    178|      }
 3901|       |      /* transfer no longer known, should not happen */
 3902|      0|      Curl_uint32_bset_remove(&multi->pending, mid);
 3903|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3903:7): [Folded, False: 0]
  |  Branch (3903:7): [Folded, False: 0]
  ------------------
 3904|      0|    } while(Curl_uint32_bset_next(&multi->pending, mid, &mid));
  ------------------
  |  Branch (3904:13): [True: 0, False: 0]
  ------------------
 3905|    178|  }
 3906|  50.6k|}
multi.c:multi_xfer_bufs_free:
 4145|  13.0k|{
 4146|  13.0k|  DEBUGASSERT(multi);
  ------------------
  |  | 1077|  13.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4146:3): [True: 0, False: 13.0k]
  |  Branch (4146:3): [True: 13.0k, False: 0]
  ------------------
 4147|  13.0k|  curlx_safefree(multi->xfer_buf);
  ------------------
  |  | 1332|  13.0k|  do {                      \
  |  | 1333|  13.0k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  13.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  13.0k|    (ptr) = NULL;           \
  |  | 1335|  13.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 13.0k]
  |  |  ------------------
  ------------------
 4148|  13.0k|  multi->xfer_buf_len = 0;
 4149|  13.0k|  multi->xfer_buf_borrowed = FALSE;
  ------------------
  |  | 1054|  13.0k|#define FALSE false
  ------------------
 4150|  13.0k|  curlx_safefree(multi->xfer_ulbuf);
  ------------------
  |  | 1332|  13.0k|  do {                      \
  |  | 1333|  13.0k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  13.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  13.0k|    (ptr) = NULL;           \
  |  | 1335|  13.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 13.0k]
  |  |  ------------------
  ------------------
 4151|  13.0k|  multi->xfer_ulbuf_len = 0;
 4152|  13.0k|  multi->xfer_ulbuf_borrowed = FALSE;
  ------------------
  |  | 1054|  13.0k|#define FALSE false
  ------------------
 4153|  13.0k|  curlx_safefree(multi->xfer_sockbuf);
  ------------------
  |  | 1332|  13.0k|  do {                      \
  |  | 1333|  13.0k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  13.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  13.0k|    (ptr) = NULL;           \
  |  | 1335|  13.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 13.0k]
  |  |  ------------------
  ------------------
 4154|  13.0k|  multi->xfer_sockbuf_len = 0;
 4155|       |  multi->xfer_sockbuf_borrowed = FALSE;
  ------------------
  |  | 1054|  13.0k|#define FALSE false
  ------------------
 4156|  13.0k|}

Curl_multi_ev_socket_done:
  618|  7.41k|{
  619|  7.41k|  mev_forget_socket(multi, data, s, "socket done");
  620|  7.41k|}
Curl_multi_ev_xfer_done:
  624|  13.6k|{
  625|  13.6k|  DEBUGASSERT(!data->conn); /* transfer should have been detached */
  ------------------
  |  | 1077|  13.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (625:3): [True: 0, False: 13.6k]
  |  Branch (625:3): [True: 13.6k, False: 0]
  ------------------
  626|  13.6k|  (void)mev_assess(multi, data, NULL);
  627|  13.6k|  Curl_meta_remove(data, CURL_META_MEV_POLLSET);
  ------------------
  |  |   34|  13.6k|#define CURL_META_MEV_POLLSET   "meta:mev:ps"
  ------------------
  628|  13.6k|}
Curl_multi_ev_conn_done:
  633|  7.93k|{
  634|  7.93k|  (void)mev_assess(multi, data, conn);
  635|  7.93k|  Curl_conn_meta_remove(conn, CURL_META_MEV_POLLSET);
  ------------------
  |  |   34|  7.93k|#define CURL_META_MEV_POLLSET   "meta:mev:ps"
  ------------------
  636|  7.93k|}
Curl_multi_ev_init:
  639|  13.0k|{
  640|  13.0k|  Curl_hash_init(&multi->ev.sh_entries, hashsize, mev_sh_entry_hash,
  641|  13.0k|                 mev_sh_entry_compare, mev_sh_entry_dtor);
  642|  13.0k|}
Curl_multi_ev_cleanup:
  645|  13.0k|{
  646|  13.0k|  Curl_hash_destroy(&multi->ev.sh_entries);
  647|  13.0k|}
multi_ev.c:mev_assess:
  500|  21.6k|{
  501|  21.6k|  struct easy_pollset ps, *last_ps;
  502|  21.6k|  CURLMcode mresult = CURLM_OK;
  503|       |
  504|  21.6k|  if(!multi || !multi->socket_cb)
  ------------------
  |  Branch (504:6): [True: 0, False: 21.6k]
  |  Branch (504:16): [True: 21.6k, False: 0]
  ------------------
  505|  21.6k|    return CURLM_OK;
  506|       |
  507|      0|  Curl_pollset_init(&ps);
  508|      0|  if(conn) {
  ------------------
  |  Branch (508:6): [True: 0, False: 0]
  ------------------
  509|      0|    CURLcode result = Curl_conn_adjust_pollset(data, conn, &ps);
  510|      0|    if(result) {
  ------------------
  |  Branch (510:8): [True: 0, False: 0]
  ------------------
  511|      0|      mresult = (result == CURLE_OUT_OF_MEMORY) ?
  ------------------
  |  Branch (511:17): [True: 0, False: 0]
  ------------------
  512|      0|        CURLM_OUT_OF_MEMORY : CURLM_INTERNAL_ERROR;
  513|      0|      goto out;
  514|      0|    }
  515|      0|  }
  516|      0|  else
  517|      0|    Curl_multi_pollset(data, &ps);
  518|      0|  last_ps = mev_get_last_pollset(data, conn);
  519|       |
  520|      0|  if(!last_ps && ps.n) {
  ------------------
  |  Branch (520:6): [True: 0, False: 0]
  |  Branch (520:18): [True: 0, False: 0]
  ------------------
  521|      0|    if(conn)
  ------------------
  |  Branch (521:8): [True: 0, False: 0]
  ------------------
  522|      0|      last_ps = mev_add_new_conn_pollset(conn);
  523|      0|    else
  524|      0|      last_ps = mev_add_new_xfer_pollset(data);
  525|      0|    if(!last_ps) {
  ------------------
  |  Branch (525:8): [True: 0, False: 0]
  ------------------
  526|      0|      mresult = CURLM_OUT_OF_MEMORY;
  527|      0|      goto out;
  528|      0|    }
  529|      0|  }
  530|       |
  531|      0|  if(last_ps)
  ------------------
  |  Branch (531:6): [True: 0, False: 0]
  ------------------
  532|      0|    mresult = mev_pollset_diff(multi, data, conn, &ps, last_ps);
  533|      0|  else
  534|      0|    DEBUGASSERT(!ps.n);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (534:5): [True: 0, False: 0]
  |  Branch (534:5): [True: 0, False: 0]
  ------------------
  535|      0|out:
  536|      0|  Curl_pollset_cleanup(&ps);
  537|      0|  return mresult;
  538|      0|}
multi_ev.c:mev_sh_entry_get:
   93|  7.41k|{
   94|  7.41k|  if(s != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  7.41k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (94:6): [True: 7.41k, False: 0]
  ------------------
   95|       |    /* only look for proper sockets */
   96|  7.41k|    return Curl_hash_pick(sh, (char *)&s, sizeof(curl_socket_t));
   97|  7.41k|  }
   98|      0|  return NULL;
   99|  7.41k|}
multi_ev.c:mev_forget_socket:
  200|  7.41k|{
  201|  7.41k|  struct mev_sh_entry *entry = mev_sh_entry_get(&multi->ev.sh_entries, s);
  202|  7.41k|  int rc = 0;
  203|       |
  204|  7.41k|  if(!entry) /* we never knew or already forgot about this socket */
  ------------------
  |  Branch (204:6): [True: 7.41k, False: 0]
  ------------------
  205|  7.41k|    return CURLM_OK;
  206|       |
  207|       |  /* We managed this socket before, tell the socket callback to forget it. */
  208|      0|  if(entry->announced && multi->socket_cb) {
  ------------------
  |  Branch (208:6): [True: 0, False: 0]
  |  Branch (208:26): [True: 0, False: 0]
  ------------------
  209|      0|    NOVERBOSE((void)cause);
  ------------------
  |  | 1624|      0|#define NOVERBOSE(x) Curl_nop_stmt
  |  |  ------------------
  |  |  |  | 1185|      0|#define Curl_nop_stmt do {} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1185:35): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  210|      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]
  |  |  ------------------
  ------------------
  211|      0|    mev_in_callback(multi, IN_CALLBACK_FORBID_EASY_PAUSE);
  ------------------
  |  |   50|      0|#define IN_CALLBACK_FORBID_EASY_PAUSE 2
  ------------------
  212|      0|    rc = multi->socket_cb(data, s, CURL_POLL_REMOVE,
  ------------------
  |  |  286|      0|#define CURL_POLL_REMOVE 4
  ------------------
  213|      0|                          multi->socket_userp, entry->user_data);
  214|      0|    mev_in_callback(multi, IN_CALLBACK_NO);
  ------------------
  |  |   48|      0|#define IN_CALLBACK_NO                0
  ------------------
  215|      0|    entry = mev_sh_entry_get(&multi->ev.sh_entries, s);
  216|      0|    if(entry)
  ------------------
  |  Branch (216:8): [True: 0, False: 0]
  ------------------
  217|      0|      entry->announced = FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  218|      0|  }
  219|       |
  220|      0|  mev_sh_entry_kill(multi, s);
  221|      0|  if(rc == -1) {
  ------------------
  |  Branch (221:6): [True: 0, False: 0]
  ------------------
  222|      0|    multi->dead = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  223|      0|    return CURLM_ABORTED_BY_CALLBACK;
  224|      0|  }
  225|      0|  return CURLM_OK;
  226|      0|}

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

Curl_netrc_scan:
  581|      5|{
  582|      5|  NETRCcode retcode = NETRC_OK;
  583|       |
  584|      5|  CURL_TRC_M(data, "[NETRC] scanning '%s' for host '%s' user '%s'",
  ------------------
  |  |  148|      5|  do {                                   \
  |  |  149|      5|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      5|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  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]
  |  |  ------------------
  ------------------
  585|      5|             netrcfile, hostname, user);
  586|      5|  Curl_creds_unlink(pcreds);
  587|      5|  if(!netrcfile) {
  ------------------
  |  Branch (587:6): [True: 0, False: 5]
  ------------------
  588|      0|    char *home = NULL;
  589|      0|    char *homea = NULL;
  590|      0|    char *filealloc = NULL;
  591|      0|#if defined(HAVE_GETPWUID_R) && defined(HAVE_GETEUID)
  592|      0|    char pwbuf[1024];
  593|      0|#endif
  594|      0|    filealloc = curl_getenv("NETRC");
  595|      0|    if(!filealloc) {
  ------------------
  |  Branch (595:8): [True: 0, False: 0]
  ------------------
  596|      0|      homea = curl_getenv("HOME"); /* portable environment reader */
  597|      0|      if(homea) {
  ------------------
  |  Branch (597:10): [True: 0, False: 0]
  ------------------
  598|      0|        home = homea;
  599|      0|#if defined(HAVE_GETPWUID_R) && defined(HAVE_GETEUID)
  600|      0|      }
  601|      0|      else {
  602|      0|        struct passwd pw, *pw_res;
  603|      0|        if(!getpwuid_r(geteuid(), &pw, pwbuf, sizeof(pwbuf), &pw_res) &&
  ------------------
  |  Branch (603:12): [True: 0, False: 0]
  ------------------
  604|      0|           pw_res) {
  ------------------
  |  Branch (604:12): [True: 0, False: 0]
  ------------------
  605|      0|          home = pw.pw_dir;
  606|      0|        }
  607|       |#elif defined(HAVE_GETPWUID) && defined(HAVE_GETEUID)
  608|       |      }
  609|       |      else {
  610|       |        struct passwd *pw;
  611|       |        pw = getpwuid(geteuid());
  612|       |        if(pw) {
  613|       |          home = pw->pw_dir;
  614|       |        }
  615|       |#elif defined(_WIN32)
  616|       |      }
  617|       |      else {
  618|       |        homea = curl_getenv("USERPROFILE");
  619|       |        if(homea) {
  620|       |          home = homea;
  621|       |        }
  622|       |#endif
  623|      0|      }
  624|       |
  625|      0|      if(!home)
  ------------------
  |  Branch (625:10): [True: 0, False: 0]
  ------------------
  626|      0|        return NETRC_FILE_MISSING; /* no home directory found (or possibly out
  627|       |                                      of memory) */
  628|       |
  629|      0|      filealloc = curl_maprintf("%s%s.netrc", home, DIR_CHAR);
  ------------------
  |  |  675|      0|#  define DIR_CHAR      "/"
  ------------------
  630|      0|      if(!filealloc) {
  ------------------
  |  Branch (630:10): [True: 0, False: 0]
  ------------------
  631|      0|        curlx_free(homea);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  632|      0|        retcode = NETRC_OUT_OF_MEMORY;
  633|      0|        goto out;
  634|      0|      }
  635|      0|    }
  636|      0|    retcode = netrc_scan_file(
  637|      0|      data, store, hostname, user, filealloc, pcreds);
  638|      0|    curlx_free(filealloc);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  639|       |#ifdef _WIN32
  640|       |    if(retcode == NETRC_FILE_MISSING) {
  641|       |      /* fallback to the old-style "_netrc" file */
  642|       |      filealloc = curl_maprintf("%s%s_netrc", home, DIR_CHAR);
  643|       |      if(!filealloc) {
  644|       |        curlx_free(homea);
  645|       |        return NETRC_OUT_OF_MEMORY;
  646|       |      }
  647|       |      retcode = netrc_scan_file(
  648|       |        data, store, hostname, user, filealloc, pcreds);
  649|       |      curlx_free(filealloc);
  650|       |    }
  651|       |#endif
  652|      0|    curlx_free(homea);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  653|      0|  }
  654|      5|  else
  655|      5|    retcode = netrc_scan_file(
  656|      5|      data, store, hostname, user, netrcfile, pcreds);
  657|       |
  658|      5|out:
  659|      5|  if(retcode)
  ------------------
  |  Branch (659:6): [True: 5, False: 0]
  ------------------
  660|      5|    Curl_creds_unlink(pcreds);
  661|      5|  return retcode;
  662|      5|}
Curl_netrc_init:
  665|  28.3k|{
  666|  28.3k|  curlx_dyn_init(&store->filebuf, MAX_NETRC_FILE);
  ------------------
  |  |   77|  28.3k|#define MAX_NETRC_FILE  (128 * 1024)
  ------------------
  667|  28.3k|  store->loaded = FALSE;
  ------------------
  |  | 1054|  28.3k|#define FALSE false
  ------------------
  668|       |  store->filename = NULL;
  669|  28.3k|}
Curl_netrc_cleanup:
  671|  36.2k|{
  672|  36.2k|  curlx_dyn_free(&store->filebuf);
  673|  36.2k|  curlx_safefree(store->filename);
  ------------------
  |  | 1332|  36.2k|  do {                      \
  |  | 1333|  36.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  36.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  36.2k|    (ptr) = NULL;           \
  |  | 1335|  36.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 36.2k]
  |  |  ------------------
  ------------------
  674|       |  store->loaded = FALSE;
  ------------------
  |  | 1054|  36.2k|#define FALSE false
  ------------------
  675|  36.2k|}
netrc.c:netrc_scan_file:
  546|      5|{
  547|      5|  struct dynbuf *filebuf = &store->filebuf;
  548|       |
  549|      5|  if(!store->loaded || strcmp(netrcfile, store->filename)) {
  ------------------
  |  Branch (549:6): [True: 5, False: 0]
  |  Branch (549:24): [True: 0, False: 0]
  ------------------
  550|      5|    NETRCcode ret;
  551|      5|    store->loaded = FALSE;
  ------------------
  |  | 1054|      5|#define FALSE false
  ------------------
  552|      5|    ret = file2memory(netrcfile, filebuf);
  553|      5|    if(ret) {
  ------------------
  |  Branch (553:8): [True: 0, False: 5]
  ------------------
  554|      0|      CURL_TRC_M(data, "[NETRC] could not load '%s'", netrcfile);
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  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]
  |  |  ------------------
  ------------------
  555|      0|      return ret;
  556|      0|    }
  557|      5|    curlx_free(store->filename);
  ------------------
  |  | 1488|      5|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  558|      5|    store->filename = curlx_strdup(netrcfile);
  ------------------
  |  | 1482|      5|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  559|      5|    if(!store->filename) {
  ------------------
  |  Branch (559:8): [True: 0, False: 5]
  ------------------
  560|      0|      curlx_dyn_reset(&store->filebuf);
  561|      0|      return NETRC_OUT_OF_MEMORY;
  562|      0|    }
  563|      5|    store->loaded = TRUE;
  ------------------
  |  | 1051|      5|#define TRUE true
  ------------------
  564|      5|  }
  565|       |
  566|      5|  return netrc_scan(data, curlx_dyn_ptr(filebuf), hostname, user, pcreds);
  567|      5|}
netrc.c:file2memory:
  502|      5|{
  503|      5|  NETRCcode ret = NETRC_FILE_MISSING; /* if it cannot open the file */
  504|      5|  FILE *file = curlx_fopen(filename, FOPEN_READTEXT);
  ------------------
  |  |   74|      5|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
  505|       |
  506|      5|  curlx_dyn_reset(filebuf);
  507|      5|  if(file) {
  ------------------
  |  Branch (507:6): [True: 5, False: 0]
  ------------------
  508|      5|    curlx_struct_stat stat;
  ------------------
  |  |   63|      5|#define curlx_struct_stat       struct stat
  ------------------
  509|      5|    if((curlx_fstat(fileno(file), &stat) == -1) || !S_ISDIR(stat.st_mode)) {
  ------------------
  |  |   62|      5|#define curlx_fstat             fstat
  ------------------
  |  Branch (509:8): [True: 0, False: 5]
  |  Branch (509:52): [True: 5, False: 0]
  ------------------
  510|      5|      CURLcode result = CURLE_OK;
  511|      5|      bool eof;
  512|      5|      struct dynbuf linebuf;
  513|      5|      curlx_dyn_init(&linebuf, MAX_NETRC_LINE);
  ------------------
  |  |   76|      5|#define MAX_NETRC_LINE  16384
  ------------------
  514|      5|      ret = NETRC_OK;
  515|      5|      do {
  516|      5|        const char *line;
  517|       |        /* Curl_get_line always returns lines ending with a newline */
  518|      5|        result = Curl_get_line(&linebuf, file, &eof);
  519|      5|        if(!result) {
  ------------------
  |  Branch (519:12): [True: 5, False: 0]
  ------------------
  520|      5|          line = curlx_dyn_ptr(&linebuf);
  521|       |          /* skip comments on load */
  522|      5|          curlx_str_passblanks(&line);
  523|      5|          if(*line == '#')
  ------------------
  |  Branch (523:14): [True: 0, False: 5]
  ------------------
  524|      0|            continue;
  525|      5|          result = curlx_dyn_add(filebuf, line);
  526|      5|        }
  527|      5|        if(result) {
  ------------------
  |  Branch (527:12): [True: 0, False: 5]
  ------------------
  528|      0|          curlx_dyn_free(filebuf);
  529|      0|          ret = curl2netrc(result);
  ------------------
  |  |   84|      0|  ((!(r)) ? NETRC_OK : (((r) == CURLE_OUT_OF_MEMORY) ? \
  |  |  ------------------
  |  |  |  Branch (84:4): [True: 0, False: 0]
  |  |  |  Branch (84:25): [True: 0, False: 0]
  |  |  ------------------
  |  |   85|      0|   NETRC_OUT_OF_MEMORY : NETRC_SYNTAX_ERROR))
  ------------------
  530|      0|          break;
  531|      0|        }
  532|      5|      } while(!eof);
  ------------------
  |  Branch (532:15): [True: 0, False: 5]
  ------------------
  533|      5|      curlx_dyn_free(&linebuf);
  534|      5|    }
  535|      5|    curlx_fclose(file);
  ------------------
  |  |   79|      5|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  536|      5|  }
  537|      5|  return ret;
  538|      5|}
netrc.c:netrc_scan:
  426|      5|{
  427|      5|  struct netrc_scanner sc;
  428|      5|  NETRCcode rc = NETRC_OK;
  429|       |
  430|      5|  Curl_creds_unlink(pcreds);
  431|      5|  netrc_scan_init(&sc, data, content, hostname, user);
  432|       |
  433|      5|  while(!rc && !sc.found) {
  ------------------
  |  Branch (433:9): [True: 5, False: 0]
  |  Branch (433:16): [True: 5, False: 0]
  ------------------
  434|      5|    rc = netrc_lexer_next(&sc.lexer, FALSE);
  ------------------
  |  | 1054|      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);
  ------------------
  |  | 1051|      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;
  ------------------
  |  | 1054|      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;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  468|      0|        break;
  469|      0|      case NETRC_TOK_ACCOUNT:
  ------------------
  |  Branch (469:7): [True: 0, False: 5]
  ------------------
  470|      0|        rc = netrc_scan_literal(&sc, NULL); /* ignore, not used */
  471|      0|        break;
  472|      0|      case NETRC_TOK_LOGIN:
  ------------------
  |  Branch (472:7): [True: 0, False: 5]
  ------------------
  473|      0|        rc = netrc_scan_literal(&sc, &sc.login);
  474|      0|        break;
  475|      0|      case NETRC_TOK_PASSWD:
  ------------------
  |  Branch (475:7): [True: 0, False: 5]
  ------------------
  476|      0|        rc = netrc_scan_literal(&sc, &sc.passwd);
  477|      0|        break;
  478|      0|      case NETRC_TOK_MACDEF:
  ------------------
  |  Branch (478:7): [True: 0, False: 5]
  ------------------
  479|      0|        netrc_skip_to_empty_line(&sc.lexer);
  480|      0|        break;
  481|      0|      case NETRC_TOK_LITERAL:
  ------------------
  |  Branch (481:7): [True: 0, False: 5]
  ------------------
  482|      0|      case NETRC_TOK_JUNK:
  ------------------
  |  Branch (482:7): [True: 0, False: 5]
  ------------------
  483|      0|      default:
  ------------------
  |  Branch (483:7): [True: 0, False: 5]
  ------------------
  484|       |        /* skip this */
  485|      0|        break;
  486|      5|      }
  487|      5|    }
  488|      5|  }
  489|       |
  490|      5|out:
  491|      5|  if(!rc) {
  ------------------
  |  Branch (491:6): [True: 5, False: 0]
  ------------------
  492|      5|    if(sc.creds)
  ------------------
  |  Branch (492:8): [True: 0, False: 5]
  ------------------
  493|      0|      Curl_creds_link(pcreds, sc.creds);
  494|      5|    else
  495|      5|      rc = NETRC_NO_MATCH;
  496|      5|  }
  497|      5|  netrc_scan_cleanup(&sc);
  498|      5|  return rc;
  499|      5|}
netrc.c:netrc_scan_init:
  343|      5|{
  344|      5|  memset(sc, 0, sizeof(*sc));
  345|      5|  netrc_lexer_init(&sc->lexer, data, content);
  346|      5|  sc->hostname = hostname;
  347|      5|  sc->user = (user && user[0]) ? user : NULL;
  ------------------
  |  Branch (347:15): [True: 5, False: 0]
  |  Branch (347:23): [True: 2, False: 3]
  ------------------
  348|      5|  netrc_scan_reset(sc);
  349|      5|}
netrc.c:netrc_lexer_init:
  139|      5|{
  140|      5|  curlx_dyn_init(&lexer->literal, MAX_NETRC_TOKEN);
  ------------------
  |  |   78|      5|#define MAX_NETRC_TOKEN 4096
  ------------------
  141|      5|  lexer->data = data;
  142|      5|  lexer->content = lexer->pos = content;
  143|      5|}
netrc.c:netrc_scan_reset:
  332|     15|{
  333|     15|  curlx_safefree(sc->login);
  ------------------
  |  | 1332|     15|  do {                      \
  |  | 1333|     15|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|     15|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|     15|    (ptr) = NULL;           \
  |  | 1335|     15|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 15]
  |  |  ------------------
  ------------------
  334|     15|  curlx_safefree(sc->passwd);
  ------------------
  |  | 1332|     15|  do {                      \
  |  | 1333|     15|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|     15|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|     15|    (ptr) = NULL;           \
  |  | 1335|     15|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 15]
  |  |  ------------------
  ------------------
  335|       |  sc->matches_host = FALSE;
  ------------------
  |  | 1054|     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;
  ------------------
  |  | 1054|      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;
  ------------------
  |  | 1051|      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;
  ------------------
  |  | 1051|      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|}

openldap.c:oldap_setup_connection:
  243|  7.83k|{
  244|  7.83k|  CURLcode result;
  245|  7.83k|  LDAPURLDesc *lud;
  246|  7.83k|  (void)conn;
  247|       |
  248|       |  /* Early URL syntax check. */
  249|  7.83k|  result = oldap_url_parse(data, &lud);
  250|  7.83k|  ldap_free_urldesc(lud);
  251|       |
  252|  7.83k|  return result;
  253|  7.83k|}
openldap.c:oldap_url_parse:
  165|  9.11k|{
  166|  9.11k|  CURLcode result = CURLE_OK;
  167|  9.11k|  int rc;
  168|  9.11k|  static const char * const url_errs[] = {
  169|  9.11k|    "success",
  170|  9.11k|    "out of memory",
  171|  9.11k|    "bad parameter",
  172|  9.11k|    "unrecognized scheme",
  173|  9.11k|    "unbalanced delimiter",
  174|  9.11k|    "bad URL",
  175|  9.11k|    "bad host or port",
  176|  9.11k|    "bad or missing attributes",
  177|  9.11k|    "bad or missing scope",
  178|  9.11k|    "bad or missing filter",
  179|  9.11k|    "bad or missing extensions"
  180|  9.11k|  };
  181|       |
  182|  9.11k|  *ludp = NULL;
  183|       |  /* `ldap_url_parse() seems to be terrible with urls
  184|       |   * that have user/pass/options in it. So when we have options or
  185|       |   * creds from the url, fail without calling the function.
  186|       |   * Yes, this is super-weird code and I do not like it. */
  187|  9.11k|  if((data->state.creds && (data->state.creds->source == CREDS_URL)) ||
  ------------------
  |  |   30|    197|#define CREDS_URL    1 /* username/passwd from URL */
  ------------------
  |  Branch (187:7): [True: 197, False: 8.91k]
  |  Branch (187:28): [True: 40, False: 157]
  ------------------
  188|  9.07k|     data->state.up.options)
  ------------------
  |  Branch (188:6): [True: 0, False: 9.07k]
  ------------------
  189|     40|    rc = LDAP_URL_ERR_BADURL;
  190|  9.07k|  else
  191|  9.07k|    rc = ldap_url_parse(Curl_bufref_ptr(&data->state.url), ludp);
  192|       |
  193|  9.11k|  if(rc != LDAP_URL_SUCCESS) {
  ------------------
  |  Branch (193:6): [True: 149, False: 8.96k]
  ------------------
  194|    149|    const char *msg = "url parsing problem";
  195|       |
  196|    149|    result = rc == LDAP_URL_ERR_MEM ? CURLE_OUT_OF_MEMORY :
  ------------------
  |  Branch (196:14): [True: 0, False: 149]
  ------------------
  197|    149|      CURLE_URL_MALFORMAT;
  198|    149|    rc -= LDAP_URL_SUCCESS;
  199|    149|    if((size_t)rc < CURL_ARRAYSIZE(url_errs))
  ------------------
  |  | 1299|    149|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (199:8): [True: 149, False: 0]
  ------------------
  200|    149|      msg = url_errs[rc];
  201|    149|    failf(data, "LDAP local: %s", msg);
  ------------------
  |  |   62|    149|#define failf Curl_failf
  ------------------
  202|    149|  }
  203|  9.11k|  return result;
  204|  9.11k|}
openldap.c:oldap_do:
 1000|  1.28k|{
 1001|  1.28k|  struct connectdata *conn = data->conn;
 1002|  1.28k|  struct ldapconninfo *li = Curl_conn_meta_get(conn, CURL_META_LDAP_CONN);
  ------------------
  |  |  115|  1.28k|#define CURL_META_LDAP_CONN   "meta:proto:ldap:conn"
  ------------------
 1003|  1.28k|  struct ldapreqinfo *lr;
 1004|  1.28k|  CURLcode result;
 1005|  1.28k|  int rc;
 1006|  1.28k|  LDAPURLDesc *lud;
 1007|  1.28k|  int msgid;
 1008|       |
 1009|  1.28k|  if(!li)
  ------------------
  |  Branch (1009:6): [True: 0, False: 1.28k]
  ------------------
 1010|      0|    return CURLE_FAILED_INIT;
 1011|       |
 1012|  1.28k|  infof(data, "LDAP local: %s", Curl_bufref_ptr(&data->state.url));
  ------------------
  |  |  143|  1.28k|  do {                               \
  |  |  144|  1.28k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  1.28k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 1.28k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.28k]
  |  |  |  |  ------------------
  |  |  |  |  320|  1.28k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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.28k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  1.28k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1.28k]
  |  |  ------------------
  ------------------
 1013|       |
 1014|  1.28k|  result = oldap_url_parse(data, &lud);
 1015|  1.28k|  if(result)
  ------------------
  |  Branch (1015:6): [True: 0, False: 1.28k]
  ------------------
 1016|      0|    goto out;
 1017|       |
 1018|  1.28k|#ifdef USE_SSL
 1019|  1.28k|  if(ssl_installed(conn)) {
  ------------------
  |  Branch (1019:6): [True: 0, False: 1.28k]
  ------------------
 1020|      0|    Sockbuf *sb;
 1021|       |    /* re-install the libcurl SSL handlers into the sockbuf. */
 1022|      0|    if((ldap_get_option(li->ld, LDAP_OPT_SOCKBUF, &sb) != LDAP_OPT_SUCCESS) ||
  ------------------
  |  Branch (1022:8): [True: 0, False: 0]
  ------------------
 1023|      0|       ber_sockbuf_add_io(sb, &ldapsb_tls, LBER_SBIOD_LEVEL_TRANSPORT, data)) {
  ------------------
  |  Branch (1023:8): [True: 0, False: 0]
  ------------------
 1024|      0|      ldap_free_urldesc(lud);
 1025|      0|      return CURLE_FAILED_INIT;
 1026|      0|    }
 1027|      0|  }
 1028|  1.28k|#endif
 1029|       |
 1030|  1.28k|  rc = ldap_search_ext(li->ld, lud->lud_dn, lud->lud_scope,
 1031|  1.28k|                       lud->lud_filter, lud->lud_attrs, 0,
 1032|  1.28k|                       NULL, NULL, NULL, 0, &msgid);
 1033|  1.28k|  ldap_free_urldesc(lud);
 1034|  1.28k|  if(rc != LDAP_SUCCESS) {
  ------------------
  |  Branch (1034:6): [True: 375, False: 906]
  ------------------
 1035|    375|    failf(data, "LDAP local: ldap_search_ext %s", ldap_err2string(rc));
  ------------------
  |  |   62|    375|#define failf Curl_failf
  ------------------
 1036|    375|    result = CURLE_LDAP_SEARCH_FAILED;
 1037|    375|    goto out;
 1038|    375|  }
 1039|       |
 1040|    906|  lr = curlx_calloc(1, sizeof(struct ldapreqinfo));
  ------------------
  |  | 1485|    906|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1041|    906|  if(!lr ||
  ------------------
  |  Branch (1041:6): [True: 0, False: 906]
  ------------------
 1042|    906|     Curl_meta_set(data, CURL_META_LDAP_EASY, lr, oldap_easy_dtor)) {
  ------------------
  |  |  113|    906|#define CURL_META_LDAP_EASY   "meta:proto:ldap:easy"
  ------------------
  |  Branch (1042:6): [True: 0, False: 906]
  ------------------
 1043|      0|    ldap_abandon_ext(li->ld, msgid, NULL, NULL);
 1044|      0|    result = CURLE_OUT_OF_MEMORY;
 1045|      0|    goto out;
 1046|      0|  }
 1047|       |
 1048|    906|  lr->msgid = msgid;
 1049|    906|  Curl_xfer_setup_recv(data, FIRSTSOCKET, -1);
  ------------------
  |  |  245|    906|#define FIRSTSOCKET     0
  ------------------
 1050|    906|  *done = TRUE;
  ------------------
  |  | 1051|    906|#define TRUE true
  ------------------
 1051|       |
 1052|  1.28k|out:
 1053|  1.28k|  return result;
 1054|    906|}
openldap.c:ssl_installed:
  507|  4.69k|{
  508|  4.69k|  struct ldapconninfo *li = Curl_conn_meta_get(conn, CURL_META_LDAP_CONN);
  ------------------
  |  |  115|  4.69k|#define CURL_META_LDAP_CONN   "meta:proto:ldap:conn"
  ------------------
  509|  4.69k|  return li && li->recv;
  ------------------
  |  Branch (509:10): [True: 4.69k, False: 0]
  |  Branch (509:16): [True: 0, False: 4.69k]
  ------------------
  510|  4.69k|}
openldap.c:oldap_easy_dtor:
  558|    906|{
  559|    906|  struct ldapreqinfo *lr = entry;
  560|    906|  (void)key;
  561|    906|  (void)klen;
  562|    906|  curlx_free(lr);
  ------------------
  |  | 1488|    906|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  563|    906|}
openldap.c:oldap_done:
 1058|  3.40k|{
 1059|  3.40k|  struct connectdata *conn = data->conn;
 1060|  3.40k|  struct ldapreqinfo *lr = Curl_meta_get(data, CURL_META_LDAP_EASY);
  ------------------
  |  |  113|  3.40k|#define CURL_META_LDAP_EASY   "meta:proto:ldap:easy"
  ------------------
 1061|       |
 1062|  3.40k|  (void)res;
 1063|  3.40k|  (void)premature;
 1064|       |
 1065|  3.40k|  if(lr) {
  ------------------
  |  Branch (1065:6): [True: 906, False: 2.50k]
  ------------------
 1066|       |    /* if there was a search in progress, abandon it */
 1067|    906|    if(lr->msgid) {
  ------------------
  |  Branch (1067:8): [True: 754, False: 152]
  ------------------
 1068|    754|      struct ldapconninfo *li = Curl_conn_meta_get(conn, CURL_META_LDAP_CONN);
  ------------------
  |  |  115|    754|#define CURL_META_LDAP_CONN   "meta:proto:ldap:conn"
  ------------------
 1069|    754|      if(li && li->ld) {
  ------------------
  |  Branch (1069:10): [True: 754, False: 0]
  |  Branch (1069:16): [True: 754, False: 0]
  ------------------
 1070|    754|        ldap_abandon_ext(li->ld, lr->msgid, NULL, NULL);
 1071|    754|      }
 1072|    754|      lr->msgid = 0;
 1073|    754|    }
 1074|    906|    Curl_meta_remove(data, CURL_META_LDAP_EASY);
  ------------------
  |  |  113|    906|#define CURL_META_LDAP_EASY   "meta:proto:ldap:easy"
  ------------------
 1075|    906|  }
 1076|       |
 1077|  3.40k|  return CURLE_OK;
 1078|  3.40k|}
openldap.c:oldap_connect:
  592|  3.40k|{
  593|  3.40k|  struct connectdata *conn = data->conn;
  594|  3.40k|  struct ldapconninfo *li;
  595|  3.40k|  static const int version = LDAP_VERSION3;
  596|  3.40k|  char *hosturl = NULL;
  597|  3.40k|  CURLcode result;
  598|  3.40k|  int rc;
  599|       |#ifdef CURL_OPENLDAP_DEBUG
  600|       |  static int do_trace = -1;
  601|       |#endif
  602|       |
  603|  3.40k|  (void)done;
  604|       |
  605|  3.40k|  li = curlx_calloc(1, sizeof(struct ldapconninfo));
  ------------------
  |  | 1485|  3.40k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  606|  3.40k|  if(!li) {
  ------------------
  |  Branch (606:6): [True: 0, False: 3.40k]
  ------------------
  607|      0|    result = CURLE_OUT_OF_MEMORY;
  608|      0|    goto out;
  609|      0|  }
  610|       |
  611|  3.40k|  result = Curl_conn_meta_set(conn, CURL_META_LDAP_CONN, li, oldap_conn_dtor);
  ------------------
  |  |  115|  3.40k|#define CURL_META_LDAP_CONN   "meta:proto:ldap:conn"
  ------------------
  612|  3.40k|  if(result)
  ------------------
  |  Branch (612:6): [True: 0, False: 3.40k]
  ------------------
  613|      0|    goto out;
  614|       |
  615|  3.40k|  li->proto = ldap_pvt_url_scheme2proto(data->state.origin->scheme->name);
  616|       |
  617|       |  /* Initialize the SASL storage */
  618|  3.40k|  Curl_sasl_init(&li->sasl, data, &saslldap);
  619|       |
  620|  3.40k|  result = oldap_parse_login_options(conn);
  621|  3.40k|  if(result)
  ------------------
  |  Branch (621:6): [True: 18, False: 3.39k]
  ------------------
  622|     18|    goto out;
  623|       |
  624|  3.39k|  hosturl = curl_maprintf("%s://%s:%u",
  625|  3.39k|                          conn->scheme->name,
  626|  3.39k|                          conn->origin->ipv6 ?
  ------------------
  |  Branch (626:27): [True: 66, False: 3.32k]
  ------------------
  627|     66|                          conn->origin->user_hostname :
  628|  3.39k|                          conn->origin->hostname,
  629|  3.39k|                          conn->origin->port);
  630|  3.39k|  if(!hosturl) {
  ------------------
  |  Branch (630:6): [True: 0, False: 3.39k]
  ------------------
  631|      0|    result = CURLE_OUT_OF_MEMORY;
  632|      0|    goto out;
  633|      0|  }
  634|       |
  635|  3.39k|  rc = ldap_init_fd(conn->sock[FIRSTSOCKET], li->proto, hosturl, &li->ld);
  ------------------
  |  |  245|  3.39k|#define FIRSTSOCKET     0
  ------------------
  636|  3.39k|  if(rc) {
  ------------------
  |  Branch (636:6): [True: 0, False: 3.39k]
  ------------------
  637|      0|    failf(data, "LDAP local: Cannot connect to %s, %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  638|      0|          hosturl, ldap_err2string(rc));
  639|      0|    result = CURLE_COULDNT_CONNECT;
  640|      0|    goto out;
  641|      0|  }
  642|       |
  643|       |#ifdef CURL_OPENLDAP_DEBUG
  644|       |  if(do_trace < 0) {
  645|       |    const char *env = getenv("CURL_OPENLDAP_TRACE");
  646|       |    curl_off_t e = 0;
  647|       |    if(!curlx_str_number(&env, &e, INT_MAX))
  648|       |      do_trace = e > 0;
  649|       |  }
  650|       |  if(do_trace)
  651|       |    ldap_set_option(li->ld, LDAP_OPT_DEBUG_LEVEL, &do_trace);
  652|       |#endif
  653|       |
  654|       |  /* Try version 3 first. */
  655|  3.39k|  ldap_set_option(li->ld, LDAP_OPT_PROTOCOL_VERSION, &version);
  656|       |
  657|       |  /* Do not chase referrals. */
  658|  3.39k|  ldap_set_option(li->ld, LDAP_OPT_REFERRALS, LDAP_OPT_OFF);
  659|       |
  660|  3.39k|  {
  661|  3.39k|    ber_len_t max = 256 * 1024;
  662|  3.39k|    Sockbuf *sb;
  663|  3.39k|    if((ldap_get_option(li->ld, LDAP_OPT_SOCKBUF, &sb) != LDAP_OPT_SUCCESS) ||
  ------------------
  |  Branch (663:8): [True: 0, False: 3.39k]
  ------------------
  664|       |       /* Set the maximum allowed size of an incoming message, which to
  665|       |          OpenLDAP means that it will malloc() memory up to this size. If not
  666|       |          set, there is no limit and we instead risk a malloc() failure. */
  667|  3.39k|       !ber_sockbuf_ctrl(sb, LBER_SB_OPT_SET_MAX_INCOMING, &max)) {
  ------------------
  |  Branch (667:8): [True: 0, False: 3.39k]
  ------------------
  668|      0|      result = CURLE_FAILED_INIT;
  669|      0|      goto out;
  670|      0|    }
  671|  3.39k|  }
  672|       |
  673|  3.39k|#ifdef USE_SSL
  674|  3.39k|  if(Curl_conn_is_ssl(conn, FIRSTSOCKET)) {
  ------------------
  |  |  245|  3.39k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (674:6): [True: 0, False: 3.39k]
  ------------------
  675|      0|    result = oldap_ssl_connect(data, OLDAP_SSL);
  676|      0|    goto out;
  677|      0|  }
  678|       |
  679|  3.39k|  if(data->set.use_ssl) {
  ------------------
  |  Branch (679:6): [True: 57, False: 3.33k]
  ------------------
  680|     57|    result = oldap_perform_starttls(data);
  681|     57|    if(!result || data->set.use_ssl != CURLUSESSL_TRY)
  ------------------
  |  |  925|      0|#define CURLUSESSL_TRY     1L /* try using SSL, proceed anyway otherwise */
  ------------------
  |  Branch (681:8): [True: 57, False: 0]
  |  Branch (681:19): [True: 0, False: 0]
  ------------------
  682|     57|      goto out;
  683|     57|  }
  684|  3.33k|#endif
  685|       |
  686|  3.33k|  if(li->sasl.prefmech != SASL_AUTH_NONE) {
  ------------------
  |  |   45|  3.33k|#define SASL_AUTH_NONE          0
  ------------------
  |  Branch (686:6): [True: 282, False: 3.05k]
  ------------------
  687|    282|    result = oldap_perform_mechs(data);
  688|    282|    goto out;
  689|    282|  }
  690|       |
  691|       |  /* Force bind even if anonymous bind is not needed in protocol version 3
  692|       |     to detect missing version 3 support. */
  693|  3.05k|  result = oldap_perform_bind(data, OLDAP_BIND);
  694|       |
  695|  3.40k|out:
  696|  3.40k|  curlx_free(hosturl);
  ------------------
  |  | 1488|  3.40k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  697|  3.40k|  return result;
  698|  3.05k|}
openldap.c:oldap_conn_dtor:
  566|  3.40k|{
  567|  3.40k|  struct ldapconninfo *li = entry;
  568|  3.40k|  (void)key;
  569|  3.40k|  (void)klen;
  570|  3.40k|  if(li->ld) {
  ------------------
  |  Branch (570:6): [True: 0, False: 3.40k]
  ------------------
  571|      0|    ldap_unbind_ext(li->ld, NULL, NULL);
  572|      0|    li->ld = NULL;
  573|      0|  }
  574|  3.40k|  curlx_free(li);
  ------------------
  |  | 1488|  3.40k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  575|  3.40k|}
openldap.c:oldap_map_error:
  150|  1.77k|{
  151|  1.77k|  switch(rc) {
  ------------------
  |  Branch (151:10): [True: 12, False: 1.76k]
  ------------------
  152|      3|  case LDAP_NO_MEMORY:
  ------------------
  |  Branch (152:3): [True: 3, False: 1.77k]
  ------------------
  153|      3|    return CURLE_OUT_OF_MEMORY;
  154|      2|  case LDAP_INVALID_CREDENTIALS:
  ------------------
  |  Branch (154:3): [True: 2, False: 1.77k]
  ------------------
  155|      2|    return CURLE_LOGIN_DENIED;
  156|      4|  case LDAP_PROTOCOL_ERROR:
  ------------------
  |  Branch (156:3): [True: 4, False: 1.77k]
  ------------------
  157|      4|    return CURLE_UNSUPPORTED_PROTOCOL;
  158|      3|  case LDAP_INSUFFICIENT_ACCESS:
  ------------------
  |  Branch (158:3): [True: 3, False: 1.77k]
  ------------------
  159|      3|    return CURLE_REMOTE_ACCESS_DENIED;
  160|  1.77k|  }
  161|  1.76k|  return result;
  162|  1.77k|}
openldap.c:oldap_parse_login_options:
  208|  3.40k|{
  209|  3.40k|  CURLcode result = CURLE_OK;
  210|  3.40k|  struct ldapconninfo *li = Curl_conn_meta_get(conn, CURL_META_LDAP_CONN);
  ------------------
  |  |  115|  3.40k|#define CURL_META_LDAP_CONN   "meta:proto:ldap:conn"
  ------------------
  211|  3.40k|  const char *ptr = conn->options;
  212|       |
  213|  3.40k|  DEBUGASSERT(li);
  ------------------
  |  | 1077|  3.40k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (213:3): [True: 0, False: 3.40k]
  |  Branch (213:3): [True: 3.40k, False: 0]
  ------------------
  214|  3.40k|  if(!li)
  ------------------
  |  Branch (214:6): [True: 0, False: 3.40k]
  ------------------
  215|      0|    return CURLE_FAILED_INIT;
  216|       |
  217|  3.42k|  while(!result && ptr && *ptr) {
  ------------------
  |  Branch (217:9): [True: 3.40k, False: 18]
  |  Branch (217:20): [True: 18, False: 3.39k]
  |  Branch (217:27): [True: 18, False: 0]
  ------------------
  218|     18|    const char *key = ptr;
  219|     18|    const char *value;
  220|       |
  221|    255|    while(*ptr && *ptr != '=')
  ------------------
  |  Branch (221:11): [True: 247, False: 8]
  |  Branch (221:19): [True: 237, False: 10]
  ------------------
  222|    237|      ptr++;
  223|       |
  224|     18|    value = ptr + 1;
  225|       |
  226|    243|    while(*ptr && *ptr != ';')
  ------------------
  |  Branch (226:11): [True: 226, False: 17]
  |  Branch (226:19): [True: 225, False: 1]
  ------------------
  227|    225|      ptr++;
  228|       |
  229|     18|    if(checkprefix("AUTH=", key))
  ------------------
  |  |   33|     18|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|     18|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 0, False: 18]
  |  |  ------------------
  ------------------
  230|      0|      result = Curl_sasl_parse_url_auth_option(&li->sasl, value, ptr - value);
  231|     18|    else
  232|     18|      result = CURLE_SETOPT_OPTION_SYNTAX;
  233|       |
  234|     18|    if(*ptr == ';')
  ------------------
  |  Branch (234:8): [True: 1, False: 17]
  ------------------
  235|      1|      ptr++;
  236|     18|  }
  237|       |
  238|  3.40k|  return result == CURLE_URL_MALFORMAT ? CURLE_SETOPT_OPTION_SYNTAX : result;
  ------------------
  |  Branch (238:10): [True: 0, False: 3.40k]
  ------------------
  239|  3.40k|}
openldap.c:oldap_ssl_connect:
  513|      1|{
  514|      1|  struct connectdata *conn = data->conn;
  515|      1|  struct ldapconninfo *li = Curl_conn_meta_get(conn, CURL_META_LDAP_CONN);
  ------------------
  |  |  115|      1|#define CURL_META_LDAP_CONN   "meta:proto:ldap:conn"
  ------------------
  516|      1|  bool ssldone = FALSE;
  ------------------
  |  | 1054|      1|#define FALSE false
  ------------------
  517|      1|  CURLcode result;
  518|       |
  519|      1|  if(!li)
  ------------------
  |  Branch (519:6): [True: 0, False: 1]
  ------------------
  520|      0|    return CURLE_FAILED_INIT;
  521|      1|  result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &ssldone);
  ------------------
  |  |  245|      1|#define FIRSTSOCKET     0
  ------------------
                result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &ssldone);
  ------------------
  |  | 1054|      1|#define FALSE false
  ------------------
  522|      1|  if(result)
  ------------------
  |  Branch (522:6): [True: 1, False: 0]
  ------------------
  523|      1|    return result;
  524|      0|  oldap_state(data, li, newstate);
  525|       |
  526|      0|  if(ssldone) {
  ------------------
  |  Branch (526:6): [True: 0, False: 0]
  ------------------
  527|      0|    Sockbuf *sb;
  528|       |
  529|       |    /* Install the libcurl SSL handlers into the sockbuf. */
  530|      0|    if((ldap_get_option(li->ld, LDAP_OPT_SOCKBUF, &sb) != LDAP_OPT_SUCCESS) ||
  ------------------
  |  Branch (530:8): [True: 0, False: 0]
  ------------------
  531|      0|       ber_sockbuf_add_io(sb, &ldapsb_tls, LBER_SBIOD_LEVEL_TRANSPORT, data))
  ------------------
  |  Branch (531:8): [True: 0, False: 0]
  ------------------
  532|      0|      return CURLE_FAILED_INIT;
  533|      0|    li->recv = conn->recv[FIRSTSOCKET];
  ------------------
  |  |  245|      0|#define FIRSTSOCKET     0
  ------------------
  534|      0|    li->send = conn->send[FIRSTSOCKET];
  ------------------
  |  |  245|      0|#define FIRSTSOCKET     0
  ------------------
  535|      0|  }
  536|       |
  537|      0|  return result;
  538|      0|}
openldap.c:oldap_state:
  124|  4.69k|{
  125|  4.69k|#if defined(DEBUGBUILD) && defined(CURLVERBOSE)
  126|       |  /* for debug purposes */
  127|  4.69k|  static const char * const names[] = {
  128|  4.69k|    "STOP",
  129|  4.69k|    "SSL",
  130|  4.69k|    "STARTTLS",
  131|  4.69k|    "TLS",
  132|  4.69k|    "MECHS",
  133|  4.69k|    "SASL",
  134|  4.69k|    "BIND",
  135|  4.69k|    "BINDV2",
  136|       |    /* LAST */
  137|  4.69k|  };
  138|       |
  139|  4.69k|  if(li->state != newstate)
  ------------------
  |  Branch (139:6): [True: 4.69k, False: 0]
  ------------------
  140|  4.69k|    infof(data, "LDAP %p state change from %s to %s",
  ------------------
  |  |  143|  4.69k|  do {                               \
  |  |  144|  4.69k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  4.69k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 4.69k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.69k]
  |  |  |  |  ------------------
  |  |  |  |  320|  4.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|  4.69k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  4.69k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 4.69k]
  |  |  ------------------
  ------------------
  141|  4.69k|          (void *)li, names[li->state], names[newstate]);
  142|       |#else
  143|       |  (void)data;
  144|       |#endif
  145|  4.69k|  li->state = newstate;
  146|  4.69k|}
openldap.c:oldap_perform_starttls:
  542|     57|{
  543|     57|  struct ldapconninfo *li =
  544|     57|    Curl_conn_meta_get(data->conn, CURL_META_LDAP_CONN);
  ------------------
  |  |  115|     57|#define CURL_META_LDAP_CONN   "meta:proto:ldap:conn"
  ------------------
  545|     57|  int rc;
  546|       |
  547|     57|  if(!li)
  ------------------
  |  Branch (547:6): [True: 0, False: 57]
  ------------------
  548|      0|    return CURLE_FAILED_INIT;
  549|     57|  rc = ldap_start_tls(li->ld, NULL, NULL, &li->msgid);
  550|     57|  if(rc != LDAP_SUCCESS)
  ------------------
  |  Branch (550:6): [True: 0, False: 57]
  ------------------
  551|      0|    return oldap_map_error(rc, CURLE_USE_SSL_FAILED);
  552|     57|  oldap_state(data, li, OLDAP_STARTTLS);
  553|     57|  return CURLE_OK;
  554|     57|}
openldap.c:oldap_perform_mechs:
  373|    283|{
  374|    283|  struct ldapconninfo *li =
  375|    283|    Curl_conn_meta_get(data->conn, CURL_META_LDAP_CONN);
  ------------------
  |  |  115|    283|#define CURL_META_LDAP_CONN   "meta:proto:ldap:conn"
  ------------------
  376|    283|  int rc;
  377|    283|  static const char * const supportedSASLMechanisms[] = {
  378|    283|    "supportedSASLMechanisms",
  379|    283|    NULL
  380|    283|  };
  381|       |
  382|    283|  if(!li)
  ------------------
  |  Branch (382:6): [True: 0, False: 283]
  ------------------
  383|      0|    return CURLE_FAILED_INIT;
  384|       |  /* Casting away the const for the 3rd parameter that the LDAP API expects as
  385|       |     a non-const char ** is potentially unsafe but we believe the lack of
  386|       |     const in the API was an oversight and that no LDAP implementation
  387|       |     actually modifies the input. */
  388|    283|  rc = ldap_search_ext(li->ld, "", LDAP_SCOPE_BASE, "(objectclass=*)",
  389|    283|                       (char **)CURL_UNCONST(supportedSASLMechanisms), 0,
  ------------------
  |  |  862|    283|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  390|    283|                       NULL, NULL, NULL, 0, &li->msgid);
  391|    283|  if(rc != LDAP_SUCCESS)
  ------------------
  |  Branch (391:6): [True: 0, False: 283]
  ------------------
  392|      0|    return oldap_map_error(rc, CURLE_LOGIN_DENIED);
  393|    283|  oldap_state(data, li, OLDAP_MECHS);
  394|    283|  return CURLE_OK;
  395|    283|}
openldap.c:oldap_perform_bind:
  343|  3.07k|{
  344|  3.07k|  struct connectdata *conn = data->conn;
  345|  3.07k|  struct ldapconninfo *li = Curl_conn_meta_get(conn, CURL_META_LDAP_CONN);
  ------------------
  |  |  115|  3.07k|#define CURL_META_LDAP_CONN   "meta:proto:ldap:conn"
  ------------------
  346|  3.07k|  const char *binddn = NULL;
  347|  3.07k|  struct berval passwd;
  348|  3.07k|  int rc;
  349|       |
  350|  3.07k|  if(!li)
  ------------------
  |  Branch (350:6): [True: 0, False: 3.07k]
  ------------------
  351|      0|    return CURLE_FAILED_INIT;
  352|  3.07k|  passwd.bv_val = NULL;
  353|  3.07k|  passwd.bv_len = 0;
  354|       |
  355|  3.07k|  if(conn->creds) {
  ------------------
  |  Branch (355:6): [True: 74, False: 2.99k]
  ------------------
  356|     74|    binddn = Curl_creds_user(conn->creds);
  ------------------
  |  |   80|     74|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (80:43): [True: 74, False: 0]
  |  |  ------------------
  ------------------
  357|     74|    passwd.bv_val = CURL_UNCONST(Curl_creds_passwd(conn->creds));
  ------------------
  |  |  862|    148|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  |  Branch (862:60): [True: 74, False: 0]
  |  |  ------------------
  ------------------
  358|     74|    passwd.bv_len = strlen(passwd.bv_val);
  359|     74|  }
  360|       |
  361|  3.07k|  rc = ldap_sasl_bind(li->ld, binddn, LDAP_SASL_SIMPLE, &passwd,
  362|  3.07k|                      NULL, NULL, &li->msgid);
  363|  3.07k|  if(rc != LDAP_SUCCESS)
  ------------------
  |  Branch (363:6): [True: 0, False: 3.07k]
  ------------------
  364|      0|    return oldap_map_error(rc,
  365|      0|                           data->state.creds ?
  ------------------
  |  Branch (365:28): [True: 0, False: 0]
  ------------------
  366|      0|                           CURLE_LOGIN_DENIED : CURLE_LDAP_CANNOT_BIND);
  367|  3.07k|  oldap_state(data, li, newstate);
  368|  3.07k|  return CURLE_OK;
  369|  3.07k|}
openldap.c:oldap_connecting:
  845|  6.46k|{
  846|  6.46k|  CURLcode result = CURLE_OK;
  847|  6.46k|  struct connectdata *conn = data->conn;
  848|  6.46k|  struct ldapconninfo *li = Curl_conn_meta_get(conn, CURL_META_LDAP_CONN);
  ------------------
  |  |  115|  6.46k|#define CURL_META_LDAP_CONN   "meta:proto:ldap:conn"
  ------------------
  849|  6.46k|  LDAPMessage *msg = NULL;
  850|  6.46k|  struct timeval tv = { 0, 0 };
  851|  6.46k|  int code = LDAP_SUCCESS;
  852|  6.46k|  int rc;
  853|       |
  854|  6.46k|  if(!li)
  ------------------
  |  Branch (854:6): [True: 0, False: 6.46k]
  ------------------
  855|      0|    return CURLE_FAILED_INIT;
  856|       |
  857|  6.46k|  if(li->state != OLDAP_SSL && li->state != OLDAP_TLS) {
  ------------------
  |  Branch (857:6): [True: 6.46k, False: 0]
  |  Branch (857:32): [True: 6.46k, False: 0]
  ------------------
  858|       |    /* Get response to last command. */
  859|  6.46k|    rc = ldap_result(li->ld, li->msgid, LDAP_MSG_ONE, &tv, &msg);
  860|  6.46k|    switch(rc) {
  861|  3.17k|    case 0:                               /* Timed out. */
  ------------------
  |  Branch (861:5): [True: 3.17k, False: 3.29k]
  ------------------
  862|  3.17k|      return CURLE_OK;
  863|    190|    case LDAP_RES_SEARCH_ENTRY:
  ------------------
  |  Branch (863:5): [True: 190, False: 6.27k]
  ------------------
  864|    192|    case LDAP_RES_SEARCH_REFERENCE:
  ------------------
  |  Branch (864:5): [True: 2, False: 6.45k]
  ------------------
  865|    192|      break;
  866|  3.09k|    default:
  ------------------
  |  Branch (866:5): [True: 3.09k, False: 3.36k]
  ------------------
  867|  3.09k|      li->msgid = 0;                      /* Nothing to abandon upon error. */
  868|  3.09k|      if(rc < 0) {
  ------------------
  |  Branch (868:10): [True: 1.30k, False: 1.79k]
  ------------------
  869|  1.30k|        failf(data, "LDAP local: connecting ldap_result %s",
  ------------------
  |  |   62|  1.30k|#define failf Curl_failf
  ------------------
  870|  1.30k|              ldap_err2string(rc));
  871|  1.30k|        return oldap_map_error(rc, CURLE_COULDNT_CONNECT);
  872|  1.30k|      }
  873|  1.79k|      break;
  874|  6.46k|    }
  875|       |
  876|       |    /* Get error code from message. */
  877|  1.99k|    rc = ldap_parse_result(li->ld, msg, &code, NULL, NULL, NULL, NULL, 0);
  878|  1.99k|    if(rc)
  ------------------
  |  Branch (878:8): [True: 252, False: 1.73k]
  ------------------
  879|    252|      code = rc;
  880|  1.73k|    else {
  881|       |      /* store the latest code for later retrieval */
  882|  1.73k|      data->info.httpcode = code;
  883|  1.73k|    }
  884|       |
  885|       |    /* If protocol version 3 is not supported, fallback to version 2. */
  886|  1.99k|    if(code == LDAP_PROTOCOL_ERROR && li->state != OLDAP_BINDV2 &&
  ------------------
  |  Branch (886:8): [True: 21, False: 1.96k]
  |  Branch (886:39): [True: 19, False: 2]
  ------------------
  887|     19|#ifdef USE_SSL
  888|     19|       (ssl_installed(conn) || data->set.use_ssl <= CURLUSESSL_TRY) &&
  ------------------
  |  |  925|     19|#define CURLUSESSL_TRY     1L /* try using SSL, proceed anyway otherwise */
  ------------------
  |  Branch (888:9): [True: 0, False: 19]
  |  Branch (888:32): [True: 18, False: 1]
  ------------------
  889|     18|#endif
  890|     18|       li->sasl.prefmech == SASL_AUTH_NONE) {
  ------------------
  |  |   45|     18|#define SASL_AUTH_NONE          0
  ------------------
  |  Branch (890:8): [True: 16, False: 2]
  ------------------
  891|     16|      static const int version = LDAP_VERSION2;
  892|       |
  893|     16|      ldap_set_option(li->ld, LDAP_OPT_PROTOCOL_VERSION, &version);
  894|     16|      ldap_msgfree(msg);
  895|     16|      return oldap_perform_bind(data, OLDAP_BINDV2);
  896|     16|    }
  897|  1.99k|  }
  898|       |
  899|       |  /* Handle response message according to current state. */
  900|  1.97k|  switch(li->state) {
  901|       |
  902|      0|#ifdef USE_SSL
  903|      0|  case OLDAP_SSL:
  ------------------
  |  Branch (903:3): [True: 0, False: 1.97k]
  ------------------
  904|      0|    result = oldap_ssl_connect(data, OLDAP_SSL);
  905|      0|    if(!result && ssl_installed(conn)) {
  ------------------
  |  Branch (905:8): [True: 0, False: 0]
  |  Branch (905:19): [True: 0, False: 0]
  ------------------
  906|      0|      if(li->sasl.prefmech != SASL_AUTH_NONE)
  ------------------
  |  |   45|      0|#define SASL_AUTH_NONE          0
  ------------------
  |  Branch (906:10): [True: 0, False: 0]
  ------------------
  907|      0|        result = oldap_perform_mechs(data);
  908|      0|      else
  909|      0|        result = oldap_perform_bind(data, OLDAP_BIND);
  910|      0|    }
  911|      0|    break;
  912|     56|  case OLDAP_STARTTLS:
  ------------------
  |  Branch (912:3): [True: 56, False: 1.91k]
  ------------------
  913|     56|    if(code != LDAP_SUCCESS) {
  ------------------
  |  Branch (913:8): [True: 55, False: 1]
  ------------------
  914|     55|      if(data->set.use_ssl != CURLUSESSL_TRY)
  ------------------
  |  |  925|     55|#define CURLUSESSL_TRY     1L /* try using SSL, proceed anyway otherwise */
  ------------------
  |  Branch (914:10): [True: 49, False: 6]
  ------------------
  915|     49|        result = oldap_map_error(code, CURLE_USE_SSL_FAILED);
  916|      6|      else if(li->sasl.prefmech != SASL_AUTH_NONE)
  ------------------
  |  |   45|      6|#define SASL_AUTH_NONE          0
  ------------------
  |  Branch (916:15): [True: 1, False: 5]
  ------------------
  917|      1|        result = oldap_perform_mechs(data);
  918|      5|      else
  919|      5|        result = oldap_perform_bind(data, OLDAP_BIND);
  920|     55|      break;
  921|     55|    }
  922|      1|    result = Curl_ssl_cfilter_add(
  923|      1|      data, Curl_conn_get_origin(conn, FIRSTSOCKET), conn, FIRSTSOCKET);
  ------------------
  |  |  245|      1|#define FIRSTSOCKET     0
  ------------------
                    data, Curl_conn_get_origin(conn, FIRSTSOCKET), conn, FIRSTSOCKET);
  ------------------
  |  |  245|      1|#define FIRSTSOCKET     0
  ------------------
  924|      1|    if(result)
  ------------------
  |  Branch (924:8): [True: 0, False: 1]
  ------------------
  925|      0|      break;
  926|      1|    FALLTHROUGH();
  ------------------
  |  |  817|      1|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  927|      1|  case OLDAP_TLS:
  ------------------
  |  Branch (927:3): [True: 0, False: 1.97k]
  ------------------
  928|      1|    result = oldap_ssl_connect(data, OLDAP_TLS);
  929|      1|    if(result)
  ------------------
  |  Branch (929:8): [True: 1, False: 0]
  ------------------
  930|      1|      result = oldap_map_error(code, CURLE_USE_SSL_FAILED);
  931|      0|    else if(ssl_installed(conn)) {
  ------------------
  |  Branch (931:13): [True: 0, False: 0]
  ------------------
  932|      0|      if(li->sasl.prefmech != SASL_AUTH_NONE)
  ------------------
  |  |   45|      0|#define SASL_AUTH_NONE          0
  ------------------
  |  Branch (932:10): [True: 0, False: 0]
  ------------------
  933|      0|        result = oldap_perform_mechs(data);
  934|      0|      else if(data->state.creds)
  ------------------
  |  Branch (934:15): [True: 0, False: 0]
  ------------------
  935|      0|        result = oldap_perform_bind(data, OLDAP_BIND);
  936|      0|      else {
  937|       |        /* Version 3 supported: no bind required */
  938|      0|        oldap_state(data, li, OLDAP_STOP);
  939|      0|        result = CURLE_OK;
  940|      0|      }
  941|      0|    }
  942|      1|    break;
  943|      0|#endif
  944|       |
  945|    265|  case OLDAP_MECHS:
  ------------------
  |  Branch (945:3): [True: 265, False: 1.70k]
  ------------------
  946|    265|    result = oldap_state_mechs_resp(data, msg, code);
  947|    265|    break;
  948|      0|  case OLDAP_SASL:
  ------------------
  |  Branch (948:3): [True: 0, False: 1.97k]
  ------------------
  949|      0|    result = oldap_state_sasl_resp(data, msg, code);
  950|      0|    break;
  951|  1.64k|  case OLDAP_BIND:
  ------------------
  |  Branch (951:3): [True: 1.64k, False: 329]
  ------------------
  952|  1.65k|  case OLDAP_BINDV2:
  ------------------
  |  Branch (952:3): [True: 8, False: 1.96k]
  ------------------
  953|  1.65k|    result = oldap_state_bind_resp(data, msg, code);
  954|  1.65k|    break;
  955|      0|  default:
  ------------------
  |  Branch (955:3): [True: 0, False: 1.97k]
  ------------------
  956|       |    /* internal error */
  957|      0|    result = CURLE_COULDNT_CONNECT;
  958|      0|    break;
  959|  1.97k|  }
  960|       |
  961|  1.97k|  ldap_msgfree(msg);
  962|       |
  963|  1.97k|  *done = li->state == OLDAP_STOP;
  964|  1.97k|  if(*done)
  ------------------
  |  Branch (964:6): [True: 1.28k, False: 692]
  ------------------
  965|  1.28k|    conn->recv[FIRSTSOCKET] = oldap_recv;
  ------------------
  |  |  245|  1.28k|#define FIRSTSOCKET     0
  ------------------
  966|       |
  967|  1.97k|  if(result && li->msgid) {
  ------------------
  |  Branch (967:6): [True: 481, False: 1.49k]
  |  Branch (967:16): [True: 15, False: 466]
  ------------------
  968|     15|    ldap_abandon_ext(li->ld, li->msgid, NULL, NULL);
  969|     15|    li->msgid = 0;
  970|     15|  }
  971|  1.97k|  return result;
  972|  1.97k|}
openldap.c:oldap_state_mechs_resp:
  703|    265|{
  704|    265|  struct connectdata *conn;
  705|    265|  struct ldapconninfo *li;
  706|    265|  int rc;
  707|    265|  BerElement *ber = NULL;
  708|    265|  CURLcode result = CURLE_OK;
  709|    265|  struct berval bv, *bvals;
  710|       |
  711|    265|  if(!data)
  ------------------
  |  Branch (711:6): [True: 0, False: 265]
  ------------------
  712|      0|    return CURLE_FAILED_INIT;
  713|       |
  714|    265|  conn = data->conn;
  715|    265|  li = Curl_conn_meta_get(conn, CURL_META_LDAP_CONN);
  ------------------
  |  |  115|    265|#define CURL_META_LDAP_CONN   "meta:proto:ldap:conn"
  ------------------
  716|       |
  717|    265|  if(!li)
  ------------------
  |  Branch (717:6): [True: 0, False: 265]
  ------------------
  718|      0|    return CURLE_FAILED_INIT;
  719|    265|  switch(ldap_msgtype(msg)) {
  720|    184|  case LDAP_RES_SEARCH_ENTRY:
  ------------------
  |  Branch (720:3): [True: 184, False: 81]
  ------------------
  721|       |    /* Got a list of supported SASL mechanisms. */
  722|    184|    if(code != LDAP_SUCCESS && code != LDAP_NO_RESULTS_RETURNED)
  ------------------
  |  Branch (722:8): [True: 184, False: 0]
  |  Branch (722:32): [True: 0, False: 184]
  ------------------
  723|      0|      return CURLE_LOGIN_DENIED;
  724|       |
  725|    184|    rc = ldap_get_dn_ber(li->ld, msg, &ber, &bv);
  726|    184|    if(rc < 0)
  ------------------
  |  Branch (726:8): [True: 13, False: 171]
  ------------------
  727|     13|      return oldap_map_error(rc, CURLE_BAD_CONTENT_ENCODING);
  728|    171|    for(rc = ldap_get_attribute_ber(li->ld, msg, ber, &bv, &bvals);
  729|    312|        rc == LDAP_SUCCESS;
  ------------------
  |  Branch (729:9): [True: 242, False: 70]
  ------------------
  730|    242|        rc = ldap_get_attribute_ber(li->ld, msg, ber, &bv, &bvals)) {
  731|    242|      int i;
  732|       |
  733|    242|      if(!bv.bv_val)
  ------------------
  |  Branch (733:10): [True: 101, False: 141]
  ------------------
  734|    101|        break;
  735|       |
  736|    141|      if(bvals) {
  ------------------
  |  Branch (736:10): [True: 79, False: 62]
  ------------------
  737|    246|        for(i = 0; bvals[i].bv_val; i++) {
  ------------------
  |  Branch (737:20): [True: 167, False: 79]
  ------------------
  738|    167|          size_t llen;
  739|    167|          unsigned short mech =
  740|    167|            Curl_sasl_decode_mech((const char *)bvals[i].bv_val,
  741|    167|                                  bvals[i].bv_len, &llen);
  742|    167|          if(bvals[i].bv_len == llen)
  ------------------
  |  Branch (742:14): [True: 1, False: 166]
  ------------------
  743|      1|            li->sasl.authmechs |= mech;
  744|    167|        }
  745|     79|        ber_memfree(bvals);
  746|     79|      }
  747|    141|    }
  748|    171|    ber_free(ber, 0);
  749|    171|    break;
  750|       |
  751|     47|  case LDAP_RES_SEARCH_RESULT:
  ------------------
  |  Branch (751:3): [True: 47, False: 218]
  ------------------
  752|     47|    switch(code) {
  753|      1|    case LDAP_SIZELIMIT_EXCEEDED:
  ------------------
  |  Branch (753:5): [True: 1, False: 46]
  ------------------
  754|      1|      infof(data, "Too many authentication mechanisms");
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  755|      1|      FALLTHROUGH();
  ------------------
  |  |  817|      1|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  756|      3|    case LDAP_SUCCESS:
  ------------------
  |  Branch (756:5): [True: 2, False: 45]
  ------------------
  757|      4|    case LDAP_NO_RESULTS_RETURNED:
  ------------------
  |  Branch (757:5): [True: 1, False: 46]
  ------------------
  758|      4|      if(Curl_sasl_can_authenticate(&li->sasl, data))
  ------------------
  |  Branch (758:10): [True: 0, False: 4]
  ------------------
  759|      0|        result = oldap_perform_sasl(data);
  760|      4|      else
  761|      4|        result = CURLE_LOGIN_DENIED;
  762|      4|      break;
  763|     43|    default:
  ------------------
  |  Branch (763:5): [True: 43, False: 4]
  ------------------
  764|     43|      result = oldap_map_error(code, CURLE_LOGIN_DENIED);
  765|     43|      break;
  766|     47|    }
  767|     47|    break;
  768|     47|  default:
  ------------------
  |  Branch (768:3): [True: 34, False: 231]
  ------------------
  769|     34|    break;
  770|    265|  }
  771|    252|  return result;
  772|    265|}
openldap.c:oldap_state_bind_resp:
  817|  1.65k|{
  818|  1.65k|  struct connectdata *conn = data->conn;
  819|  1.65k|  struct ldapconninfo *li = Curl_conn_meta_get(conn, CURL_META_LDAP_CONN);
  ------------------
  |  |  115|  1.65k|#define CURL_META_LDAP_CONN   "meta:proto:ldap:conn"
  ------------------
  820|  1.65k|  CURLcode result = CURLE_OK;
  821|  1.65k|  struct berval *bv = NULL;
  822|  1.65k|  int rc;
  823|       |
  824|  1.65k|  if(!li)
  ------------------
  |  Branch (824:6): [True: 0, False: 1.65k]
  ------------------
  825|      0|    return CURLE_FAILED_INIT;
  826|       |
  827|  1.65k|  if(code != LDAP_SUCCESS)
  ------------------
  |  Branch (827:6): [True: 171, False: 1.48k]
  ------------------
  828|    171|    return oldap_map_error(code, CURLE_LDAP_CANNOT_BIND);
  829|       |
  830|  1.48k|  rc = ldap_parse_sasl_bind_result(li->ld, msg, &bv, 0);
  831|  1.48k|  if(rc != LDAP_SUCCESS) {
  ------------------
  |  Branch (831:6): [True: 200, False: 1.28k]
  ------------------
  832|    200|    failf(data, "LDAP local: bind ldap_parse_sasl_bind_result %s",
  ------------------
  |  |   62|    200|#define failf Curl_failf
  ------------------
  833|    200|          ldap_err2string(rc));
  834|    200|    result = oldap_map_error(rc, CURLE_LDAP_CANNOT_BIND);
  835|    200|  }
  836|  1.28k|  else
  837|  1.28k|    oldap_state(data, li, OLDAP_STOP);
  838|       |
  839|  1.48k|  if(bv)
  ------------------
  |  Branch (839:6): [True: 4, False: 1.47k]
  ------------------
  840|      4|    ber_bvfree(bv);
  841|  1.48k|  return result;
  842|  1.65k|}
openldap.c:oldap_recv:
 1105|  1.33k|{
 1106|  1.33k|  struct connectdata *conn = data->conn;
 1107|  1.33k|  struct ldapconninfo *li = Curl_conn_meta_get(conn, CURL_META_LDAP_CONN);
  ------------------
  |  |  115|  1.33k|#define CURL_META_LDAP_CONN   "meta:proto:ldap:conn"
  ------------------
 1108|  1.33k|  struct ldapreqinfo *lr = Curl_meta_get(data, CURL_META_LDAP_EASY);
  ------------------
  |  |  113|  1.33k|#define CURL_META_LDAP_EASY   "meta:proto:ldap:easy"
  ------------------
 1109|  1.33k|  int rc;
 1110|  1.33k|  LDAPMessage *msg = NULL;
 1111|  1.33k|  BerElement *ber = NULL;
 1112|  1.33k|  struct timeval tv = { 0, 0 };
 1113|  1.33k|  struct berval bv, *bvals;
 1114|  1.33k|  CURLcode result = CURLE_AGAIN;
 1115|  1.33k|  int code;
 1116|  1.33k|  char *info = NULL;
 1117|       |
 1118|  1.33k|  (void)len;
 1119|  1.33k|  (void)buf;
 1120|  1.33k|  (void)sockindex;
 1121|  1.33k|  *pnread = 0;
 1122|  1.33k|  if(!li || !lr)
  ------------------
  |  Branch (1122:6): [True: 0, False: 1.33k]
  |  Branch (1122:13): [True: 0, False: 1.33k]
  ------------------
 1123|      0|    return CURLE_FAILED_INIT;
 1124|       |
 1125|  1.33k|  rc = ldap_result(li->ld, lr->msgid, LDAP_MSG_ONE, &tv, &msg);
 1126|  1.33k|  if(rc < 0) {
  ------------------
  |  Branch (1126:6): [True: 495, False: 843]
  ------------------
 1127|    495|    failf(data, "LDAP local: search ldap_result %s", ldap_err2string(rc));
  ------------------
  |  |   62|    495|#define failf Curl_failf
  ------------------
 1128|    495|    result = CURLE_RECV_ERROR;
 1129|    495|  }
 1130|       |
 1131|       |  /* error or timed out */
 1132|  1.33k|  if(!msg)
  ------------------
  |  Branch (1132:6): [True: 874, False: 464]
  ------------------
 1133|    874|    return result;
 1134|       |
 1135|    464|  result = CURLE_OK;
 1136|       |
 1137|    464|  switch(ldap_msgtype(msg)) {
  ------------------
  |  Branch (1137:10): [True: 424, False: 40]
  ------------------
 1138|    152|  case LDAP_RES_SEARCH_RESULT:
  ------------------
  |  Branch (1138:3): [True: 152, False: 312]
  ------------------
 1139|    152|    lr->msgid = 0;
 1140|    152|    rc = ldap_parse_result(li->ld, msg, &code, NULL, &info, NULL, NULL, 0);
 1141|    152|    if(rc) {
  ------------------
  |  Branch (1141:8): [True: 1, False: 151]
  ------------------
 1142|      1|      failf(data, "LDAP local: search ldap_parse_result %s",
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 1143|      1|            ldap_err2string(rc));
 1144|      1|      result = CURLE_LDAP_SEARCH_FAILED;
 1145|      1|      break;
 1146|      1|    }
 1147|       |
 1148|       |    /* store the latest code for later retrieval */
 1149|    151|    data->info.httpcode = code;
 1150|       |
 1151|    151|    switch(code) {
 1152|      1|    case LDAP_SIZELIMIT_EXCEEDED:
  ------------------
  |  Branch (1152:5): [True: 1, False: 150]
  ------------------
 1153|      1|      infof(data, "There are more than %d entries", lr->nument);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
 1154|      1|      FALLTHROUGH();
  ------------------
  |  |  817|      1|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1155|     18|    case LDAP_SUCCESS:
  ------------------
  |  Branch (1155:5): [True: 17, False: 134]
  ------------------
 1156|     18|      data->req.size = data->req.bytecount;
 1157|     18|      break;
 1158|    133|    default:
  ------------------
  |  Branch (1158:5): [True: 133, False: 18]
  ------------------
 1159|    133|      failf(data, "LDAP remote: search failed %s %s", ldap_err2string(code),
  ------------------
  |  |   62|    133|#define failf Curl_failf
  ------------------
 1160|    133|            info ? info : "");
  ------------------
  |  Branch (1160:13): [True: 32, False: 101]
  ------------------
 1161|    133|      result = CURLE_LDAP_SEARCH_FAILED;
 1162|    133|      break;
 1163|    151|    }
 1164|    151|    if(info)
  ------------------
  |  Branch (1164:8): [True: 37, False: 114]
  ------------------
 1165|     37|      ldap_memfree(info);
 1166|    151|    break;
 1167|    272|  case LDAP_RES_SEARCH_ENTRY:
  ------------------
  |  Branch (1167:3): [True: 272, False: 192]
  ------------------
 1168|    272|    lr->nument++;
 1169|    272|    rc = ldap_get_dn_ber(li->ld, msg, &ber, &bv);
 1170|    272|    if(rc < 0) {
  ------------------
  |  Branch (1170:8): [True: 3, False: 269]
  ------------------
 1171|      3|      result = CURLE_RECV_ERROR;
 1172|      3|      break;
 1173|      3|    }
 1174|       |
 1175|    269|    result = client_write(data, STRCONST("DN: "), bv.bv_val, bv.bv_len,
  ------------------
  |  | 1297|    269|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
 1176|    269|                          STRCONST("\n"));
  ------------------
  |  | 1297|    269|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
 1177|    269|    if(result)
  ------------------
  |  Branch (1177:8): [True: 4, False: 265]
  ------------------
 1178|      4|      break;
 1179|       |
 1180|    265|    for(rc = ldap_get_attribute_ber(li->ld, msg, ber, &bv, &bvals);
 1181|    756|        rc == LDAP_SUCCESS;
  ------------------
  |  Branch (1181:9): [True: 548, False: 208]
  ------------------
 1182|    548|        rc = ldap_get_attribute_ber(li->ld, msg, ber, &bv, &bvals)) {
 1183|    548|      int i;
 1184|    548|      bool binary;
 1185|       |
 1186|    548|      if(!bv.bv_val)
  ------------------
  |  Branch (1186:10): [True: 50, False: 498]
  ------------------
 1187|     50|        break;
 1188|       |
 1189|    498|      if(!bvals) {
  ------------------
  |  Branch (1189:10): [True: 328, False: 170]
  ------------------
 1190|    328|        result = client_write(data, STRCONST("\t"), bv.bv_val, bv.bv_len,
  ------------------
  |  | 1297|    328|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
 1191|    328|                              STRCONST(":\n"));
  ------------------
  |  | 1297|    328|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
 1192|    328|        if(result)
  ------------------
  |  Branch (1192:12): [True: 1, False: 327]
  ------------------
 1193|      1|          break;
 1194|    327|        continue;
 1195|    328|      }
 1196|       |
 1197|    170|      binary = bv.bv_len > 7 &&
  ------------------
  |  Branch (1197:16): [True: 44, False: 126]
  ------------------
 1198|     44|        curl_strnequal(bv.bv_val + bv.bv_len - 7, ";binary", 7);
  ------------------
  |  Branch (1198:9): [True: 3, False: 41]
  ------------------
 1199|       |
 1200|  1.25k|      for(i = 0; bvals[i].bv_val; i++) {
  ------------------
  |  Branch (1200:18): [True: 1.08k, False: 165]
  ------------------
 1201|  1.08k|        bool binval = FALSE;
  ------------------
  |  | 1054|  1.08k|#define FALSE false
  ------------------
 1202|       |
 1203|  1.08k|        result = client_write(data, STRCONST("\t"), bv.bv_val, bv.bv_len,
  ------------------
  |  | 1297|  1.08k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
 1204|  1.08k|                              STRCONST(":"));
  ------------------
  |  | 1297|  1.08k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
 1205|  1.08k|        if(result)
  ------------------
  |  Branch (1205:12): [True: 2, False: 1.08k]
  ------------------
 1206|      2|          break;
 1207|       |
 1208|  1.08k|        if(!binary) {
  ------------------
  |  Branch (1208:12): [True: 1.08k, False: 3]
  ------------------
 1209|       |          /* check for leading or trailing whitespace */
 1210|  1.08k|          if(bvals[i].bv_len &&
  ------------------
  |  Branch (1210:14): [True: 308, False: 772]
  ------------------
 1211|    308|             (ISBLANK(bvals[i].bv_val[0]) ||
  ------------------
  |  |   45|    616|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 13, False: 295]
  |  |  |  Branch (45:38): [True: 11, False: 284]
  |  |  ------------------
  ------------------
 1212|    284|              ISBLANK(bvals[i].bv_val[bvals[i].bv_len - 1])))
  ------------------
  |  |   45|    284|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 13, False: 271]
  |  |  |  Branch (45:38): [True: 11, False: 260]
  |  |  ------------------
  ------------------
 1213|     48|            binval = TRUE;
  ------------------
  |  | 1051|     48|#define TRUE true
  ------------------
 1214|  1.03k|          else {
 1215|       |            /* check for unprintable characters */
 1216|  1.03k|            unsigned int j;
 1217|  1.51k|            for(j = 0; j < bvals[i].bv_len; j++)
  ------------------
  |  Branch (1217:24): [True: 705, False: 812]
  ------------------
 1218|    705|              if(!ISPRINT(bvals[i].bv_val[j])) {
  ------------------
  |  |   35|    705|#define ISPRINT(x)  (ISLOWPRINT(x) || (((x) >= ' ') && ((x) <= 0x7e)))
  |  |  ------------------
  |  |  |  |   33|  1.41k|#define ISLOWPRINT(x) (((x) >= 9) && ((x) <= 0x0d))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:24): [True: 499, False: 206]
  |  |  |  |  |  Branch (33:38): [True: 110, False: 389]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (35:40): [True: 376, False: 219]
  |  |  |  Branch (35:56): [True: 375, False: 1]
  |  |  ------------------
  ------------------
 1219|    220|                binval = TRUE;
  ------------------
  |  | 1051|    220|#define TRUE true
  ------------------
 1220|    220|                break;
 1221|    220|              }
 1222|  1.03k|          }
 1223|  1.08k|        }
 1224|  1.08k|        if(binary || binval) {
  ------------------
  |  Branch (1224:12): [True: 3, False: 1.08k]
  |  Branch (1224:22): [True: 268, False: 812]
  ------------------
 1225|    271|          char *val_b64 = NULL;
 1226|    271|          size_t val_b64_sz = 0;
 1227|       |
 1228|       |          /* Binary value, encode to base64. */
 1229|    271|          if(bvals[i].bv_len)
  ------------------
  |  Branch (1229:14): [True: 268, False: 3]
  ------------------
 1230|    268|            result = curlx_base64_encode((uint8_t *)bvals[i].bv_val,
 1231|    268|                                         bvals[i].bv_len,
 1232|    268|                                         &val_b64, &val_b64_sz);
 1233|    271|          if(!result)
  ------------------
  |  Branch (1233:14): [True: 271, False: 0]
  ------------------
 1234|    271|            result = client_write(data, STRCONST(": "), val_b64, val_b64_sz,
  ------------------
  |  | 1297|    271|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
 1235|    271|                                  STRCONST("\n"));
  ------------------
  |  | 1297|    271|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
 1236|    271|          curlx_free(val_b64);
  ------------------
  |  | 1488|    271|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1237|    271|        }
 1238|    812|        else
 1239|    812|          result = client_write(data, STRCONST(" "),
  ------------------
  |  | 1297|    812|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
 1240|    812|                                bvals[i].bv_val, bvals[i].bv_len,
 1241|    812|                                STRCONST("\n"));
  ------------------
  |  | 1297|    812|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
 1242|  1.08k|        if(result)
  ------------------
  |  Branch (1242:12): [True: 3, False: 1.08k]
  ------------------
 1243|      3|          break;
 1244|  1.08k|      }
 1245|       |
 1246|    170|      ber_memfree(bvals);
 1247|    170|      bvals = NULL;
 1248|    170|      if(!result)
  ------------------
  |  Branch (1248:10): [True: 165, False: 5]
  ------------------
 1249|    165|        result = client_write(data, STRCONST("\n"), NULL, 0, NULL, 0);
  ------------------
  |  | 1297|    165|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
 1250|    170|      if(result)
  ------------------
  |  Branch (1250:10): [True: 6, False: 164]
  ------------------
 1251|      6|        break;
 1252|    170|    }
 1253|       |
 1254|    265|    if(!result)
  ------------------
  |  Branch (1254:8): [True: 258, False: 7]
  ------------------
 1255|    258|      result = client_write(data, STRCONST("\n"), NULL, 0, NULL, 0);
  ------------------
  |  | 1297|    258|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
 1256|    265|    if(!result)
  ------------------
  |  Branch (1256:8): [True: 256, False: 9]
  ------------------
 1257|    256|      result = CURLE_AGAIN;
 1258|    265|    break;
 1259|    464|  }
 1260|       |
 1261|    464|  ber_free(ber, 0);
 1262|    464|  ldap_msgfree(msg);
 1263|    464|  return result;
 1264|    464|}
openldap.c:client_write:
 1084|  3.18k|{
 1085|  3.18k|  CURLcode result = CURLE_OK;
 1086|       |
 1087|  3.18k|  if(prefix) {
  ------------------
  |  Branch (1087:6): [True: 3.18k, False: 0]
  ------------------
 1088|       |    /* If we have a zero-length value and the prefix ends with a space
 1089|       |       separator, drop the latter. */
 1090|  3.18k|    if(!len && plen && prefix[plen - 1] == ' ')
  ------------------
  |  Branch (1090:8): [True: 2.07k, False: 1.11k]
  |  Branch (1090:16): [True: 2.07k, False: 0]
  |  Branch (1090:24): [True: 957, False: 1.11k]
  ------------------
 1091|    957|      plen--;
 1092|  3.18k|    result = Curl_client_write(data, CLIENTWRITE_BODY, prefix, plen);
  ------------------
  |  |   42|  3.18k|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
 1093|  3.18k|  }
 1094|  3.18k|  if(!result && value) {
  ------------------
  |  Branch (1094:6): [True: 3.17k, False: 9]
  |  Branch (1094:17): [True: 2.75k, False: 423]
  ------------------
 1095|  2.75k|    result = Curl_client_write(data, CLIENTWRITE_BODY, value, len);
  ------------------
  |  |   42|  2.75k|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
 1096|  2.75k|  }
 1097|  3.18k|  if(!result && suffix) {
  ------------------
  |  Branch (1097:6): [True: 3.17k, False: 11]
  |  Branch (1097:17): [True: 2.75k, False: 420]
  ------------------
 1098|  2.75k|    result = Curl_client_write(data, CLIENTWRITE_BODY, suffix, slen);
  ------------------
  |  |   42|  2.75k|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
 1099|  2.75k|  }
 1100|  3.18k|  return result;
 1101|  3.18k|}
openldap.c:oldap_disconnect:
  977|  7.85k|{
  978|  7.85k|  struct ldapconninfo *li = Curl_conn_meta_get(conn, CURL_META_LDAP_CONN);
  ------------------
  |  |  115|  7.85k|#define CURL_META_LDAP_CONN   "meta:proto:ldap:conn"
  ------------------
  979|  7.85k|  (void)dead_connection;
  980|       |#ifndef USE_SSL
  981|       |  (void)data;
  982|       |#endif
  983|       |
  984|  7.85k|  if(li && li->ld) {
  ------------------
  |  Branch (984:6): [True: 3.40k, False: 4.44k]
  |  Branch (984:12): [True: 3.39k, False: 18]
  ------------------
  985|  3.39k|#ifdef USE_SSL
  986|  3.39k|    if(ssl_installed(conn)) {
  ------------------
  |  Branch (986:8): [True: 0, False: 3.39k]
  ------------------
  987|      0|      Sockbuf *sb;
  988|      0|      if(ldap_get_option(li->ld, LDAP_OPT_SOCKBUF, &sb) != LDAP_OPT_SUCCESS ||
  ------------------
  |  Branch (988:10): [True: 0, False: 0]
  ------------------
  989|      0|         ber_sockbuf_add_io(sb, &ldapsb_tls, LBER_SBIOD_LEVEL_TRANSPORT, data))
  ------------------
  |  Branch (989:10): [True: 0, False: 0]
  ------------------
  990|      0|        return CURLE_FAILED_INIT;
  991|      0|    }
  992|  3.39k|#endif
  993|  3.39k|    ldap_unbind_ext(li->ld, NULL, NULL);
  994|  3.39k|    li->ld = NULL;
  995|  3.39k|  }
  996|  7.85k|  return CURLE_OK;
  997|  7.85k|}

Curl_getdate_capped:
  606|  9.37k|{
  607|  9.37k|  int rc = parsedate(p, tp);
  608|  9.37k|  return (rc == PARSEDATE_FAIL);
  ------------------
  |  |   97|  9.37k|#define PARSEDATE_FAIL   (-1)
  ------------------
  609|  9.37k|}
parsedate.c:parsedate:
  543|  9.37k|{
  544|  9.37k|  curl_off_t seconds = 0;
  545|  9.37k|  enum assume dignext = DATE_MDAY;
  546|  9.37k|  const char *indate = date; /* save the original pointer */
  547|  9.37k|  int part = 0; /* max 6 parts */
  548|  9.37k|  int rc = 0;
  549|  9.37k|  struct when w;
  550|  9.37k|  initwhen(&w);
  551|       |
  552|  28.1k|  while(*date && (part < 6)) {
  ------------------
  |  Branch (552:9): [True: 24.6k, False: 3.56k]
  |  Branch (552:18): [True: 24.6k, False: 0]
  ------------------
  553|  24.6k|    skip(&date);
  554|       |
  555|  24.6k|    if(ISALPHA(*date))
  ------------------
  |  |   38|  24.6k|#define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|  49.2k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 3.46k, False: 21.1k]
  |  |  |  |  |  Branch (43:38): [True: 3.46k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|  21.1k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 5.04k, False: 16.1k]
  |  |  |  |  |  Branch (42:38): [True: 5.04k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  556|  8.50k|      rc = datestring(&date, &w);
  557|  16.1k|    else if(ISDIGIT(*date))
  ------------------
  |  |   44|  16.1k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 14.3k, False: 1.76k]
  |  |  |  Branch (44:38): [True: 14.3k, False: 0]
  |  |  ------------------
  ------------------
  558|  14.3k|      rc = datenum(indate, &date, &w, &dignext);
  559|  24.6k|    if(rc)
  ------------------
  |  Branch (559:8): [True: 5.80k, False: 18.8k]
  ------------------
  560|  5.80k|      return rc;
  561|       |
  562|  18.8k|    part++;
  563|  18.8k|  }
  564|       |
  565|  3.56k|  rc = datecheck(&w);
  566|  3.56k|  if(rc)
  ------------------
  |  Branch (566:6): [True: 3.36k, False: 202]
  ------------------
  567|  3.36k|    return rc;
  568|       |
  569|    202|  seconds = time2epoch(&w); /* get number of seconds */
  570|    202|  tzadjust(&seconds, &w); /* handle the time zone offset */
  571|    202|  rc = mktimet(seconds, output); /* squeeze seconds into a time_t */
  572|       |
  573|    202|  return rc;
  574|  3.56k|}
parsedate.c:initwhen:
  360|  9.37k|{
  361|  9.37k|  w->wday = w->mon = w->mday = w->hour = w->min = w->sec = w->year = w->tzoff =
  362|  9.37k|    -1;
  363|  9.37k|}
parsedate.c:skip:
  256|  24.6k|{
  257|       |  /* skip everything that are not letters or digits */
  258|  45.7k|  while(**date && !ISALNUM(**date))
  ------------------
  |  |   41|  44.0k|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   44|  88.0k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 31.8k, False: 12.1k]
  |  |  |  |  |  Branch (44:38): [True: 14.3k, False: 17.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|  73.7k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 4.24k, False: 25.4k]
  |  |  |  |  |  Branch (43:38): [True: 3.46k, False: 779]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|  26.2k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 6.95k, False: 19.2k]
  |  |  |  |  |  Branch (42:38): [True: 5.04k, False: 1.91k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (258:9): [True: 44.0k, False: 1.76k]
  ------------------
  259|  21.1k|    (*date)++;
  260|  24.6k|}
parsedate.c:datestring:
  366|  8.50k|{
  367|       |  /* a name coming up */
  368|  8.50k|  size_t len = 0;
  369|  8.50k|  const char *p = *datep;
  370|  8.50k|  bool found = FALSE;
  ------------------
  |  | 1054|  8.50k|#define FALSE false
  ------------------
  371|  27.6k|  while(ISALPHA(*p) && (len < NAME_LEN)) {
  ------------------
  |  |   38|  55.3k|#define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|  55.3k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 11.7k, False: 15.9k]
  |  |  |  |  |  Branch (43:38): [True: 11.3k, False: 421]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|  16.3k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 8.59k, False: 7.74k]
  |  |  |  |  |  Branch (42:38): [True: 7.88k, False: 711]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                while(ISALPHA(*p) && (len < NAME_LEN)) {
  ------------------
  |  |  357|  19.2k|#define NAME_LEN 12
  ------------------
  |  Branch (371:24): [True: 19.1k, False: 52]
  ------------------
  372|  19.1k|    p++;
  373|  19.1k|    len++;
  374|  19.1k|  }
  375|       |
  376|  8.50k|  if(len != NAME_LEN) {
  ------------------
  |  |  357|  8.50k|#define NAME_LEN 12
  ------------------
  |  Branch (376:6): [True: 8.41k, False: 94]
  ------------------
  377|  8.41k|    if(w->wday == -1) {
  ------------------
  |  Branch (377:8): [True: 7.47k, False: 939]
  ------------------
  378|  7.47k|      w->wday = checkday(*datep, len);
  379|  7.47k|      if(w->wday != -1)
  ------------------
  |  Branch (379:10): [True: 639, False: 6.83k]
  ------------------
  380|    639|        found = TRUE;
  ------------------
  |  | 1051|    639|#define TRUE true
  ------------------
  381|  7.47k|    }
  382|  8.41k|    if(!found && (w->mon == -1)) {
  ------------------
  |  Branch (382:8): [True: 7.77k, False: 639]
  |  Branch (382:18): [True: 6.60k, False: 1.16k]
  ------------------
  383|  6.60k|      w->mon = checkmonth(*datep, len);
  384|  6.60k|      if(w->mon != -1)
  ------------------
  |  Branch (384:10): [True: 1.25k, False: 5.34k]
  ------------------
  385|  1.25k|        found = TRUE;
  ------------------
  |  | 1051|  1.25k|#define TRUE true
  ------------------
  386|  6.60k|    }
  387|       |
  388|  8.41k|    if(!found && (w->tzoff == -1)) {
  ------------------
  |  Branch (388:8): [True: 6.51k, False: 1.89k]
  |  Branch (388:18): [True: 4.87k, False: 1.63k]
  ------------------
  389|       |      /* this must be a time zone string */
  390|  4.87k|      w->tzoff = checktz(*datep, len);
  391|  4.87k|      if(w->tzoff != -1)
  ------------------
  |  Branch (391:10): [True: 2.97k, False: 1.90k]
  ------------------
  392|  2.97k|        found = TRUE;
  ------------------
  |  | 1051|  2.97k|#define TRUE true
  ------------------
  393|  4.87k|    }
  394|  8.41k|  }
  395|  8.50k|  if(!found)
  ------------------
  |  Branch (395:6): [True: 3.63k, False: 4.86k]
  ------------------
  396|  3.63k|    return PARSEDATE_FAIL; /* bad string */
  ------------------
  |  |   97|  3.63k|#define PARSEDATE_FAIL   (-1)
  ------------------
  397|       |
  398|  4.86k|  *datep += len;
  399|  4.86k|  return PARSEDATE_OK;
  ------------------
  |  |   96|  4.86k|#define PARSEDATE_OK     0
  ------------------
  400|  8.50k|}
parsedate.c:checkday:
  199|  7.47k|{
  200|  7.47k|  int i;
  201|  7.47k|  const char * const *what;
  202|  7.47k|  if(len > 3)
  ------------------
  |  Branch (202:6): [True: 830, False: 6.64k]
  ------------------
  203|    830|    what = &weekday[0];
  204|  6.64k|  else if(len == 3)
  ------------------
  |  Branch (204:11): [True: 2.39k, False: 4.25k]
  ------------------
  205|  2.39k|    what = &Curl_wkday[0];
  206|  4.25k|  else
  207|  4.25k|    return -1; /* too short */
  208|  23.8k|  for(i = 0; i < 7; i++) {
  ------------------
  |  Branch (208:14): [True: 21.2k, False: 2.58k]
  ------------------
  209|  21.2k|    size_t ilen = strlen(what[0]);
  210|  21.2k|    if((ilen == len) &&
  ------------------
  |  Branch (210:8): [True: 15.8k, False: 5.42k]
  ------------------
  211|  15.8k|       curl_strnequal(check, what[0], len))
  ------------------
  |  Branch (211:8): [True: 639, False: 15.2k]
  ------------------
  212|    639|      return i;
  213|  20.6k|    what++;
  214|  20.6k|  }
  215|  2.58k|  return -1;
  216|  3.22k|}
parsedate.c:checkmonth:
  219|  6.60k|{
  220|  6.60k|  int i;
  221|  6.60k|  const char * const *what = &Curl_month[0];
  222|  6.60k|  if(len != 3)
  ------------------
  |  Branch (222:6): [True: 4.83k, False: 1.77k]
  ------------------
  223|  4.83k|    return -1; /* not a month */
  224|       |
  225|  16.2k|  for(i = 0; i < 12; i++) {
  ------------------
  |  Branch (225:14): [True: 15.7k, False: 514]
  ------------------
  226|  15.7k|    if(curl_strnequal(check, what[0], 3))
  ------------------
  |  Branch (226:8): [True: 1.25k, False: 14.5k]
  ------------------
  227|  1.25k|      return i;
  228|  14.5k|    what++;
  229|  14.5k|  }
  230|    514|  return -1; /* return the offset or -1, no real offset is -1 */
  231|  1.77k|}
parsedate.c:checktz:
  243|  4.87k|{
  244|  4.87k|  if(len <= 4) {
  ------------------
  |  Branch (244:6): [True: 4.49k, False: 382]
  ------------------
  245|  4.49k|    const struct tzinfo *what;
  246|  4.49k|    struct tzinfo find;
  247|  4.49k|    curlx_strcopy(find.name, sizeof(find.name), check, len);
  248|  4.49k|    what = bsearch(&find, tz, CURL_ARRAYSIZE(tz), sizeof(tz[0]), tzcompare);
  ------------------
  |  | 1299|  4.49k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  249|  4.49k|    if(what)
  ------------------
  |  Branch (249:8): [True: 2.97k, False: 1.52k]
  ------------------
  250|  2.97k|      return what->offset * 60;
  251|  4.49k|  }
  252|  1.90k|  return -1;
  253|  4.87k|}
parsedate.c:tzcompare:
  234|  25.4k|{
  235|  25.4k|  const struct tzinfo *tz1 = m1;
  236|  25.4k|  const struct tzinfo *tz2 = m2;
  237|  25.4k|  return strcmp(tz1->name, tz2->name);
  238|  25.4k|}
parsedate.c:datenum:
  404|  14.3k|{
  405|       |  /* a digit */
  406|  14.3k|  unsigned int val;
  407|  14.3k|  char *end;
  408|  14.3k|  const char *date = *datep;
  409|  14.3k|  enum assume dignext = *dignextp;
  410|       |
  411|  14.3k|  if((w->sec == -1) && match_time(date, w, &end)) {
  ------------------
  |  Branch (411:6): [True: 13.5k, False: 802]
  |  Branch (411:24): [True: 1.46k, False: 12.0k]
  ------------------
  412|       |    /* time stamp */
  413|  1.46k|    date = end;
  414|  1.46k|  }
  415|  12.8k|  else {
  416|  12.8k|    bool found = FALSE;
  ------------------
  |  | 1054|  12.8k|#define FALSE false
  ------------------
  417|  12.8k|    curl_off_t lval;
  418|  12.8k|    int num_digits = 0;
  419|  12.8k|    const char *p = *datep;
  420|  12.8k|    if(curlx_str_number(&p, &lval, 99999999))
  ------------------
  |  Branch (420:8): [True: 124, False: 12.7k]
  ------------------
  421|    124|      return PARSEDATE_FAIL;
  ------------------
  |  |   97|    124|#define PARSEDATE_FAIL   (-1)
  ------------------
  422|       |
  423|       |    /* we know num_digits cannot be larger than 8 */
  424|  12.7k|    num_digits = (int)(p - *datep);
  425|  12.7k|    val = (unsigned int)lval;
  426|       |
  427|  12.7k|    if((w->tzoff == -1) &&
  ------------------
  |  Branch (427:8): [True: 9.58k, False: 3.17k]
  ------------------
  428|  9.58k|       (num_digits == 4) &&
  ------------------
  |  Branch (428:8): [True: 1.70k, False: 7.88k]
  ------------------
  429|  1.70k|       (val <= 1400) &&
  ------------------
  |  Branch (429:8): [True: 1.16k, False: 538]
  ------------------
  430|  1.16k|       (indate < date) &&
  ------------------
  |  Branch (430:8): [True: 910, False: 253]
  ------------------
  431|    910|       (date[-1] == '+' || date[-1] == '-')) {
  ------------------
  |  Branch (431:9): [True: 350, False: 560]
  |  Branch (431:28): [True: 270, False: 290]
  ------------------
  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|    620|      found = TRUE;
  ------------------
  |  | 1051|    620|#define TRUE true
  ------------------
  441|    620|      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|    620|      w->tzoff = date[-1] == '+' ? -w->tzoff : w->tzoff;
  ------------------
  |  Branch (445:18): [True: 350, False: 270]
  ------------------
  446|    620|    }
  447|       |
  448|  12.1k|    else if((num_digits == 8) && (w->year == -1) &&
  ------------------
  |  Branch (448:13): [True: 1.12k, False: 11.0k]
  |  Branch (448:34): [True: 948, False: 174]
  ------------------
  449|    948|            (w->mon == -1) && (w->mday == -1)) {
  ------------------
  |  Branch (449:13): [True: 860, False: 88]
  |  Branch (449:31): [True: 629, False: 231]
  ------------------
  450|       |      /* 8 digits, no year, month or day yet. This is YYYYMMDD */
  451|    629|      found = TRUE;
  ------------------
  |  | 1051|    629|#define TRUE true
  ------------------
  452|    629|      w->year = val / 10000;
  453|    629|      w->mon = ((val % 10000) / 100) - 1; /* month is 0 - 11 */
  454|    629|      w->mday = val % 100;
  455|    629|    }
  456|       |
  457|  12.7k|    if(!found && (dignext == DATE_MDAY) && (w->mday == -1)) {
  ------------------
  |  Branch (457:8): [True: 11.5k, False: 1.24k]
  |  Branch (457:18): [True: 7.69k, False: 3.81k]
  |  Branch (457:44): [True: 7.54k, False: 157]
  ------------------
  458|  7.54k|      if((val > 0) && (val < 32)) {
  ------------------
  |  Branch (458:10): [True: 6.40k, False: 1.13k]
  |  Branch (458:23): [True: 4.51k, False: 1.89k]
  ------------------
  459|  4.51k|        w->mday = val;
  460|  4.51k|        found = TRUE;
  ------------------
  |  | 1051|  4.51k|#define TRUE true
  ------------------
  461|  4.51k|      }
  462|  7.54k|      dignext = DATE_YEAR;
  463|  7.54k|    }
  464|       |
  465|  12.7k|    if(!found && (dignext == DATE_YEAR) && (w->year == -1)) {
  ------------------
  |  Branch (465:8): [True: 6.99k, False: 5.76k]
  |  Branch (465:18): [True: 6.83k, False: 157]
  |  Branch (465:44): [True: 4.94k, False: 1.89k]
  ------------------
  466|  4.94k|      w->year = val;
  467|  4.94k|      found = TRUE;
  ------------------
  |  | 1051|  4.94k|#define TRUE true
  ------------------
  468|  4.94k|      if(w->year < 100) {
  ------------------
  |  Branch (468:10): [True: 3.58k, False: 1.36k]
  ------------------
  469|  3.58k|        if(w->year > 70)
  ------------------
  |  Branch (469:12): [True: 759, False: 2.82k]
  ------------------
  470|    759|          w->year += 1900;
  471|  2.82k|        else
  472|  2.82k|          w->year += 2000;
  473|  3.58k|      }
  474|  4.94k|      if(w->mday == -1)
  ------------------
  |  Branch (474:10): [True: 2.36k, False: 2.57k]
  ------------------
  475|  2.36k|        dignext = DATE_MDAY;
  476|  4.94k|    }
  477|       |
  478|  12.7k|    if(!found)
  ------------------
  |  Branch (478:8): [True: 2.04k, False: 10.7k]
  ------------------
  479|  2.04k|      return PARSEDATE_FAIL;
  ------------------
  |  |   97|  2.04k|#define PARSEDATE_FAIL   (-1)
  ------------------
  480|       |
  481|  10.7k|    date = p;
  482|  10.7k|  }
  483|  12.1k|  *datep = date;
  484|  12.1k|  *dignextp = dignext;
  485|  12.1k|  return PARSEDATE_OK;
  ------------------
  |  |   96|  12.1k|#define PARSEDATE_OK     0
  ------------------
  486|  14.3k|}
parsedate.c:match_time:
  316|  13.5k|{
  317|  13.5k|  const char *p;
  318|  13.5k|  int hh, mm, ss = 0;
  319|  13.5k|  hh = oneortwodigit(date, &p);
  320|  13.5k|  if((hh < 24) && (*p == ':') && ISDIGIT(p[1])) {
  ------------------
  |  |   44|  3.68k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 3.30k, False: 385]
  |  |  |  Branch (44:38): [True: 2.87k, False: 422]
  |  |  ------------------
  ------------------
  |  Branch (320:6): [True: 10.7k, False: 2.81k]
  |  Branch (320:19): [True: 3.68k, False: 7.04k]
  ------------------
  321|  2.87k|    mm = oneortwodigit(&p[1], &p);
  322|  2.87k|    if(mm < 60) {
  ------------------
  |  Branch (322:8): [True: 1.93k, False: 941]
  ------------------
  323|  1.93k|      if((*p == ':') && ISDIGIT(p[1])) {
  ------------------
  |  |   44|  1.32k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 1.09k, False: 224]
  |  |  |  Branch (44:38): [True: 822, False: 276]
  |  |  ------------------
  ------------------
  |  Branch (323:10): [True: 1.32k, False: 616]
  ------------------
  324|    822|        ss = oneortwodigit(&p[1], &p);
  325|    822|        if(ss <= 60) {
  ------------------
  |  Branch (325:12): [True: 346, False: 476]
  ------------------
  326|       |          /* valid HH:MM:SS */
  327|    346|          goto match;
  328|    346|        }
  329|    822|      }
  330|  1.11k|      else {
  331|       |        /* valid HH:MM */
  332|  1.11k|        goto match;
  333|  1.11k|      }
  334|  1.93k|    }
  335|  2.87k|  }
  336|  12.0k|  return FALSE; /* not a time string */
  ------------------
  |  | 1054|  12.0k|#define FALSE false
  ------------------
  337|  1.46k|match:
  338|  1.46k|  w->hour = hh;
  339|  1.46k|  w->min = mm;
  340|  1.46k|  w->sec = ss;
  341|  1.46k|  *endp = (char *)CURL_UNCONST(p);
  ------------------
  |  |  862|  1.46k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  342|       |  return TRUE;
  ------------------
  |  | 1051|  1.46k|#define TRUE true
  ------------------
  343|  13.5k|}
parsedate.c:oneortwodigit:
  304|  17.2k|{
  305|  17.2k|  int num = date[0] - '0';
  306|  17.2k|  if(ISDIGIT(date[1])) {
  ------------------
  |  |   44|  17.2k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 14.6k, False: 2.56k]
  |  |  |  Branch (44:38): [True: 7.34k, False: 7.34k]
  |  |  ------------------
  ------------------
  307|  7.34k|    *endp = &date[2];
  308|  7.34k|    return (num * 10) + (date[1] - '0');
  309|  7.34k|  }
  310|  9.90k|  *endp = &date[1];
  311|  9.90k|  return num;
  312|  17.2k|}
parsedate.c:datecheck:
  489|  3.56k|{
  490|  3.56k|  if(w->sec == -1)
  ------------------
  |  Branch (490:6): [True: 2.59k, False: 969]
  ------------------
  491|  2.59k|    w->sec = w->min = w->hour = 0; /* no time, make it zero */
  492|       |
  493|  3.56k|  if((w->mday == -1) || (w->mon == -1) || (w->year == -1))
  ------------------
  |  Branch (493:6): [True: 1.69k, False: 1.87k]
  |  Branch (493:25): [True: 1.02k, False: 846]
  |  Branch (493:43): [True: 149, False: 697]
  ------------------
  494|       |    /* lacks vital info, fail */
  495|  2.87k|    return PARSEDATE_FAIL;
  ------------------
  |  |   97|  2.87k|#define PARSEDATE_FAIL   (-1)
  ------------------
  496|       |
  497|       |  /* The Gregorian calendar was introduced 1582 */
  498|    697|  else if(w->year < 1583)
  ------------------
  |  Branch (498:11): [True: 227, False: 470]
  ------------------
  499|    227|    return PARSEDATE_FAIL;
  ------------------
  |  |   97|    227|#define PARSEDATE_FAIL   (-1)
  ------------------
  500|       |
  501|    470|  else if((w->mday > 31) || (w->mon > 11) || (w->hour > 23) ||
  ------------------
  |  Branch (501:11): [True: 86, False: 384]
  |  Branch (501:29): [True: 182, False: 202]
  |  Branch (501:46): [True: 0, False: 202]
  ------------------
  502|    202|          (w->min > 59) || (w->sec > 60))
  ------------------
  |  Branch (502:11): [True: 0, False: 202]
  |  Branch (502:28): [True: 0, False: 202]
  ------------------
  503|    268|    return PARSEDATE_FAIL; /* clearly an illegal date */
  ------------------
  |  |   97|    268|#define PARSEDATE_FAIL   (-1)
  ------------------
  504|       |
  505|    202|  return PARSEDATE_OK;
  ------------------
  |  |   96|    202|#define PARSEDATE_OK     0
  ------------------
  506|  3.56k|}
parsedate.c:time2epoch:
  288|    202|{
  289|    202|  static const int cumulative_days[12] = {
  290|    202|    0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334
  291|    202|  };
  292|    202|  int y = w->year - (w->mon <= 1);
  293|    202|  int leap_days = (y / 4) - (y / 100) + (y / 400) - LEAP_DAYS_BEFORE_1969;
  ------------------
  |  |  281|    202|#define LEAP_DAYS_BEFORE_1969 477
  ------------------
  294|    202|  curl_off_t days = (curl_off_t)(w->year - 1970) * 365 + leap_days +
  295|    202|    cumulative_days[w->mon] + w->mday - 1;
  296|       |
  297|    202|  return (((days * 24 + w->hour) * 60 + w->min) * 60) + w->sec;
  298|    202|}
parsedate.c:tzadjust:
  509|    202|{
  510|    202|  if(w->tzoff == -1) /* unknown tz means no offset */
  ------------------
  |  Branch (510:6): [True: 142, False: 60]
  ------------------
  511|    142|    w->tzoff = 0;
  512|       |
  513|       |  /* Add the time zone diff between local time zone and GMT. */
  514|    202|  if((w->tzoff > 0) && (*tp > (curl_off_t)(CURL_OFF_T_MAX - w->tzoff)))
  ------------------
  |  |  590|     29|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (514:6): [True: 29, False: 173]
  |  Branch (514:24): [True: 0, False: 29]
  ------------------
  515|      0|    *tp = CURL_OFF_T_MAX;
  ------------------
  |  |  590|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  516|    202|  else
  517|    202|    *tp += w->tzoff;
  518|       |  /* this needs no minimum check since we require a year > 1582 */
  519|    202|}
parsedate.c:mktimet:
  522|    202|{
  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|    202|  *output = (time_t)seconds;
  539|    202|  return PARSEDATE_OK;
  ------------------
  |  |   96|    202|#define PARSEDATE_OK     0
  ------------------
  540|    202|}

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

time2str:
   40|     45|{
   41|     45|  curl_off_t h;
   42|     45|  if(seconds <= 0) {
  ------------------
  |  Branch (42:6): [True: 45, False: 0]
  ------------------
   43|     45|    curlx_strcopy(r, rsize, STRCONST("       "));
  ------------------
  |  | 1297|     45|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
   44|     45|    return;
   45|     45|  }
   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);
  ------------------
  |  |  594|      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);
  ------------------
  |  |  594|      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"));
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
   77|      0|      }
   78|      0|    }
   79|      0|  }
   80|      0|}
max6out:
   90|     90|{
   91|       |  /* a signed 64-bit value is 8192 petabytes maximum, shown as
   92|       |     8.0E (exabytes)*/
   93|     90|  if(bytes < 100000)
  ------------------
  |  Branch (93:6): [True: 90, False: 0]
  ------------------
   94|     90|    curl_msnprintf(max6, mlen, "%6" CURL_FORMAT_CURL_OFF_T, bytes);
  ------------------
  |  |  341|     90|#    define CURL_FORMAT_CURL_OFF_T     "ld"
  ------------------
   95|      0|  else {
   96|      0|    const char unit[] = { 'k', 'M', 'G', 'T', 'P', 'E', 0 };
   97|      0|    int k = 0;
   98|      0|    curl_off_t nbytes;
   99|      0|    curl_off_t rest;
  100|      0|    do {
  101|      0|      nbytes = bytes / 1024;
  102|      0|      if(nbytes < 1000)
  ------------------
  |  Branch (102:10): [True: 0, False: 0]
  ------------------
  103|      0|        break;
  104|      0|      bytes = nbytes;
  105|      0|      k++;
  106|      0|      DEBUGASSERT(unit[k]);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (106:7): [True: 0, False: 0]
  |  Branch (106:7): [True: 0, False: 0]
  ------------------
  107|      0|    } while(unit[k]);
  ------------------
  |  Branch (107:13): [True: 0, False: 0]
  ------------------
  108|      0|    rest = bytes % 1024;
  109|      0|    if(nbytes <= 99)
  ------------------
  |  Branch (109:8): [True: 0, False: 0]
  ------------------
  110|       |      /* xx.yyU */
  111|      0|      curl_msnprintf(max6, mlen, "%2" CURL_FORMAT_CURL_OFF_T
  112|      0|                     ".%02" CURL_FORMAT_CURL_OFF_T "%c", nbytes,
  113|      0|                     rest * 100 / 1024, unit[k]);
  114|      0|    else
  115|       |      /* xxx.yU */
  116|      0|      curl_msnprintf(max6, mlen, "%3" CURL_FORMAT_CURL_OFF_T
  117|      0|                     ".%" CURL_FORMAT_CURL_OFF_T "%c", nbytes,
  118|      0|                     rest * 10 / 1024, unit[k]);
  119|      0|  }
  120|     90|  return max6;
  121|     90|}
pgrs_speedcheck:
  136|    749|{
  137|    749|  if(!data->set.low_speed_time || !data->set.low_speed_limit ||
  ------------------
  |  Branch (137:6): [True: 737, False: 12]
  |  Branch (137:35): [True: 9, False: 3]
  ------------------
  138|      3|     Curl_xfer_recv_is_paused(data) || Curl_xfer_send_is_paused(data))
  ------------------
  |  Branch (138:6): [True: 0, False: 3]
  |  Branch (138:40): [True: 0, False: 3]
  ------------------
  139|       |    /* A paused transfer is not qualified for speed checks */
  140|    746|    return CURLE_OK;
  141|       |
  142|      3|  if(data->progress.current_speed >= 0) {
  ------------------
  |  Branch (142:6): [True: 3, False: 0]
  ------------------
  143|      3|    if(data->progress.current_speed < data->set.low_speed_limit) {
  ------------------
  |  Branch (143:8): [True: 3, False: 0]
  ------------------
  144|      3|      if(!data->state.keeps_speed.tv_sec)
  ------------------
  |  Branch (144:10): [True: 2, False: 1]
  ------------------
  145|       |        /* under the limit at this moment */
  146|      2|        data->state.keeps_speed = *pnow;
  147|      1|      else {
  148|       |        /* how long has it been under the limit */
  149|      1|        timediff_t howlong =
  150|      1|          curlx_ptimediff_ms(pnow, &data->state.keeps_speed);
  151|       |
  152|      1|        if(howlong >= data->set.low_speed_time * 1000) {
  ------------------
  |  Branch (152:12): [True: 0, False: 1]
  ------------------
  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|      1|      }
  160|      3|    }
  161|      0|    else
  162|       |      /* faster right now */
  163|      0|      data->state.keeps_speed.tv_sec = 0;
  164|      3|  }
  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|      3|  Curl_expire(data, 1000, EXPIRE_SPEEDCHECK);
  169|       |
  170|      3|  return CURLE_OK;
  171|      3|}
Curl_pgrs_now:
  174|  1.26M|{
  175|  1.26M|  curlx_pnow(&data->progress.now);
  176|  1.26M|  return &data->progress.now;
  177|  1.26M|}
Curl_pgrsDone:
  192|  3.40k|{
  193|  3.40k|  int rc;
  194|  3.40k|  data->progress.lastshow = 0;
  195|  3.40k|  rc = Curl_pgrsUpdate(data); /* the final (forced) update */
  196|  3.40k|  if(rc)
  ------------------
  |  Branch (196:6): [True: 0, False: 3.40k]
  ------------------
  197|      0|    return rc;
  198|       |
  199|  3.40k|  if(!data->progress.hide && !data->progress.callback)
  ------------------
  |  Branch (199:6): [True: 10, False: 3.39k]
  |  Branch (199:30): [True: 10, False: 0]
  ------------------
  200|       |    /* only output if we do not use a progress callback and we are not
  201|       |     * hidden */
  202|     10|    curl_mfprintf(data->set.err, "\n");
  203|       |
  204|  3.40k|  return 0;
  205|  3.40k|}
Curl_pgrsReset:
  208|  7.93k|{
  209|  7.93k|  Curl_pgrsSetUploadCounter(data, 0);
  210|  7.93k|  data->progress.dl.cur_size = 0;
  211|  7.93k|  Curl_pgrsSetUploadSize(data, -1);
  212|  7.93k|  Curl_pgrsSetDownloadSize(data, -1);
  213|  7.93k|  data->progress.speeder_c = 0; /* reset speed records */
  214|  7.93k|  data->progress.deliver = 0;
  215|  7.93k|  pgrs_speedinit(data);
  216|  7.93k|}
Curl_pgrsResetTransferSizes:
  220|  9.76k|{
  221|  9.76k|  Curl_pgrsSetDownloadSize(data, -1);
  222|  9.76k|  Curl_pgrsSetUploadSize(data, -1);
  223|  9.76k|}
Curl_pgrsTimeWas:
  270|  87.4k|{
  271|  87.4k|  timediff_t *delta = NULL;
  272|       |
  273|  87.4k|  switch(timer) {
  274|      0|  default:
  ------------------
  |  Branch (274:3): [True: 0, False: 87.4k]
  ------------------
  275|      0|  case TIMER_NONE:
  ------------------
  |  Branch (275:3): [True: 0, False: 87.4k]
  ------------------
  276|       |    /* mistake filter */
  277|      0|    break;
  278|  17.4k|  case TIMER_STARTOP:
  ------------------
  |  Branch (278:3): [True: 17.4k, False: 69.9k]
  ------------------
  279|       |    /* This is set at the start of a transfer */
  280|  17.4k|    data->progress.t_startop = timestamp;
  281|  17.4k|    data->progress.t_startqueue = timestamp;
  282|  17.4k|    data->progress.t_postqueue = 0;
  283|  17.4k|    break;
  284|  9.76k|  case TIMER_STARTSINGLE:
  ------------------
  |  Branch (284:3): [True: 9.76k, False: 77.6k]
  ------------------
  285|       |    /* This is set at the start of each single transfer */
  286|  9.76k|    data->progress.t_startsingle = timestamp;
  287|  9.76k|    data->progress.is_t_startransfer_set = FALSE;
  ------------------
  |  | 1054|  9.76k|#define FALSE false
  ------------------
  288|  9.76k|    break;
  289|  7.93k|  case TIMER_POSTQUEUE:
  ------------------
  |  Branch (289:3): [True: 7.93k, False: 79.4k]
  ------------------
  290|       |    /* Queue time is accumulative from all involved redirects */
  291|  7.93k|    data->progress.t_postqueue +=
  292|  7.93k|      curlx_ptimediff_us(&timestamp, &data->progress.t_startqueue);
  293|  7.93k|    break;
  294|      0|  case TIMER_STARTACCEPT:
  ------------------
  |  Branch (294:3): [True: 0, False: 87.4k]
  ------------------
  295|      0|    data->progress.t_acceptdata = timestamp;
  296|      0|    break;
  297|  7.45k|  case TIMER_NAMELOOKUP:
  ------------------
  |  Branch (297:3): [True: 7.45k, False: 79.9k]
  ------------------
  298|  7.45k|    delta = &data->progress.t_nslookup;
  299|  7.45k|    break;
  300|  7.16k|  case TIMER_CONNECT:
  ------------------
  |  Branch (300:3): [True: 7.16k, False: 80.2k]
  ------------------
  301|  7.16k|    delta = &data->progress.t_connect;
  302|  7.16k|    break;
  303|      0|  case TIMER_APPCONNECT:
  ------------------
  |  Branch (303:3): [True: 0, False: 87.4k]
  ------------------
  304|      0|    delta = &data->progress.t_appconnect;
  305|      0|    break;
  306|  12.7k|  case TIMER_PRETRANSFER:
  ------------------
  |  Branch (306:3): [True: 12.7k, False: 74.6k]
  ------------------
  307|  12.7k|    delta = &data->progress.t_pretransfer;
  308|  12.7k|    break;
  309|  12.1k|  case TIMER_STARTTRANSFER:
  ------------------
  |  Branch (309:3): [True: 12.1k, False: 75.2k]
  ------------------
  310|       |    /* prevent updating t_starttransfer unless:
  311|       |     *   1. this is the first time we are setting t_starttransfer
  312|       |     *   2. a redirect has occurred since the last time t_starttransfer was set
  313|       |     * This prevents repeated invocations of the function from incorrectly
  314|       |     * changing the t_starttransfer time.
  315|       |     */
  316|  12.1k|    if(data->progress.is_t_startransfer_set) {
  ------------------
  |  Branch (316:8): [True: 0, False: 12.1k]
  ------------------
  317|      0|      CURL_TRC_M(data, "[%s] ignored", pgrs_timer_name(timer));
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  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]
  |  |  ------------------
  ------------------
  318|      0|      return;
  319|      0|    }
  320|  12.1k|    data->progress.is_t_startransfer_set = TRUE;
  ------------------
  |  | 1051|  12.1k|#define TRUE true
  ------------------
  321|  12.1k|    delta = &data->progress.t_starttransfer;
  322|  12.1k|    break;
  323|  12.7k|  case TIMER_POSTRANSFER:
  ------------------
  |  Branch (323:3): [True: 12.7k, False: 74.6k]
  ------------------
  324|  12.7k|    delta = &data->progress.t_posttransfer;
  325|  12.7k|    break;
  326|      0|  case TIMER_REDIRECT:
  ------------------
  |  Branch (326:3): [True: 0, False: 87.4k]
  ------------------
  327|      0|    data->progress.t_redirect = curlx_ptimediff_us(&timestamp,
  328|      0|                                                   &data->progress.start);
  329|      0|    data->progress.t_startqueue = timestamp;
  330|      0|    break;
  331|  87.4k|  }
  332|  87.4k|  if(delta) {
  ------------------
  |  Branch (332:6): [True: 52.2k, False: 35.1k]
  ------------------
  333|  52.2k|    timediff_t us = curlx_ptimediff_us(&timestamp,
  334|  52.2k|                                       &data->progress.t_startsingle);
  335|  52.2k|    if(us < 1)
  ------------------
  |  Branch (335:8): [True: 5, False: 52.2k]
  ------------------
  336|      5|      us = 1; /* make sure at least one microsecond passed */
  337|  52.2k|    *delta += us;
  338|  52.2k|    CURL_TRC_M(data, "[%s] added %" FMT_TIMEDIFF_T "us",
  ------------------
  |  |  148|  52.2k|  do {                                   \
  |  |  149|  52.2k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  52.2k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  52.2k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|   104k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 52.2k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 52.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|   104k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((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|  52.2k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  52.2k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  52.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 52.2k]
  |  |  ------------------
  ------------------
  339|  52.2k|               pgrs_timer_name(timer), us);
  340|  52.2k|  }
  341|  35.1k|  else
  342|  35.1k|    CURL_TRC_M(data, "[%s] set", pgrs_timer_name(timer));
  ------------------
  |  |  148|  35.1k|  do {                                   \
  |  |  149|  35.1k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  35.1k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  35.1k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  70.2k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 35.1k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 35.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  70.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|  35.1k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  35.1k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  35.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 35.1k]
  |  |  ------------------
  ------------------
  343|  87.4k|}
Curl_pgrsTime:
  352|  80.2k|{
  353|  80.2k|  Curl_pgrsTimeWas(data, timer, *Curl_pgrs_now(data));
  354|  80.2k|}
Curl_pgrsStartNow:
  357|  9.76k|{
  358|  9.76k|  struct Progress *p = &data->progress;
  359|       |
  360|  9.76k|  p->speeder_c = 0; /* reset the progress meter display */
  361|  9.76k|  p->start = *Curl_pgrs_now(data);
  362|  9.76k|  p->is_t_startransfer_set = FALSE;
  ------------------
  |  | 1054|  9.76k|#define FALSE false
  ------------------
  363|  9.76k|  p->dl.cur_size = 0;
  364|  9.76k|  p->ul.cur_size = 0;
  365|       |  /* the sizes are unknown at start */
  366|  9.76k|  p->dl_size_known = FALSE;
  ------------------
  |  | 1054|  9.76k|#define FALSE false
  ------------------
  367|       |  p->ul_size_known = FALSE;
  ------------------
  |  | 1054|  9.76k|#define FALSE false
  ------------------
  368|  9.76k|}
Curl_pgrs_deliver_check:
  373|  6.28k|{
  374|  6.28k|  if(data->set.max_filesize &&
  ------------------
  |  Branch (374:6): [True: 840, False: 5.44k]
  ------------------
  375|    840|     ((curl_off_t)delta > data->set.max_filesize - data->progress.deliver)) {
  ------------------
  |  Branch (375:6): [True: 0, False: 840]
  ------------------
  376|      0|    failf(data, "Would have exceeded max file size");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  377|      0|    return CURLE_FILESIZE_EXCEEDED;
  378|      0|  }
  379|  6.28k|  return CURLE_OK;
  380|  6.28k|}
Curl_pgrs_deliver_inc:
  385|  6.28k|{
  386|  6.28k|  data->progress.deliver += delta;
  387|  6.28k|}
Curl_pgrs_download_inc:
  390|  6.27k|{
  391|  6.27k|  if(delta) {
  ------------------
  |  Branch (391:6): [True: 6.27k, False: 0]
  ------------------
  392|  6.27k|    data->progress.dl.cur_size += delta;
  393|       |    Curl_rlimit_drain(&data->progress.dl.rlimit, delta, NULL);
  394|  6.27k|  }
  395|  6.27k|}
Curl_pgrsSetUploadCounter:
  409|  7.93k|{
  410|  7.93k|  data->progress.ul.cur_size = size;
  411|  7.93k|}
Curl_pgrsSetDownloadSize:
  414|  17.6k|{
  415|  17.6k|  if(size >= 0) {
  ------------------
  |  Branch (415:6): [True: 0, False: 17.6k]
  ------------------
  416|      0|    data->progress.dl.total_size = size;
  417|      0|    data->progress.dl_size_known = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  418|      0|  }
  419|  17.6k|  else {
  420|  17.6k|    data->progress.dl.total_size = 0;
  421|       |    data->progress.dl_size_known = FALSE;
  ------------------
  |  | 1054|  17.6k|#define FALSE false
  ------------------
  422|  17.6k|  }
  423|  17.6k|}
Curl_pgrsSetUploadSize:
  426|  17.6k|{
  427|  17.6k|  if(size >= 0) {
  ------------------
  |  Branch (427:6): [True: 0, False: 17.6k]
  ------------------
  428|      0|    data->progress.ul.total_size = size;
  429|      0|    data->progress.ul_size_known = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  430|      0|  }
  431|  17.6k|  else {
  432|  17.6k|    data->progress.ul.total_size = 0;
  433|       |    data->progress.ul_size_known = FALSE;
  ------------------
  |  | 1054|  17.6k|#define FALSE false
  ------------------
  434|  17.6k|  }
  435|  17.6k|}
Curl_pgrsUpdate:
  710|  29.1k|{
  711|  29.1k|  return pgrs_update(data, Curl_pgrs_now(data));
  712|  29.1k|}
Curl_pgrsCheck:
  715|    749|{
  716|    749|  CURLcode result;
  717|       |
  718|    749|  result = pgrs_update(data, Curl_pgrs_now(data));
  719|    749|  if(!result && !data->req.done)
  ------------------
  |  Branch (719:6): [True: 749, False: 0]
  |  Branch (719:17): [True: 749, False: 0]
  ------------------
  720|    749|    result = pgrs_speedcheck(data, Curl_pgrs_now(data));
  721|    749|  return result;
  722|    749|}
Curl_pgrsUpdate_nometer:
  728|  1.67k|{
  729|  1.67k|  (void)progress_calc(data, Curl_pgrs_now(data));
  730|  1.67k|}
Curl_pgrsCompleted:
  733|  12.5k|{
  734|  12.5k|  struct Progress * const p = &data->progress;
  735|  12.5k|  p->timespent = curlx_ptimediff_us(Curl_pgrs_now(data), &p->start);
  736|  12.5k|}
progress.c:pgrs_speedinit:
  125|  7.93k|{
  126|  7.93k|  memset(&data->state.keeps_speed, 0, sizeof(struct curltime));
  127|  7.93k|}
progress.c:pgrs_update:
  704|  29.9k|{
  705|       |  bool showprogress = progress_calc(data, pnow);
  706|  29.9k|  return pgrsupdate(data, showprogress);
  707|  29.9k|}
progress.c:pgrsupdate:
  657|  29.9k|{
  658|  29.9k|  if(!data->progress.hide) {
  ------------------
  |  Branch (658:6): [True: 257, False: 29.6k]
  ------------------
  659|    257|    int rc;
  660|    257|    if(data->set.fxferinfo) {
  ------------------
  |  Branch (660:8): [True: 0, False: 257]
  ------------------
  661|       |      /* There is a callback set, call that */
  662|      0|      Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  663|      0|      rc = data->set.fxferinfo(data->set.progress_client,
  664|      0|                               data->progress.dl.total_size,
  665|      0|                               data->progress.dl.cur_size,
  666|      0|                               data->progress.ul.total_size,
  667|      0|                               data->progress.ul.cur_size);
  668|      0|      Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  669|      0|      if(rc != CURL_PROGRESSFUNC_CONTINUE) {
  ------------------
  |  |  234|      0|#define CURL_PROGRESSFUNC_CONTINUE 0x10000001
  ------------------
  |  Branch (669:10): [True: 0, False: 0]
  ------------------
  670|      0|        if(rc) {
  ------------------
  |  Branch (670:12): [True: 0, False: 0]
  ------------------
  671|      0|          failf(data, "Callback aborted");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  672|      0|          return CURLE_ABORTED_BY_CALLBACK;
  673|      0|        }
  674|      0|        return CURLE_OK;
  675|      0|      }
  676|      0|    }
  677|    257|    else if(data->set.fprogress) {
  ------------------
  |  Branch (677:13): [True: 0, False: 257]
  ------------------
  678|       |      /* The older deprecated callback is set, call that */
  679|      0|      Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  680|      0|      rc = data->set.fprogress(data->set.progress_client,
  681|      0|                               (double)data->progress.dl.total_size,
  682|      0|                               (double)data->progress.dl.cur_size,
  683|      0|                               (double)data->progress.ul.total_size,
  684|      0|                               (double)data->progress.ul.cur_size);
  685|      0|      Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  686|      0|      if(rc != CURL_PROGRESSFUNC_CONTINUE) {
  ------------------
  |  |  234|      0|#define CURL_PROGRESSFUNC_CONTINUE 0x10000001
  ------------------
  |  Branch (686:10): [True: 0, False: 0]
  ------------------
  687|      0|        if(rc) {
  ------------------
  |  Branch (687:12): [True: 0, False: 0]
  ------------------
  688|      0|          failf(data, "Callback aborted");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  689|      0|          return CURLE_ABORTED_BY_CALLBACK;
  690|      0|        }
  691|      0|        return CURLE_OK;
  692|      0|      }
  693|      0|    }
  694|       |
  695|    257|    if(showprogress)
  ------------------
  |  Branch (695:8): [True: 15, False: 242]
  ------------------
  696|     15|      progress_meter(data);
  697|    257|  }
  698|       |
  699|  29.9k|  return CURLE_OK;
  700|  29.9k|}
progress.c:progress_meter:
  563|     15|{
  564|     15|  struct Progress *p = &data->progress;
  565|     15|  char max6[6][7];
  566|     15|  struct pgrs_estimate dl_estm;
  567|     15|  struct pgrs_estimate ul_estm;
  568|     15|  struct pgrs_estimate total_estm;
  569|     15|  curl_off_t total_cur_size;
  570|     15|  curl_off_t total_expected_size;
  571|     15|  curl_off_t dl_size;
  572|     15|  char time_left[8];
  573|     15|  char time_total[8];
  574|     15|  char time_spent[8];
  575|     15|  curl_off_t cur_secs = (curl_off_t)p->timespent / 1000000; /* seconds */
  576|       |
  577|     15|  if(!p->headers_out) {
  ------------------
  |  Branch (577:6): [True: 15, False: 0]
  ------------------
  578|     15|    if(data->state.resume_from) {
  ------------------
  |  Branch (578:8): [True: 2, False: 13]
  ------------------
  579|      2|      curl_mfprintf(data->set.err,
  580|      2|                    "** Resuming transfer from byte position %" FMT_OFF_T "\n",
  581|      2|                    data->state.resume_from);
  582|      2|    }
  583|     15|    curl_mfprintf(data->set.err,
  584|     15|                  "  %% Total    %% Received %% Xferd  Average Speed  "
  585|     15|                  "Time    Time    Time   Current\n"
  586|     15|                  "                                 Dload  Upload  "
  587|     15|                  "Total   Spent   Left   Speed\n");
  588|     15|    p->headers_out = TRUE; /* headers are shown */
  ------------------
  |  | 1051|     15|#define TRUE true
  ------------------
  589|     15|  }
  590|       |
  591|       |  /* Figure out the estimated time of arrival for upload and download */
  592|     15|  pgrs_estimates(&p->ul, (bool)p->ul_size_known, &ul_estm);
  593|     15|  pgrs_estimates(&p->dl, (bool)p->dl_size_known, &dl_estm);
  594|       |
  595|       |  /* Since both happen at the same time, total expected duration is max. */
  596|     15|  total_estm.secs = CURLMAX(ul_estm.secs, dl_estm.secs);
  ------------------
  |  | 1291|     15|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1291:24): [True: 0, False: 15]
  |  |  ------------------
  ------------------
  597|       |  /* create the three time strings */
  598|     15|  time2str(time_left, sizeof(time_left),
  599|     15|           total_estm.secs > 0 ? (total_estm.secs - cur_secs) : 0);
  ------------------
  |  Branch (599:12): [True: 0, False: 15]
  ------------------
  600|     15|  time2str(time_total, sizeof(time_total), total_estm.secs);
  601|     15|  time2str(time_spent, sizeof(time_spent), cur_secs);
  602|       |
  603|       |  /* Get the total amount of data expected to get transferred */
  604|     15|  total_expected_size = p->ul_size_known ? p->ul.total_size : p->ul.cur_size;
  ------------------
  |  Branch (604:25): [True: 0, False: 15]
  ------------------
  605|       |
  606|     15|  dl_size = p->dl_size_known ? p->dl.total_size : p->dl.cur_size;
  ------------------
  |  Branch (606:13): [True: 0, False: 15]
  ------------------
  607|       |
  608|       |  /* integer overflow check */
  609|     15|  if((CURL_OFF_T_MAX - total_expected_size) < dl_size)
  ------------------
  |  |  590|     15|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (609:6): [True: 0, False: 15]
  ------------------
  610|      0|    total_expected_size = CURL_OFF_T_MAX; /* capped */
  ------------------
  |  |  590|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  611|     15|  else
  612|     15|    total_expected_size += dl_size;
  613|       |
  614|       |  /* We have transferred this much so far */
  615|     15|  total_cur_size = p->dl.cur_size + p->ul.cur_size;
  616|       |
  617|       |  /* Get the percentage of data transferred so far */
  618|     15|  total_estm.percent = pgrs_est_percent(total_expected_size, total_cur_size);
  619|       |
  620|     15|  curl_mfprintf(data->set.err,
  621|     15|                "\r"
  622|     15|                "%3" FMT_OFF_T " %s "
  623|     15|                "%3" FMT_OFF_T " %s "
  624|     15|                "%3" FMT_OFF_T " %s %s %s %s %s %s %s",
  625|     15|                total_estm.percent, /* 3 letters */    /* total % */
  626|     15|                max6out(total_expected_size, max6[2],
  627|     15|                        sizeof(max6[2])),              /* total size */
  628|     15|                dl_estm.percent, /* 3 letters */       /* rcvd % */
  629|     15|                max6out(p->dl.cur_size, max6[0],
  630|     15|                        sizeof(max6[0])),              /* rcvd size */
  631|     15|                ul_estm.percent, /* 3 letters */       /* xfer % */
  632|     15|                max6out(p->ul.cur_size, max6[1],
  633|     15|                        sizeof(max6[1])),              /* xfer size */
  634|     15|                max6out(p->dl.speed, max6[3],
  635|     15|                        sizeof(max6[3])),              /* avrg dl speed */
  636|     15|                max6out(p->ul.speed, max6[4],
  637|     15|                        sizeof(max6[4])),              /* avrg ul speed */
  638|     15|                time_total,    /* 7 letters */         /* total time */
  639|     15|                time_spent,    /* 7 letters */         /* time spent */
  640|     15|                time_left,     /* 7 letters */         /* time left */
  641|     15|                max6out(p->current_speed, max6[5],
  642|     15|                        sizeof(max6[5]))               /* current speed */
  643|     15|    );
  644|       |
  645|       |  /* we flush the output stream to make it appear as soon as possible */
  646|     15|  fflush(data->set.err);
  647|     15|}
progress.c:pgrs_estimates:
  553|     30|{
  554|     30|  est->secs = 0;
  555|     30|  est->percent = 0;
  556|     30|  if(total_known && (d->speed > 0)) {
  ------------------
  |  Branch (556:6): [True: 0, False: 30]
  |  Branch (556:21): [True: 0, False: 0]
  ------------------
  557|      0|    est->secs = d->total_size / d->speed;
  558|      0|    est->percent = pgrs_est_percent(d->total_size, d->cur_size);
  559|      0|  }
  560|     30|}
progress.c:pgrs_est_percent:
  542|     15|{
  543|     15|  if(total > 10000)
  ------------------
  |  Branch (543:6): [True: 0, False: 15]
  ------------------
  544|      0|    return cur / (total / 100);
  545|     15|  else if(total > 0)
  ------------------
  |  Branch (545:11): [True: 0, False: 15]
  ------------------
  546|      0|    return (cur * 100) / total;
  547|     15|  return 0;
  548|     15|}
progress.c:progress_calc:
  459|  31.6k|{
  460|  31.6k|  struct Progress * const p = &data->progress;
  461|  31.6k|  int i_next, i_oldest, i_latest;
  462|  31.6k|  timediff_t duration_us;
  463|  31.6k|  curl_off_t amount;
  464|       |
  465|       |  /* The time spent so far (from the start) in microseconds */
  466|  31.6k|  p->timespent = curlx_ptimediff_us(pnow, &p->start);
  467|  31.6k|  p->dl.speed = trspeed(p->dl.cur_size, p->timespent);
  468|  31.6k|  p->ul.speed = trspeed(p->ul.cur_size, p->timespent);
  469|       |
  470|  31.6k|  if(!p->speeder_c) { /* no previous record exists */
  ------------------
  |  Branch (470:6): [True: 6.29k, False: 25.3k]
  ------------------
  471|  6.29k|    p->speed_amount[0] = p->dl.cur_size + p->ul.cur_size;
  472|  6.29k|    p->speed_time[0] = *pnow;
  473|  6.29k|    p->speeder_c++;
  474|       |    /* use the overall average at the start */
  475|  6.29k|    p->current_speed = p->ul.speed + p->dl.speed;
  476|  6.29k|    p->lastshow = pnow->tv_sec;
  477|  6.29k|    return TRUE;
  ------------------
  |  | 1051|  6.29k|#define TRUE true
  ------------------
  478|  6.29k|  }
  479|       |  /* We have at least one record now. Where to put the next and
  480|       |   * where is the latest one? */
  481|  25.3k|  i_next = p->speeder_c % CURL_SPEED_RECORDS;
  ------------------
  |  |  479|  25.3k|#define CURL_SPEED_RECORDS (5 + 1) /* 6 entries for 5 seconds */
  ------------------
  482|  25.3k|  i_latest = (i_next > 0) ? (i_next - 1) : (CURL_SPEED_RECORDS - 1);
  ------------------
  |  |  479|      0|#define CURL_SPEED_RECORDS (5 + 1) /* 6 entries for 5 seconds */
  ------------------
  |  Branch (482:14): [True: 25.3k, False: 0]
  ------------------
  483|       |
  484|       |  /* Make a new record only when some time has passed.
  485|       |   * Too frequent calls otherwise ruin the history. */
  486|  25.3k|  if(curlx_ptimediff_ms(pnow, &p->speed_time[i_latest]) >= 1000) {
  ------------------
  |  Branch (486:6): [True: 0, False: 25.3k]
  ------------------
  487|      0|    p->speeder_c++;
  488|      0|    i_latest = i_next;
  489|      0|    p->speed_amount[i_latest] = p->dl.cur_size + p->ul.cur_size;
  490|      0|    p->speed_time[i_latest] = *pnow;
  491|      0|  }
  492|  25.3k|  else if(data->req.done) {
  ------------------
  |  Branch (492:11): [True: 180, False: 25.1k]
  ------------------
  493|       |    /* When a transfer is done, and we did not have a current speed
  494|       |     * already, update the last record. Otherwise, stay at the speed
  495|       |     * we have. The last chunk of data, when rate limiting, would increase
  496|       |     * reported speed since it no longer measures a full second. */
  497|    180|    if(!p->current_speed) {
  ------------------
  |  Branch (497:8): [True: 180, False: 0]
  ------------------
  498|    180|      p->speed_amount[i_latest] = p->dl.cur_size + p->ul.cur_size;
  499|    180|      p->speed_time[i_latest] = *pnow;
  500|    180|    }
  501|    180|  }
  502|  25.1k|  else {
  503|       |    /* transfer ongoing, wait for more time to pass. */
  504|  25.1k|    return FALSE;
  ------------------
  |  | 1054|  25.1k|#define FALSE false
  ------------------
  505|  25.1k|  }
  506|       |
  507|    180|  i_oldest = (p->speeder_c < CURL_SPEED_RECORDS) ? 0 :
  ------------------
  |  |  479|    180|#define CURL_SPEED_RECORDS (5 + 1) /* 6 entries for 5 seconds */
  ------------------
  |  Branch (507:14): [True: 180, False: 0]
  ------------------
  508|    180|             ((i_latest + 1) % CURL_SPEED_RECORDS);
  ------------------
  |  |  479|      0|#define CURL_SPEED_RECORDS (5 + 1) /* 6 entries for 5 seconds */
  ------------------
  509|       |
  510|       |  /* How much we transferred between oldest and current records */
  511|    180|  amount = p->speed_amount[i_latest] - p->speed_amount[i_oldest];
  512|       |  /* How long this took */
  513|    180|  duration_us = curlx_ptimediff_us(&p->speed_time[i_latest],
  514|    180|                                   &p->speed_time[i_oldest]);
  515|    180|  if(duration_us <= 0)
  ------------------
  |  Branch (515:6): [True: 180, False: 0]
  ------------------
  516|    180|    duration_us = 1;
  517|       |
  518|    180|  if(amount > (CURL_OFF_T_MAX / 1000000)) {
  ------------------
  |  |  590|    180|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (518:6): [True: 0, False: 180]
  ------------------
  519|       |    /* the 'amount' value is bigger than would fit in 64 bits if
  520|       |       multiplied with 1000000, so we use the double math for this */
  521|      0|    p->current_speed =
  522|      0|      (curl_off_t)(((double)amount * 1000000.0) / (double)duration_us);
  523|      0|  }
  524|    180|  else {
  525|    180|    p->current_speed = amount * 1000000 / duration_us;
  526|    180|  }
  527|       |
  528|    180|  if((p->lastshow == pnow->tv_sec) && !data->req.done)
  ------------------
  |  Branch (528:6): [True: 120, False: 60]
  |  Branch (528:39): [True: 0, False: 120]
  ------------------
  529|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  530|    180|  p->lastshow = pnow->tv_sec;
  531|       |  return TRUE;
  ------------------
  |  | 1051|    180|#define TRUE true
  ------------------
  532|    180|}
progress.c:trspeed:
  445|  63.2k|{
  446|  63.2k|  if(us < 1)
  ------------------
  |  Branch (446:6): [True: 4, False: 63.1k]
  ------------------
  447|      4|    return size * 1000000;
  448|  63.1k|  else if(size < CURL_OFF_T_MAX / 1000000)
  ------------------
  |  |  590|  63.1k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (448:11): [True: 63.1k, False: 0]
  ------------------
  449|  63.1k|    return (size * 1000000) / us;
  450|      0|  else if(us >= 1000000)
  ------------------
  |  Branch (450:11): [True: 0, False: 0]
  ------------------
  451|      0|    return size / (us / 1000000);
  452|      0|  else
  453|      0|    return CURL_OFF_T_MAX;
  ------------------
  |  |  590|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  454|  63.2k|}

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

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

Curl_rand_bytes:
  160|      5|{
  161|      5|  CURLcode result = CURLE_BAD_FUNCTION_ARGUMENT;
  162|       |#ifndef DEBUGBUILD
  163|       |  const bool env_override = FALSE;
  164|       |#endif
  165|       |
  166|      5|  DEBUGASSERT(num);
  ------------------
  |  | 1077|      5|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (166:3): [True: 0, False: 5]
  |  Branch (166:3): [True: 5, False: 0]
  ------------------
  167|       |
  168|     15|  while(num) {
  ------------------
  |  Branch (168:9): [True: 10, False: 5]
  ------------------
  169|     10|    unsigned int r;
  170|     10|    size_t left = num < sizeof(unsigned int) ? num : sizeof(unsigned int);
  ------------------
  |  Branch (170:19): [True: 0, False: 10]
  ------------------
  171|       |
  172|     10|    result = randit(data, &r, env_override);
  173|     10|    if(result)
  ------------------
  |  Branch (173:8): [True: 0, False: 10]
  ------------------
  174|      0|      return result;
  175|       |
  176|     50|    while(left) {
  ------------------
  |  Branch (176:11): [True: 40, False: 10]
  ------------------
  177|     40|      *rnd++ = (unsigned char)(r & 0xFF);
  178|     40|      r >>= 8;
  179|     40|      --num;
  180|     40|      --left;
  181|     40|    }
  182|     10|  }
  183|       |
  184|      5|  return result;
  185|      5|}
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);
  ------------------
  |  | 1077|    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);
  ------------------
  |  | 1051|  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.17k|{
  106|  3.17k|#ifdef DEBUGBUILD
  107|  3.17k|  if(env_override) {
  ------------------
  |  Branch (107:6): [True: 3.17k, False: 0]
  ------------------
  108|  3.17k|    char *force_entropy = getenv("CURL_ENTROPY");
  109|  3.17k|    if(force_entropy) {
  ------------------
  |  Branch (109:8): [True: 0, False: 3.17k]
  ------------------
  110|      0|      static unsigned int randseed;
  111|      0|      static bool seeded = FALSE;
  ------------------
  |  | 1054|      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;
  ------------------
  |  | 1051|      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.17k|  }
  128|       |#else
  129|       |  (void)env_override;
  130|       |#endif
  131|       |
  132|       |  /* data may be NULL! */
  133|  3.17k|#ifdef USE_SSL
  134|  3.17k|  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.17k|}

Curl_rlimit_init:
  158|    287|{
  159|    287|  DEBUGASSERT(rate_per_sec >= 0);
  ------------------
  |  | 1077|    287|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (159:3): [True: 0, False: 287]
  |  Branch (159:3): [True: 287, False: 0]
  ------------------
  160|    287|  DEBUGASSERT(burst_per_sec >= rate_per_sec || !burst_per_sec);
  ------------------
  |  | 1077|    287|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (160:3): [True: 287, False: 0]
  |  Branch (160:3): [True: 0, False: 0]
  |  Branch (160:3): [True: 287, False: 0]
  |  Branch (160:3): [True: 0, False: 0]
  ------------------
  161|    287|  DEBUGASSERT(pts);
  ------------------
  |  | 1077|    287|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (161:3): [True: 0, False: 287]
  |  Branch (161:3): [True: 287, False: 0]
  ------------------
  162|    287|  r->rate_per_step = r->rate_per_sec = rate_per_sec;
  163|    287|  r->burst_per_step = r->burst_per_sec = burst_per_sec;
  164|    287|  r->step_us = CURL_US_PER_SEC;
  ------------------
  |  |   29|    287|#define CURL_US_PER_SEC         1000000
  ------------------
  165|    287|  r->spare_us = 0;
  166|    287|  r->tokens = r->rate_per_step;
  167|    287|  r->ts = *pts;
  168|       |  r->blocked = FALSE;
  ------------------
  |  | 1054|    287|#define FALSE false
  ------------------
  169|    287|}
Curl_rlimit_start:
  173|    316|{
  174|       |  /* A start always resets the values to initial defaults, then
  175|       |   * fine tunes the intervals for the total_tokens expected. */
  176|    316|  r->rate_per_step = r->rate_per_sec;
  177|    316|  r->burst_per_step = r->burst_per_sec;
  178|    316|  r->step_us = CURL_US_PER_SEC;
  ------------------
  |  |   29|    316|#define CURL_US_PER_SEC         1000000
  ------------------
  179|    316|  r->spare_us = 0;
  180|    316|  r->tokens = r->rate_per_step;
  181|    316|  r->ts = *pts;
  182|    316|  rlimit_tune_steps(r, total_tokens);
  183|    316|}
Curl_rlimit_active:
  191|  5.03k|{
  192|  5.03k|  return (r->rate_per_step > 0) || r->blocked;
  ------------------
  |  Branch (192:10): [True: 612, False: 4.42k]
  |  Branch (192:36): [True: 0, False: 4.42k]
  ------------------
  193|  5.03k|}
Curl_rlimit_is_blocked:
  196|  14.0k|{
  197|  14.0k|  return (bool)r->blocked;
  198|  14.0k|}
Curl_rlimit_avail:
  202|  8.66k|{
  203|  8.66k|  struct curltime ts;
  204|       |
  205|  8.66k|  if(r->blocked)
  ------------------
  |  Branch (205:6): [True: 0, False: 8.66k]
  ------------------
  206|      0|    return 0;
  207|  8.66k|  else if(r->rate_per_step) {
  ------------------
  |  Branch (207:11): [True: 554, False: 8.11k]
  ------------------
  208|    554|    if(!pts) {
  ------------------
  |  Branch (208:8): [True: 554, False: 0]
  ------------------
  209|    554|      curlx_pnow(&ts);
  210|    554|      pts = &ts;
  211|    554|    }
  212|    554|    rlimit_update(r, pts);
  213|    554|    return r->tokens;
  214|    554|  }
  215|  8.11k|  else
  216|  8.11k|    return INT64_MAX;
  217|  8.66k|}
Curl_rlimit_drain:
  221|  6.27k|{
  222|  6.27k|  struct curltime ts;
  223|       |
  224|  6.27k|  if(r->blocked || !r->rate_per_step)
  ------------------
  |  Branch (224:6): [True: 0, False: 6.27k]
  |  Branch (224:20): [True: 4.60k, False: 1.67k]
  ------------------
  225|  4.60k|    return;
  226|       |
  227|  1.67k|  if(!pts) {
  ------------------
  |  Branch (227:6): [True: 1.67k, False: 0]
  ------------------
  228|  1.67k|    curlx_pnow(&ts);
  229|  1.67k|    pts = &ts;
  230|  1.67k|  }
  231|  1.67k|  rlimit_update(r, pts);
  232|  1.67k|#if 8 <= SIZEOF_SIZE_T
  233|  1.67k|  if(tokens > INT64_MAX) {
  ------------------
  |  Branch (233:6): [True: 0, False: 1.67k]
  ------------------
  234|      0|    r->tokens = INT64_MAX;
  235|      0|  }
  236|  1.67k|  else
  237|  1.67k|#endif
  238|  1.67k|  {
  239|  1.67k|    int64_t val = (int64_t)tokens;
  240|  1.67k|    if((INT64_MIN + val) < r->tokens)
  ------------------
  |  Branch (240:8): [True: 1.67k, False: 0]
  ------------------
  241|  1.67k|      r->tokens -= val;
  242|      0|    else
  243|      0|      r->tokens = INT64_MIN;
  244|  1.67k|  }
  245|  1.67k|}
Curl_rlimit_wait_ms:
  249|    850|{
  250|    850|  timediff_t wait_us, elapsed_us;
  251|       |
  252|    850|  if(r->blocked || !r->rate_per_step)
  ------------------
  |  Branch (252:6): [True: 0, False: 850]
  |  Branch (252:20): [True: 406, False: 444]
  ------------------
  253|    406|    return 0;
  254|    444|  rlimit_update(r, pts);
  255|    444|  if(r->tokens > 0)
  ------------------
  |  Branch (255:6): [True: 379, False: 65]
  ------------------
  256|    379|    return 0;
  257|       |
  258|       |  /* How much time will it take tokens to become positive again?
  259|       |   * Deduct `spare_us` and check against already elapsed time */
  260|     65|  wait_us = r->step_us - r->spare_us;
  261|     65|  if(r->tokens < 0) {
  ------------------
  |  Branch (261:6): [True: 59, False: 6]
  ------------------
  262|     59|    curl_off_t debt_pct = ((-r->tokens) * 100 / r->rate_per_step);
  263|     59|    if(debt_pct)
  ------------------
  |  Branch (263:8): [True: 57, False: 2]
  ------------------
  264|     57|      wait_us += (r->step_us * debt_pct / 100);
  265|     59|  }
  266|       |
  267|     65|  elapsed_us = curlx_ptimediff_us(pts, &r->ts);
  268|     65|  if(elapsed_us >= wait_us)
  ------------------
  |  Branch (268:6): [True: 0, False: 65]
  ------------------
  269|      0|    return 0;
  270|     65|  wait_us -= elapsed_us;
  271|     65|  return (wait_us + 999) / 1000; /* in milliseconds */
  272|     65|}
Curl_rlimit_next_step_ms:
  276|    720|{
  277|    720|  if(!r->blocked && r->rate_per_step) {
  ------------------
  |  Branch (277:6): [True: 720, False: 0]
  |  Branch (277:21): [True: 379, False: 341]
  ------------------
  278|    379|    timediff_t elapsed_us, next_us;
  279|       |
  280|    379|    elapsed_us = curlx_ptimediff_us(pts, &r->ts) + r->spare_us;
  281|    379|    if(r->step_us > elapsed_us) {
  ------------------
  |  Branch (281:8): [True: 379, False: 0]
  ------------------
  282|    379|      next_us = r->step_us - elapsed_us;
  283|    379|      return (next_us + 999) / 1000; /* in milliseconds */
  284|    379|    }
  285|    379|  }
  286|    341|  return 0;
  287|    720|}
Curl_rlimit_block:
  292|  19.5k|{
  293|  19.5k|  if(!activate == !r->blocked)
  ------------------
  |  Branch (293:6): [True: 19.5k, False: 0]
  ------------------
  294|  19.5k|    return;
  295|       |
  296|      0|  r->ts = *pts;
  297|      0|  r->blocked = activate;
  298|      0|  if(!r->blocked) {
  ------------------
  |  Branch (298:6): [True: 0, False: 0]
  ------------------
  299|       |    /* Start rate limiting fresh. The amount of time this was blocked
  300|       |     * does not generate extra tokens. */
  301|      0|    Curl_rlimit_start(r, pts, -1);
  302|      0|  }
  303|      0|  else {
  304|      0|    r->tokens = 0;
  305|      0|  }
  306|      0|}
ratelimit.c:rlimit_tune_steps:
   79|    316|{
   80|    316|  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|    316|  if(!r->rate_per_step ||
  ------------------
  |  Branch (101:6): [True: 240, False: 76]
  ------------------
  102|     76|     (tokens_total <= 1) ||
  ------------------
  |  Branch (102:6): [True: 76, False: 0]
  ------------------
  103|      0|     (tokens_total > (INT64_MAX / 1000)))
  ------------------
  |  Branch (103:6): [True: 0, False: 0]
  ------------------
  104|    316|    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);
  ------------------
  |  | 1077|      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);
  ------------------
  |  | 1077|      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);
  ------------------
  |  | 1077|      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|        if(r->burst_per_step) {
  ------------------
  |  Branch (144:12): [True: 0, False: 0]
  ------------------
  145|      0|          curl_off_t burst_inc = ((r->burst_per_step * mstep_inc) / 1000);
  146|      0|          if(burst_inc)
  ------------------
  |  Branch (146:14): [True: 0, False: 0]
  ------------------
  147|      0|            r->burst_per_step += burst_inc;
  148|      0|        }
  149|      0|      }
  150|      0|    }
  151|      0|  }
  152|      0|}
ratelimit.c:rlimit_update:
   35|  2.67k|{
   36|  2.67k|  timediff_t elapsed_us, elapsed_steps;
   37|  2.67k|  int64_t token_gain;
   38|       |
   39|  2.67k|  DEBUGASSERT(r->rate_per_step);
  ------------------
  |  | 1077|  2.67k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (39:3): [True: 0, False: 2.67k]
  |  Branch (39:3): [True: 2.67k, False: 0]
  ------------------
   40|  2.67k|  if((r->ts.tv_sec == pts->tv_sec) && (r->ts.tv_usec == pts->tv_usec))
  ------------------
  |  Branch (40:6): [True: 2.67k, False: 0]
  |  Branch (40:39): [True: 32, False: 2.63k]
  ------------------
   41|     32|    return;
   42|       |
   43|  2.63k|  elapsed_us = curlx_ptimediff_us(pts, &r->ts);
   44|  2.63k|  if(elapsed_us < 0) { /* not going back in time */
  ------------------
  |  Branch (44:6): [True: 0, False: 2.63k]
  ------------------
   45|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1077|      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|  2.63k|  elapsed_us += r->spare_us;
   50|  2.63k|  if(elapsed_us < r->step_us)
  ------------------
  |  Branch (50:6): [True: 2.63k, False: 0]
  ------------------
   51|  2.63k|    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|  28.3k|{
   40|  28.3k|  memset(req, 0, sizeof(*req));
   41|  28.3k|}
Curl_req_soft_reset:
   45|  7.93k|{
   46|  7.93k|  CURLcode result;
   47|       |
   48|  7.93k|  req->done = FALSE;
  ------------------
  |  | 1054|  7.93k|#define FALSE false
  ------------------
   49|  7.93k|  req->upload_done = FALSE;
  ------------------
  |  | 1054|  7.93k|#define FALSE false
  ------------------
   50|  7.93k|  req->upload_aborted = FALSE;
  ------------------
  |  | 1054|  7.93k|#define FALSE false
  ------------------
   51|  7.93k|  req->download_done = FALSE;
  ------------------
  |  | 1054|  7.93k|#define FALSE false
  ------------------
   52|  7.93k|  req->eos_written = FALSE;
  ------------------
  |  | 1054|  7.93k|#define FALSE false
  ------------------
   53|  7.93k|  req->eos_read = FALSE;
  ------------------
  |  | 1054|  7.93k|#define FALSE false
  ------------------
   54|  7.93k|  req->eos_sent = FALSE;
  ------------------
  |  | 1054|  7.93k|#define FALSE false
  ------------------
   55|  7.93k|  req->ignorebody = FALSE;
  ------------------
  |  | 1054|  7.93k|#define FALSE false
  ------------------
   56|  7.93k|  req->shutdown = FALSE;
  ------------------
  |  | 1054|  7.93k|#define FALSE false
  ------------------
   57|  7.93k|  req->bytecount = 0;
   58|  7.93k|  req->writebytecount = 0;
   59|  7.93k|  req->header = FALSE;
  ------------------
  |  | 1054|  7.93k|#define FALSE false
  ------------------
   60|  7.93k|  req->headerline = 0;
   61|  7.93k|  req->headerbytecount = 0;
   62|  7.93k|  req->allheadercount = 0;
   63|  7.93k|  req->deductheadercount = 0;
   64|  7.93k|  req->httpversion_sent = 0;
   65|  7.93k|  req->httpversion = 0;
   66|  7.93k|  req->sendbuf_hds_len = 0;
   67|       |
   68|  7.93k|  curlx_safefree(req->hd_auth);
  ------------------
  |  | 1332|  7.93k|  do {                      \
  |  | 1333|  7.93k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  7.93k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.93k|    (ptr) = NULL;           \
  |  | 1335|  7.93k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.93k]
  |  |  ------------------
  ------------------
   69|  7.93k|#ifndef CURL_DISABLE_PROXY
   70|  7.93k|  curlx_safefree(req->hd_proxy_auth);
  ------------------
  |  | 1332|  7.93k|  do {                      \
  |  | 1333|  7.93k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  7.93k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.93k|    (ptr) = NULL;           \
  |  | 1335|  7.93k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.93k]
  |  |  ------------------
  ------------------
   71|  7.93k|#endif
   72|       |
   73|  7.93k|  result = Curl_client_start(data);
   74|  7.93k|  if(result)
  ------------------
  |  Branch (74:6): [True: 0, False: 7.93k]
  ------------------
   75|      0|    return result;
   76|       |
   77|  7.93k|  if(!req->sendbuf_init) {
  ------------------
  |  Branch (77:6): [True: 7.93k, False: 5]
  ------------------
   78|  7.93k|    Curl_bufq_init2(&req->sendbuf, data->set.upload_buffer_size, 1,
   79|  7.93k|                    BUFQ_OPT_SOFT_LIMIT);
  ------------------
  |  |  111|  7.93k|#define BUFQ_OPT_SOFT_LIMIT  (1 << 0)
  ------------------
   80|  7.93k|    req->sendbuf_init = TRUE;
  ------------------
  |  | 1051|  7.93k|#define TRUE true
  ------------------
   81|  7.93k|  }
   82|      5|  else {
   83|      5|    Curl_bufq_reset(&req->sendbuf);
   84|      5|    if(data->set.upload_buffer_size != req->sendbuf.chunk_size) {
  ------------------
  |  Branch (84:8): [True: 0, False: 5]
  ------------------
   85|      0|      Curl_bufq_free(&req->sendbuf);
   86|      0|      Curl_bufq_init2(&req->sendbuf, data->set.upload_buffer_size, 1,
   87|      0|                      BUFQ_OPT_SOFT_LIMIT);
  ------------------
  |  |  111|      0|#define BUFQ_OPT_SOFT_LIMIT  (1 << 0)
  ------------------
   88|      0|    }
   89|      5|  }
   90|       |
   91|  7.93k|  return CURLE_OK;
   92|  7.93k|}
Curl_req_start:
   96|  7.93k|{
   97|  7.93k|  req->start = *Curl_pgrs_now(data);
   98|  7.93k|  return Curl_req_soft_reset(req, data);
   99|  7.93k|}
Curl_req_done:
  105|  3.84k|{
  106|  3.84k|  (void)req;
  107|  3.84k|  if(!aborted)
  ------------------
  |  Branch (107:6): [True: 436, False: 3.41k]
  ------------------
  108|    436|    (void)req_flush(data);
  109|  3.84k|  Curl_client_reset(data);
  110|  3.84k|  return CURLE_OK;
  111|  3.84k|}
Curl_req_hard_reset:
  114|  9.78k|{
  115|  9.78k|  struct curltime t0 = { 0, 0 };
  116|       |
  117|  9.78k|  curlx_safefree(req->newurl);
  ------------------
  |  | 1332|  9.78k|  do {                      \
  |  | 1333|  9.78k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  9.78k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  9.78k|    (ptr) = NULL;           \
  |  | 1335|  9.78k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 9.78k]
  |  |  ------------------
  ------------------
  118|  9.78k|  curlx_safefree(req->hd_auth);
  ------------------
  |  | 1332|  9.78k|  do {                      \
  |  | 1333|  9.78k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  9.78k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  9.78k|    (ptr) = NULL;           \
  |  | 1335|  9.78k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 9.78k]
  |  |  ------------------
  ------------------
  119|  9.78k|#ifndef CURL_DISABLE_PROXY
  120|  9.78k|  curlx_safefree(req->hd_proxy_auth);
  ------------------
  |  | 1332|  9.78k|  do {                      \
  |  | 1333|  9.78k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  9.78k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  9.78k|    (ptr) = NULL;           \
  |  | 1335|  9.78k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 9.78k]
  |  |  ------------------
  ------------------
  121|  9.78k|#endif
  122|  9.78k|#ifndef CURL_DISABLE_COOKIES
  123|  9.78k|  curlx_safefree(req->cookiehost);
  ------------------
  |  | 1332|  9.78k|  do {                      \
  |  | 1333|  9.78k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  9.78k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  9.78k|    (ptr) = NULL;           \
  |  | 1335|  9.78k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 9.78k]
  |  |  ------------------
  ------------------
  124|  9.78k|#endif
  125|  9.78k|  Curl_client_reset(data);
  126|  9.78k|  if(req->sendbuf_init)
  ------------------
  |  Branch (126:6): [True: 0, False: 9.78k]
  ------------------
  127|      0|    Curl_bufq_reset(&req->sendbuf);
  128|       |
  129|       |  /* clear any resolve data */
  130|  9.78k|  Curl_resolv_destroy_all(data);
  131|       |  /* Can no longer memset() this struct as we need to keep some state */
  132|  9.78k|  req->size = -1;
  133|  9.78k|  req->maxdownload = -1;
  134|  9.78k|  req->bytecount = 0;
  135|  9.78k|  req->writebytecount = 0;
  136|  9.78k|  req->start = t0;
  137|  9.78k|  req->headerbytecount = 0;
  138|  9.78k|  req->allheadercount = 0;
  139|  9.78k|  req->deductheadercount = 0;
  140|  9.78k|  req->headerline = 0;
  141|  9.78k|  req->offset = 0;
  142|  9.78k|  req->httpcode = 0;
  143|  9.78k|  req->io_flags = 0;
  144|  9.78k|  req->upgr101 = UPGR101_NONE;
  145|  9.78k|  req->sendbuf_hds_len = 0;
  146|  9.78k|  req->timeofdoc = 0;
  147|  9.78k|  req->location = NULL;
  148|  9.78k|  req->newurl = NULL;
  149|  9.78k|#ifndef CURL_DISABLE_COOKIES
  150|  9.78k|  req->setcookies = 0;
  151|  9.78k|#endif
  152|  9.78k|  req->header = FALSE;
  ------------------
  |  | 1054|  9.78k|#define FALSE false
  ------------------
  153|  9.78k|  req->content_range = FALSE;
  ------------------
  |  | 1054|  9.78k|#define FALSE false
  ------------------
  154|  9.78k|  req->download_done = FALSE;
  ------------------
  |  | 1054|  9.78k|#define FALSE false
  ------------------
  155|  9.78k|  req->eos_written = FALSE;
  ------------------
  |  | 1054|  9.78k|#define FALSE false
  ------------------
  156|  9.78k|  req->eos_read = FALSE;
  ------------------
  |  | 1054|  9.78k|#define FALSE false
  ------------------
  157|  9.78k|  req->eos_sent = FALSE;
  ------------------
  |  | 1054|  9.78k|#define FALSE false
  ------------------
  158|  9.78k|  req->rewind_read = FALSE;
  ------------------
  |  | 1054|  9.78k|#define FALSE false
  ------------------
  159|  9.78k|  req->upload_done = FALSE;
  ------------------
  |  | 1054|  9.78k|#define FALSE false
  ------------------
  160|  9.78k|  req->upload_aborted = FALSE;
  ------------------
  |  | 1054|  9.78k|#define FALSE false
  ------------------
  161|  9.78k|  req->ignorebody = FALSE;
  ------------------
  |  | 1054|  9.78k|#define FALSE false
  ------------------
  162|  9.78k|  req->http_bodyless = FALSE;
  ------------------
  |  | 1054|  9.78k|#define FALSE false
  ------------------
  163|  9.78k|  req->chunk = FALSE;
  ------------------
  |  | 1054|  9.78k|#define FALSE false
  ------------------
  164|  9.78k|  req->resp_trailer = FALSE;
  ------------------
  |  | 1054|  9.78k|#define FALSE false
  ------------------
  165|  9.78k|  req->ignore_cl = FALSE;
  ------------------
  |  | 1054|  9.78k|#define FALSE false
  ------------------
  166|  9.78k|  req->upload_chunky = FALSE;
  ------------------
  |  | 1054|  9.78k|#define FALSE false
  ------------------
  167|  9.78k|  req->no_body = data->set.opt_no_body;
  168|  9.78k|  req->authneg = FALSE;
  ------------------
  |  | 1054|  9.78k|#define FALSE false
  ------------------
  169|  9.78k|  req->shutdown = FALSE;
  ------------------
  |  | 1054|  9.78k|#define FALSE false
  ------------------
  170|       |  /* Unpause all directions */
  171|  9.78k|  Curl_rlimit_block(&data->progress.dl.rlimit, FALSE, &t0);
  ------------------
  |  | 1054|  9.78k|#define FALSE false
  ------------------
  172|       |  Curl_rlimit_block(&data->progress.ul.rlimit, FALSE, &t0);
  ------------------
  |  | 1054|  9.78k|#define FALSE false
  ------------------
  173|  9.78k|}
Curl_req_free:
  176|  28.3k|{
  177|  28.3k|  curlx_safefree(req->newurl);
  ------------------
  |  | 1332|  28.3k|  do {                      \
  |  | 1333|  28.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  28.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  28.3k|    (ptr) = NULL;           \
  |  | 1335|  28.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 28.3k]
  |  |  ------------------
  ------------------
  178|  28.3k|  curlx_safefree(req->hd_auth);
  ------------------
  |  | 1332|  28.3k|  do {                      \
  |  | 1333|  28.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  28.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  28.3k|    (ptr) = NULL;           \
  |  | 1335|  28.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 28.3k]
  |  |  ------------------
  ------------------
  179|  28.3k|#ifndef CURL_DISABLE_PROXY
  180|  28.3k|  curlx_safefree(req->hd_proxy_auth);
  ------------------
  |  | 1332|  28.3k|  do {                      \
  |  | 1333|  28.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  28.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  28.3k|    (ptr) = NULL;           \
  |  | 1335|  28.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 28.3k]
  |  |  ------------------
  ------------------
  181|  28.3k|#endif
  182|  28.3k|  if(req->sendbuf_init)
  ------------------
  |  Branch (182:6): [True: 7.93k, False: 20.4k]
  ------------------
  183|  7.93k|    Curl_bufq_free(&req->sendbuf);
  184|  28.3k|  Curl_client_cleanup(data);
  185|  28.3k|}
Curl_req_sendbuf_empty:
  429|  2.24k|{
  430|  2.24k|  return !data->req.sendbuf_init || Curl_bufq_is_empty(&data->req.sendbuf);
  ------------------
  |  Branch (430:10): [True: 0, False: 2.24k]
  |  Branch (430:37): [True: 2.24k, False: 0]
  ------------------
  431|  2.24k|}
Curl_req_want_send:
  434|  2.24k|{
  435|       |  /* Not done and upload not blocked and either one of
  436|       |   * - REQ_IO_SEND
  437|       |   * - request has buffered data to send
  438|       |   * - connection has pending data to send */
  439|  2.24k|  return !data->req.done &&
  ------------------
  |  Branch (439:10): [True: 2.24k, False: 0]
  ------------------
  440|  2.24k|         !Curl_rlimit_is_blocked(&data->progress.ul.rlimit) &&
  ------------------
  |  Branch (440:10): [True: 2.24k, False: 0]
  ------------------
  441|  2.24k|         (CURL_REQ_WANT_SEND(data) ||
  ------------------
  |  |   39|  4.49k|#define CURL_REQ_WANT_SEND(d)  ((d)->req.io_flags & REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|  2.24k|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  |  |  |  Branch (39:32): [True: 0, False: 2.24k]
  |  |  ------------------
  ------------------
  442|  2.24k|          !Curl_req_sendbuf_empty(data) ||
  ------------------
  |  Branch (442:11): [True: 0, False: 2.24k]
  ------------------
  443|  2.24k|          Curl_xfer_needs_flush(data));
  ------------------
  |  Branch (443:11): [True: 0, False: 2.24k]
  ------------------
  444|  2.24k|}
Curl_req_want_recv:
  447|    624|{
  448|       |  /* Not done and download not blocked and want RECV */
  449|    624|  return !data->req.done &&
  ------------------
  |  Branch (449:10): [True: 624, False: 0]
  ------------------
  450|    624|         !Curl_rlimit_is_blocked(&data->progress.dl.rlimit) &&
  ------------------
  |  Branch (450:10): [True: 624, False: 0]
  ------------------
  451|    624|         CURL_REQ_WANT_RECV(data);
  ------------------
  |  |   40|  1.24k|#define CURL_REQ_WANT_RECV(d)  ((d)->req.io_flags & REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|    624|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  |  |  |  Branch (40:32): [True: 624, False: 0]
  |  |  ------------------
  ------------------
  452|    624|}
Curl_req_stop_send_recv:
  494|     58|{
  495|       |  /* stop receiving and ALL sending as well, including PAUSE and HOLD.
  496|       |   * We might still be paused on receive client writes though, so
  497|       |   * keep those bits around. */
  498|     58|  CURLcode result = CURLE_OK;
  499|     58|  if(CURL_REQ_WANT_SEND(data))
  ------------------
  |  |   39|     58|#define CURL_REQ_WANT_SEND(d)  ((d)->req.io_flags & REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|     58|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  |  |  |  Branch (39:32): [True: 0, False: 58]
  |  |  ------------------
  ------------------
  500|      0|    result = Curl_req_abort_sending(data);
  501|     58|  CURL_REQ_CLEAR_IO(data);
  ------------------
  |  |   51|     58|  ((d)->req.io_flags &= (uint8_t)~(REQ_IO_RECV | REQ_IO_SEND))
  |  |  ------------------
  |  |  |  |   35|     58|#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|     58|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  ------------------
  502|     58|  return result;
  503|     58|}
request.c:req_flush:
  300|    436|{
  301|    436|  CURLcode result;
  302|       |
  303|    436|  if(!data || !data->conn)
  ------------------
  |  Branch (303:6): [True: 0, False: 436]
  |  Branch (303:15): [True: 0, False: 436]
  ------------------
  304|      0|    return CURLE_FAILED_INIT;
  305|       |
  306|    436|  if(!Curl_bufq_is_empty(&data->req.sendbuf)) {
  ------------------
  |  Branch (306:6): [True: 0, False: 436]
  ------------------
  307|      0|    result = req_send_buffer_flush(data);
  308|      0|    if(result)
  ------------------
  |  Branch (308:8): [True: 0, False: 0]
  ------------------
  309|      0|      return result;
  310|      0|    if(!Curl_bufq_is_empty(&data->req.sendbuf)) {
  ------------------
  |  Branch (310:8): [True: 0, False: 0]
  ------------------
  311|      0|      DEBUGF(infof(data, "Curl_req_flush(len=%zu) -> EAGAIN",
  ------------------
  |  | 1063|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  312|      0|                   Curl_bufq_len(&data->req.sendbuf)));
  313|      0|      return CURLE_AGAIN;
  314|      0|    }
  315|      0|  }
  316|    436|  else if(Curl_xfer_needs_flush(data)) {
  ------------------
  |  Branch (316:11): [True: 0, False: 436]
  ------------------
  317|      0|    DEBUGF(infof(data, "Curl_req_flush(), xfer send_pending"));
  ------------------
  |  | 1063|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  318|      0|    return Curl_xfer_flush(data);
  319|      0|  }
  320|       |
  321|    436|  if(data->req.eos_read && !data->req.eos_sent) {
  ------------------
  |  Branch (321:6): [True: 0, False: 436]
  |  Branch (321:28): [True: 0, False: 0]
  ------------------
  322|      0|    char tmp = 0;
  323|      0|    size_t nwritten;
  324|      0|    result = xfer_send(data, &tmp, 0, 0, &nwritten);
  325|      0|    if(result)
  ------------------
  |  Branch (325:8): [True: 0, False: 0]
  ------------------
  326|      0|      return result;
  327|      0|    DEBUGASSERT(data->req.eos_sent);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (327:5): [True: 0, False: 0]
  |  Branch (327:5): [True: 0, False: 0]
  ------------------
  328|      0|  }
  329|       |
  330|    436|  if(!data->req.upload_done && data->req.eos_read && data->req.eos_sent) {
  ------------------
  |  Branch (330:6): [True: 436, False: 0]
  |  Branch (330:32): [True: 0, False: 436]
  |  Branch (330:54): [True: 0, False: 0]
  ------------------
  331|      0|    DEBUGASSERT(Curl_bufq_is_empty(&data->req.sendbuf));
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (331:5): [True: 0, False: 0]
  |  Branch (331:5): [True: 0, False: 0]
  ------------------
  332|      0|    if(data->req.shutdown) {
  ------------------
  |  Branch (332:8): [True: 0, False: 0]
  ------------------
  333|      0|      bool done;
  334|      0|      result = Curl_xfer_send_shutdown(data, &done);
  335|      0|      if(result && data->req.shutdown_err_ignore) {
  ------------------
  |  Branch (335:10): [True: 0, False: 0]
  |  Branch (335:20): [True: 0, False: 0]
  ------------------
  336|      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]
  |  |  ------------------
  ------------------
  337|      0|              "Proceeding as if everything is ok.", (int)result);
  338|      0|        result = CURLE_OK;
  339|      0|        done = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  340|      0|      }
  341|       |
  342|      0|      if(result)
  ------------------
  |  Branch (342:10): [True: 0, False: 0]
  ------------------
  343|      0|        return result;
  344|      0|      if(!done)
  ------------------
  |  Branch (344:10): [True: 0, False: 0]
  ------------------
  345|      0|        return CURLE_AGAIN;
  346|      0|    }
  347|      0|    return req_set_upload_done(data);
  348|      0|  }
  349|    436|  return CURLE_OK;
  350|    436|}

Curl_socket_check:
  124|     35|{
  125|     35|  struct pollfd pfd[3];
  126|     35|  int num;
  127|     35|  int r;
  128|       |
  129|     35|  if((readfd0 == CURL_SOCKET_BAD) && (readfd1 == CURL_SOCKET_BAD) &&
  ------------------
  |  |  145|     35|#define CURL_SOCKET_BAD (-1)
  ------------------
                if((readfd0 == CURL_SOCKET_BAD) && (readfd1 == CURL_SOCKET_BAD) &&
  ------------------
  |  |  145|     35|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (129:6): [True: 35, False: 0]
  |  Branch (129:38): [True: 35, False: 0]
  ------------------
  130|     35|     (writefd == CURL_SOCKET_BAD)) {
  ------------------
  |  |  145|     35|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (130:6): [True: 0, False: 35]
  ------------------
  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|     35|  num = 0;
  141|     35|  if(readfd0 != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|     35|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (141:6): [True: 0, False: 35]
  ------------------
  142|      0|    pfd[num].fd = readfd0;
  143|      0|    pfd[num].events = POLLRDNORM | POLLIN | POLLRDBAND | POLLPRI;
  144|      0|    pfd[num].revents = 0;
  145|      0|    num++;
  146|      0|  }
  147|     35|  if(readfd1 != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|     35|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (147:6): [True: 0, False: 35]
  ------------------
  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|     35|  if(writefd != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|     35|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (153:6): [True: 35, False: 0]
  ------------------
  154|     35|    pfd[num].fd = writefd;
  155|     35|    pfd[num].events = POLLWRNORM | POLLOUT | POLLPRI;
  156|     35|    pfd[num].revents = 0;
  157|     35|    num++;
  158|     35|  }
  159|       |
  160|     35|  r = Curl_poll(pfd, (unsigned int)num, timeout_ms);
  161|     35|  if(r <= 0)
  ------------------
  |  Branch (161:6): [True: 19, False: 16]
  ------------------
  162|     19|    return r;
  163|       |
  164|     16|  r = 0;
  165|     16|  num = 0;
  166|     16|  if(readfd0 != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|     16|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (166:6): [True: 0, False: 16]
  ------------------
  167|      0|    if(pfd[num].revents & (POLLRDNORM | POLLIN | POLLERR | POLLHUP))
  ------------------
  |  Branch (167:8): [True: 0, False: 0]
  ------------------
  168|      0|      r |= CURL_CSELECT_IN;
  ------------------
  |  |  290|      0|#define CURL_CSELECT_IN   0x01
  ------------------
  169|      0|    if(pfd[num].revents & (POLLPRI | POLLNVAL))
  ------------------
  |  Branch (169:8): [True: 0, False: 0]
  ------------------
  170|      0|      r |= CURL_CSELECT_ERR;
  ------------------
  |  |  292|      0|#define CURL_CSELECT_ERR  0x04
  ------------------
  171|      0|    num++;
  172|      0|  }
  173|     16|  if(readfd1 != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|     16|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (173:6): [True: 0, False: 16]
  ------------------
  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|     16|  if(writefd != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|     16|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (180:6): [True: 16, False: 0]
  ------------------
  181|     16|    if(pfd[num].revents & (POLLWRNORM | POLLOUT))
  ------------------
  |  Branch (181:8): [True: 16, False: 0]
  ------------------
  182|     16|      r |= CURL_CSELECT_OUT;
  ------------------
  |  |  291|     16|#define CURL_CSELECT_OUT  0x02
  ------------------
  183|     16|    if(pfd[num].revents & (POLLERR | POLLHUP | POLLPRI | POLLNVAL))
  ------------------
  |  Branch (183:8): [True: 16, False: 0]
  ------------------
  184|     16|      r |= CURL_CSELECT_ERR;
  ------------------
  |  |  292|     16|#define CURL_CSELECT_ERR  0x04
  ------------------
  185|     16|  }
  186|       |
  187|     16|  return r;
  188|     35|}
Curl_poll:
  204|     35|{
  205|     35|#ifdef HAVE_POLL
  206|     35|  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|     35|  bool fds_none = TRUE;
  ------------------
  |  | 1051|     35|#define TRUE true
  ------------------
  214|     35|  unsigned int i;
  215|     35|  int r;
  216|       |
  217|     35|  if(ufds) {
  ------------------
  |  Branch (217:6): [True: 35, False: 0]
  ------------------
  218|     35|    for(i = 0; i < nfds; i++) {
  ------------------
  |  Branch (218:16): [True: 35, False: 0]
  ------------------
  219|     35|      if(ufds[i].fd != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|     35|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (219:10): [True: 35, False: 0]
  ------------------
  220|     35|        fds_none = FALSE;
  ------------------
  |  | 1054|     35|#define FALSE false
  ------------------
  221|     35|        break;
  222|     35|      }
  223|     35|    }
  224|     35|  }
  225|     35|  if(fds_none) {
  ------------------
  |  Branch (225:6): [True: 0, False: 35]
  ------------------
  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|     35|#ifdef HAVE_POLL
  236|       |
  237|       |  /* prevent overflow, timeout_ms is typecast to int. */
  238|     35|#if TIMEDIFF_T_MAX > INT_MAX
  239|     35|  if(timeout_ms > INT_MAX)
  ------------------
  |  Branch (239:6): [True: 0, False: 35]
  ------------------
  240|      0|    timeout_ms = INT_MAX;
  241|     35|#endif
  242|     35|  if(timeout_ms > 0)
  ------------------
  |  Branch (242:6): [True: 0, False: 35]
  ------------------
  243|      0|    pending_ms = (int)timeout_ms;
  244|     35|  else if(timeout_ms < 0)
  ------------------
  |  Branch (244:11): [True: 0, False: 35]
  ------------------
  245|      0|    pending_ms = -1;
  246|     35|  else
  247|     35|    pending_ms = 0;
  248|     35|  r = poll(ufds, nfds, pending_ms);
  249|     35|  if(r <= 0) {
  ------------------
  |  Branch (249:6): [True: 19, False: 16]
  ------------------
  250|     19|    if((r == -1) && (SOCKERRNO == SOCKEINTR))
  ------------------
  |  | 1091|      0|#define SOCKERRNO         errno
  ------------------
                  if((r == -1) && (SOCKERRNO == SOCKEINTR))
  ------------------
  |  | 1125|      0|#define SOCKEINTR         EINTR
  ------------------
  |  Branch (250:8): [True: 0, False: 19]
  |  Branch (250:21): [True: 0, False: 0]
  ------------------
  251|       |      /* make EINTR from select or poll not a "lethal" error */
  252|      0|      r = 0;
  253|     19|    return r;
  254|     19|  }
  255|       |
  256|     32|  for(i = 0; i < nfds; i++) {
  ------------------
  |  Branch (256:14): [True: 16, False: 16]
  ------------------
  257|     16|    if(ufds[i].fd == CURL_SOCKET_BAD)
  ------------------
  |  |  145|     16|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (257:8): [True: 0, False: 16]
  ------------------
  258|      0|      continue;
  259|     16|    if(ufds[i].revents & POLLHUP)
  ------------------
  |  Branch (259:8): [True: 16, False: 0]
  ------------------
  260|     16|      ufds[i].revents |= POLLIN;
  261|     16|    if(ufds[i].revents & POLLERR)
  ------------------
  |  Branch (261:8): [True: 16, False: 0]
  ------------------
  262|     16|      ufds[i].revents |= POLLIN | POLLOUT;
  263|     16|  }
  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|     16|  return r;
  334|     35|}
Curl_pollfds_init:
  339|  8.67k|{
  340|  8.67k|  DEBUGASSERT(cpfds);
  ------------------
  |  | 1077|  8.67k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (340:3): [True: 0, False: 8.67k]
  |  Branch (340:3): [True: 8.67k, False: 0]
  ------------------
  341|  8.67k|  memset(cpfds, 0, sizeof(*cpfds));
  342|  8.67k|  if(static_pfds && static_count) {
  ------------------
  |  Branch (342:6): [True: 8.67k, False: 0]
  |  Branch (342:21): [True: 8.67k, False: 0]
  ------------------
  343|  8.67k|    cpfds->pfds = static_pfds;
  344|  8.67k|    cpfds->count = static_count;
  345|  8.67k|  }
  346|  8.67k|}
Curl_pollfds_cleanup:
  354|  8.67k|{
  355|  8.67k|  DEBUGASSERT(cpfds);
  ------------------
  |  | 1077|  8.67k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (355:3): [True: 0, False: 8.67k]
  |  Branch (355:3): [True: 8.67k, False: 0]
  ------------------
  356|  8.67k|  if(cpfds->allocated_pfds) {
  ------------------
  |  Branch (356:6): [True: 0, False: 8.67k]
  ------------------
  357|      0|    curlx_free(cpfds->pfds);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  358|      0|  }
  359|  8.67k|  memset(cpfds, 0, sizeof(*cpfds));
  360|  8.67k|}
Curl_pollset_reset:
  488|  37.3k|{
  489|  37.3k|  unsigned int i;
  490|  37.3k|  ps->n = 0;
  491|  37.3k|#ifdef DEBUGBUILD
  492|  37.3k|  DEBUGASSERT(ps->init == CURL_EASY_POLLSET_MAGIC);
  ------------------
  |  | 1077|  37.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (492:3): [True: 0, False: 37.3k]
  |  Branch (492:3): [True: 37.3k, False: 0]
  ------------------
  493|  37.3k|#endif
  494|  37.3k|  DEBUGASSERT(ps->count);
  ------------------
  |  | 1077|  37.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (494:3): [True: 0, False: 37.3k]
  |  Branch (494:3): [True: 37.3k, False: 0]
  ------------------
  495|   111k|  for(i = 0; i < ps->count; i++)
  ------------------
  |  Branch (495:14): [True: 74.6k, False: 37.3k]
  ------------------
  496|  74.6k|    ps->sockets[i] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|   111k|#define CURL_SOCKET_BAD (-1)
  ------------------
  497|  37.3k|  memset(ps->actions, 0, ps->count * sizeof(ps->actions[0]));
  498|  37.3k|}
Curl_pollset_init:
  501|  13.5k|{
  502|  13.5k|#ifdef DEBUGBUILD
  503|  13.5k|  ps->init = CURL_EASY_POLLSET_MAGIC;
  ------------------
  |  |  131|  13.5k|#define CURL_EASY_POLLSET_MAGIC  0x7a657370
  ------------------
  504|  13.5k|#endif
  505|  13.5k|  ps->sockets = ps->def_sockets;
  506|  13.5k|  ps->actions = ps->def_actions;
  507|  13.5k|  ps->count = CURL_ARRAYSIZE(ps->def_sockets);
  ------------------
  |  | 1299|  13.5k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  508|  13.5k|  ps->n = 0;
  509|  13.5k|  Curl_pollset_reset(ps);
  510|  13.5k|}
Curl_pollset_cleanup:
  521|  13.5k|{
  522|  13.5k|#ifdef DEBUGBUILD
  523|  13.5k|  DEBUGASSERT(ps->init == CURL_EASY_POLLSET_MAGIC);
  ------------------
  |  | 1077|  13.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (523:3): [True: 0, False: 13.5k]
  |  Branch (523:3): [True: 13.5k, False: 0]
  ------------------
  524|  13.5k|#endif
  525|  13.5k|  if(ps->sockets != ps->def_sockets) {
  ------------------
  |  Branch (525:6): [True: 0, False: 13.5k]
  ------------------
  526|      0|    curlx_free(ps->sockets);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  527|      0|    ps->sockets = ps->def_sockets;
  528|      0|  }
  529|  13.5k|  if(ps->actions != ps->def_actions) {
  ------------------
  |  Branch (529:6): [True: 0, False: 13.5k]
  ------------------
  530|      0|    curlx_free(ps->actions);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  531|      0|    ps->actions = ps->def_actions;
  532|      0|  }
  533|  13.5k|  ps->count = CURL_ARRAYSIZE(ps->def_sockets);
  ------------------
  |  | 1299|  13.5k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  534|  13.5k|  Curl_pollset_reset(ps);
  535|  13.5k|}
Curl_pollset_change:
  564|  9.60k|{
  565|  9.60k|  unsigned int i;
  566|       |
  567|  9.60k|#ifdef DEBUGBUILD
  568|  9.60k|  DEBUGASSERT(ps->init == CURL_EASY_POLLSET_MAGIC);
  ------------------
  |  | 1077|  9.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (568:3): [True: 0, False: 9.60k]
  |  Branch (568:3): [True: 9.60k, False: 0]
  ------------------
  569|  9.60k|#endif
  570|       |
  571|  9.60k|  DEBUGASSERT(VALID_SOCK(sock));
  ------------------
  |  | 1077|  9.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (571:3): [True: 0, False: 9.60k]
  |  Branch (571:3): [True: 9.60k, False: 0]
  ------------------
  572|  9.60k|  if(!VALID_SOCK(sock))
  ------------------
  |  |   98|  9.60k|#define VALID_SOCK(s) ((s) >= 0)
  ------------------
  |  Branch (572:6): [True: 0, False: 9.60k]
  ------------------
  573|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  574|       |
  575|  9.60k|  DEBUGASSERT(add_flags <= (CURL_POLL_IN | CURL_POLL_OUT));
  ------------------
  |  | 1077|  9.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (575:3): [True: 0, False: 9.60k]
  |  Branch (575:3): [True: 9.60k, False: 0]
  ------------------
  576|  9.60k|  DEBUGASSERT(remove_flags <= (CURL_POLL_IN | CURL_POLL_OUT));
  ------------------
  |  | 1077|  9.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (576:3): [True: 0, False: 9.60k]
  |  Branch (576:3): [True: 9.60k, False: 0]
  ------------------
  577|  9.60k|  DEBUGASSERT((add_flags & remove_flags) == 0); /* no overlap */
  ------------------
  |  | 1077|  9.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (577:3): [True: 0, False: 9.60k]
  |  Branch (577:3): [True: 9.60k, False: 0]
  ------------------
  578|  9.60k|  for(i = 0; i < ps->n; ++i) {
  ------------------
  |  Branch (578:14): [True: 402, False: 9.20k]
  ------------------
  579|    402|    if(ps->sockets[i] == sock) {
  ------------------
  |  Branch (579:8): [True: 402, False: 0]
  ------------------
  580|    402|      ps->actions[i] &= (unsigned char)(~remove_flags);
  581|    402|      ps->actions[i] |= (unsigned char)add_flags;
  582|       |      /* all gone? remove socket */
  583|    402|      if(!ps->actions[i]) {
  ------------------
  |  Branch (583:10): [True: 0, False: 402]
  ------------------
  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|    402|      return CURLE_OK;
  593|    402|    }
  594|    402|  }
  595|       |  /* not present */
  596|  9.20k|  if(add_flags) {
  ------------------
  |  Branch (596:6): [True: 9.20k, False: 0]
  ------------------
  597|  9.20k|    if(i >= ps->count) { /* need to grow */
  ------------------
  |  Branch (597:8): [True: 0, False: 9.20k]
  ------------------
  598|      0|      unsigned int new_count = CURLMAX(ps->count * 2, 8);
  ------------------
  |  | 1291|      0|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1291:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  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]));
  ------------------
  |  | 1485|      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]));
  ------------------
  |  | 1485|      0|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  610|      0|      if(!nactions) {
  ------------------
  |  Branch (610:10): [True: 0, False: 0]
  ------------------
  611|      0|        curlx_free(nsockets);
  ------------------
  |  | 1488|      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);
  ------------------
  |  | 1488|      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);
  ------------------
  |  | 1488|      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|  9.20k|    DEBUGASSERT(i < ps->count);
  ------------------
  |  | 1077|  9.20k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (624:5): [True: 0, False: 9.20k]
  |  Branch (624:5): [True: 9.20k, False: 0]
  ------------------
  625|  9.20k|    if(i < ps->count) {
  ------------------
  |  Branch (625:8): [True: 9.20k, False: 0]
  ------------------
  626|  9.20k|      ps->sockets[i] = sock;
  627|  9.20k|      ps->actions[i] = (unsigned char)add_flags;
  628|  9.20k|      ps->n = i + 1;
  629|  9.20k|    }
  630|  9.20k|  }
  631|  9.20k|  return CURLE_OK;
  632|  9.20k|}
Curl_pollset_want_recv:
  712|  8.47k|{
  713|  8.47k|  unsigned int i;
  714|  8.47k|  (void)data;
  715|  12.9k|  for(i = 0; i < ps->n; ++i) {
  ------------------
  |  Branch (715:14): [True: 8.47k, False: 4.45k]
  ------------------
  716|  8.47k|    if((ps->sockets[i] == sock) && (ps->actions[i] & CURL_POLL_IN))
  ------------------
  |  |  283|  4.02k|#define CURL_POLL_IN     1
  ------------------
  |  Branch (716:8): [True: 4.02k, False: 4.45k]
  |  Branch (716:36): [True: 4.02k, False: 0]
  ------------------
  717|  4.02k|      return TRUE;
  ------------------
  |  | 1051|  4.02k|#define TRUE true
  ------------------
  718|  8.47k|  }
  719|  4.45k|  return FALSE;
  ------------------
  |  | 1054|  4.45k|#define FALSE false
  ------------------
  720|  8.47k|}

Curl_client_cleanup:
   71|  28.3k|{
   72|  28.3k|  cl_reset_reader(data);
   73|  28.3k|  cl_reset_writer(data);
   74|       |
   75|  28.3k|  data->req.bytecount = 0;
   76|  28.3k|  data->req.headerline = 0;
   77|  28.3k|}
Curl_client_reset:
   80|  13.6k|{
   81|  13.6k|  if(data->req.rewind_read) {
  ------------------
  |  Branch (81:6): [True: 0, False: 13.6k]
  ------------------
   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|  13.6k|  else {
   86|  13.6k|    CURL_TRC_READ(data, "client_reset, clear readers");
  ------------------
  |  |  163|  13.6k|  do {                                                    \
  |  |  164|  13.6k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  326|  13.6k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  27.2k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 13.6k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 13.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  27.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|  13.6k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|  13.6k|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|  13.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 13.6k]
  |  |  ------------------
  ------------------
   87|  13.6k|    cl_reset_reader(data);
   88|  13.6k|  }
   89|  13.6k|  cl_reset_writer(data);
   90|       |
   91|  13.6k|  data->req.bytecount = 0;
   92|  13.6k|  data->req.headerline = 0;
   93|  13.6k|}
Curl_client_start:
   96|  7.93k|{
   97|  7.93k|  if(data->req.rewind_read) {
  ------------------
  |  Branch (97:6): [True: 0, False: 7.93k]
  ------------------
   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, (int)result);
  107|      0|        return result;
  108|      0|      }
  109|      0|      r = r->next;
  110|      0|    }
  111|      0|    data->req.rewind_read = FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  112|      0|    cl_reset_reader(data);
  113|      0|  }
  114|  7.93k|  return CURLE_OK;
  115|  7.93k|}
Curl_cwriter_write:
  131|  32.5k|{
  132|  32.5k|  if(!writer)
  ------------------
  |  Branch (132:6): [True: 0, False: 32.5k]
  ------------------
  133|      0|    return CURLE_WRITE_ERROR;
  134|  32.5k|  return writer->cwt->do_write(data, writer, type, buf, nbytes);
  135|  32.5k|}
Curl_cwriter_flush:
  139|  3.02k|{
  140|  3.02k|  if(!writer) {
  ------------------
  |  Branch (140:6): [True: 0, False: 3.02k]
  ------------------
  141|      0|    return CURLE_WRITE_ERROR;
  142|      0|  }
  143|  3.02k|  return writer->cwt->do_flush(data, writer);
  144|  3.02k|}
Curl_cwriter_def_init:
  148|  1.64k|{
  149|  1.64k|  (void)data;
  150|  1.64k|  (void)writer;
  151|  1.64k|  return CURLE_OK;
  152|  1.64k|}
Curl_cwriter_def_flush:
  163|  1.63k|{
  164|  1.63k|  return Curl_cwriter_flush(data, writer->next);
  165|  1.63k|}
Curl_cwriter_def_close:
  169|  1.64k|{
  170|  1.64k|  (void)data;
  171|  1.64k|  (void)writer;
  172|  1.64k|}
Curl_client_write:
  395|  9.36k|{
  396|  9.36k|  CURLcode result;
  397|       |
  398|       |  /* it is one of those, at least */
  399|  9.36k|  DEBUGASSERT(type &
  ------------------
  |  | 1077|  9.36k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (399:3): [True: 0, False: 9.36k]
  |  Branch (399:3): [True: 9.36k, False: 0]
  ------------------
  400|  9.36k|              (CLIENTWRITE_BODY | CLIENTWRITE_HEADER | CLIENTWRITE_INFO));
  401|       |  /* BODY is only BODY (with optional EOS) */
  402|  9.36k|  DEBUGASSERT(!(type & CLIENTWRITE_BODY) ||
  ------------------
  |  | 1077|  9.36k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (402:3): [True: 9.36k, False: 0]
  |  Branch (402:3): [True: 0, False: 0]
  |  Branch (402:3): [True: 608, False: 8.75k]
  |  Branch (402:3): [True: 8.75k, False: 0]
  ------------------
  403|  9.36k|              ((type & ~(CLIENTWRITE_BODY | CLIENTWRITE_EOS)) == 0));
  404|       |  /* INFO is only INFO (with optional EOS) */
  405|  9.36k|  DEBUGASSERT(!(type & CLIENTWRITE_INFO) ||
  ------------------
  |  | 1077|  9.36k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (405:3): [True: 9.36k, False: 0]
  |  Branch (405:3): [True: 0, False: 0]
  |  Branch (405:3): [True: 9.36k, False: 0]
  |  Branch (405:3): [True: 0, False: 0]
  ------------------
  406|  9.36k|              ((type & ~(CLIENTWRITE_INFO | CLIENTWRITE_EOS)) == 0));
  407|       |
  408|  9.36k|  if(!data->req.writer_stack) {
  ------------------
  |  Branch (408:6): [True: 452, False: 8.91k]
  ------------------
  409|    452|    result = do_init_writer_stack(data);
  410|    452|    if(result)
  ------------------
  |  Branch (410:8): [True: 0, False: 452]
  ------------------
  411|      0|      return result;
  412|    452|    DEBUGASSERT(data->req.writer_stack);
  ------------------
  |  | 1077|    452|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (412:5): [True: 0, False: 452]
  |  Branch (412:5): [True: 452, False: 0]
  ------------------
  413|    452|  }
  414|       |
  415|  9.36k|  result = Curl_cwriter_write(data, data->req.writer_stack, type, buf, len);
  416|  9.36k|  CURL_TRC_WRITE(data, "client_write(type=%x, len=%zu) -> %d",
  ------------------
  |  |  158|  9.36k|  do {                                                     \
  |  |  159|  9.36k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|  9.36k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  18.7k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 9.36k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 9.36k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  18.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|  9.36k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  9.36k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  9.36k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 9.36k]
  |  |  ------------------
  ------------------
  417|  9.36k|                 (unsigned int)type, len, (int)result);
  418|  9.36k|  return result;
  419|  9.36k|}
Curl_client_flush:
  422|    694|{
  423|    694|  CURLcode result;
  424|       |
  425|    694|  if(!data->req.writer_stack) {
  ------------------
  |  Branch (425:6): [True: 0, False: 694]
  ------------------
  426|      0|    result = do_init_writer_stack(data);
  427|      0|    if(result)
  ------------------
  |  Branch (427:8): [True: 0, False: 0]
  ------------------
  428|      0|      return result;
  429|      0|    DEBUGASSERT(data->req.writer_stack);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (429:5): [True: 0, False: 0]
  |  Branch (429:5): [True: 0, False: 0]
  ------------------
  430|      0|  }
  431|       |
  432|    694|  result = Curl_cwriter_flush(data, data->req.writer_stack);
  433|    694|  CURL_TRC_WRITE(data, "client_flush() -> %d", (int)result);
  ------------------
  |  |  158|    694|  do {                                                     \
  |  |  159|    694|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|    694|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.38k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 694, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 694]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.38k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((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|    694|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|    694|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|    694|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 694]
  |  |  ------------------
  ------------------
  434|    694|  return result;
  435|    694|}
Curl_cwriter_create:
  442|  3.04k|{
  443|  3.04k|  struct Curl_cwriter *writer = NULL;
  444|  3.04k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  445|  3.04k|  void *p;
  446|       |
  447|  3.04k|  DEBUGASSERT(cwt->cwriter_size >= sizeof(struct Curl_cwriter));
  ------------------
  |  | 1077|  3.04k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (447:3): [True: 0, False: 3.04k]
  |  Branch (447:3): [True: 3.04k, False: 0]
  ------------------
  448|  3.04k|  p = curlx_calloc(1, cwt->cwriter_size);
  ------------------
  |  | 1485|  3.04k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  449|  3.04k|  if(!p)
  ------------------
  |  Branch (449:6): [True: 0, False: 3.04k]
  ------------------
  450|      0|    goto out;
  451|       |
  452|  3.04k|  writer = (struct Curl_cwriter *)p;
  453|  3.04k|  writer->cwt = cwt;
  454|  3.04k|  writer->ctx = p;
  455|  3.04k|  writer->phase = phase;
  456|  3.04k|  result = cwt->do_init(data, writer);
  457|       |
  458|  3.04k|out:
  459|  3.04k|  *pwriter = result ? NULL : writer;
  ------------------
  |  Branch (459:14): [True: 0, False: 3.04k]
  ------------------
  460|  3.04k|  if(result)
  ------------------
  |  Branch (460:6): [True: 0, False: 3.04k]
  ------------------
  461|      0|    curlx_free(writer);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  462|  3.04k|  return result;
  463|  3.04k|}
Curl_cwriter_add:
  488|  2.34k|{
  489|  2.34k|  CURLcode result;
  490|  2.34k|  struct Curl_cwriter **anchor = &data->req.writer_stack;
  491|       |
  492|  2.34k|  if(!*anchor) {
  ------------------
  |  Branch (492:6): [True: 247, False: 2.09k]
  ------------------
  493|    247|    result = do_init_writer_stack(data);
  494|    247|    if(result)
  ------------------
  |  Branch (494:8): [True: 0, False: 247]
  ------------------
  495|      0|      return result;
  496|    247|  }
  497|       |
  498|       |  /* Insert the writer as first in its phase.
  499|       |   * Skip existing writers of lower phases. */
  500|  2.59k|  while(*anchor && (*anchor)->phase < writer->phase)
  ------------------
  |  Branch (500:9): [True: 2.59k, False: 0]
  |  Branch (500:20): [True: 247, False: 2.34k]
  ------------------
  501|    247|    anchor = &((*anchor)->next);
  502|  2.34k|  writer->next = *anchor;
  503|  2.34k|  *anchor = writer;
  504|  2.34k|  return CURLE_OK;
  505|  2.34k|}
Curl_cwriter_get_by_name:
  509|    247|{
  510|    247|  struct Curl_cwriter *writer;
  511|    247|  for(writer = data->req.writer_stack; writer; writer = writer->next) {
  ------------------
  |  Branch (511:40): [True: 0, False: 247]
  ------------------
  512|      0|    if(!strcmp(name, writer->cwt->name))
  ------------------
  |  Branch (512:8): [True: 0, False: 0]
  ------------------
  513|      0|      return writer;
  514|      0|  }
  515|    247|  return NULL;
  516|    247|}
Curl_cwriter_get_by_type:
  520|  14.9k|{
  521|  14.9k|  struct Curl_cwriter *writer;
  522|  38.2k|  for(writer = data->req.writer_stack; writer; writer = writer->next) {
  ------------------
  |  Branch (522:40): [True: 30.9k, False: 7.24k]
  ------------------
  523|  30.9k|    if(writer->cwt == cwt)
  ------------------
  |  Branch (523:8): [True: 7.68k, False: 23.2k]
  ------------------
  524|  7.68k|      return writer;
  525|  30.9k|  }
  526|  7.24k|  return NULL;
  527|  14.9k|}
Curl_cwriter_is_content_decoding:
  530|  7.62k|{
  531|  7.62k|  struct Curl_cwriter *writer;
  532|  38.3k|  for(writer = data->req.writer_stack; writer; writer = writer->next) {
  ------------------
  |  Branch (532:40): [True: 30.7k, False: 7.62k]
  ------------------
  533|  30.7k|    if(writer->phase == CURL_CW_CONTENT_DECODE)
  ------------------
  |  Branch (533:8): [True: 0, False: 30.7k]
  ------------------
  534|      0|      return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  535|  30.7k|  }
  536|  7.62k|  return FALSE;
  ------------------
  |  | 1054|  7.62k|#define FALSE false
  ------------------
  537|  7.62k|}
Curl_cwriter_is_paused:
  540|  6.98k|{
  541|  6.98k|  return Curl_cw_out_is_paused(data);
  542|  6.98k|}
Curl_creader_def_init:
  574|  1.21k|{
  575|  1.21k|  (void)data;
  576|  1.21k|  (void)reader;
  577|  1.21k|  return CURLE_OK;
  578|  1.21k|}
Curl_creader_def_close:
  582|  1.21k|{
  583|  1.21k|  (void)data;
  584|  1.21k|  (void)reader;
  585|  1.21k|}
Curl_creader_create:
  963|  1.21k|{
  964|  1.21k|  struct Curl_creader *reader = NULL;
  965|  1.21k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  966|  1.21k|  void *p;
  967|       |
  968|  1.21k|  DEBUGASSERT(crt->creader_size >= sizeof(struct Curl_creader));
  ------------------
  |  | 1077|  1.21k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (968:3): [True: 0, False: 1.21k]
  |  Branch (968:3): [True: 1.21k, False: 0]
  ------------------
  969|  1.21k|  p = curlx_calloc(1, crt->creader_size);
  ------------------
  |  | 1485|  1.21k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  970|  1.21k|  if(!p)
  ------------------
  |  Branch (970:6): [True: 0, False: 1.21k]
  ------------------
  971|      0|    goto out;
  972|       |
  973|  1.21k|  reader = (struct Curl_creader *)p;
  974|  1.21k|  reader->crt = crt;
  975|  1.21k|  reader->ctx = p;
  976|  1.21k|  reader->phase = phase;
  977|  1.21k|  result = crt->do_init(data, reader);
  978|       |
  979|  1.21k|out:
  980|  1.21k|  *preader = result ? NULL : reader;
  ------------------
  |  Branch (980:14): [True: 0, False: 1.21k]
  ------------------
  981|  1.21k|  if(result)
  ------------------
  |  Branch (981:6): [True: 0, False: 1.21k]
  ------------------
  982|      0|    curlx_free(reader);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  983|  1.21k|  return result;
  984|  1.21k|}
Curl_creader_set_null:
 1311|  1.21k|{
 1312|  1.21k|  struct Curl_creader *r;
 1313|  1.21k|  CURLcode result;
 1314|       |
 1315|  1.21k|  result = Curl_creader_create(&r, data, &cr_null, CURL_CR_CLIENT);
 1316|  1.21k|  if(result)
  ------------------
  |  Branch (1316:6): [True: 0, False: 1.21k]
  ------------------
 1317|      0|    return result;
 1318|       |
 1319|  1.21k|  cl_reset_reader(data);
 1320|  1.21k|  return do_init_reader_stack(data, r);
 1321|  1.21k|}
sendf.c:cl_reset_reader:
   59|  43.1k|{
   60|  43.1k|  struct Curl_creader *reader = data->req.reader_stack;
   61|  43.1k|  data->req.reader_started = FALSE;
  ------------------
  |  | 1054|  43.1k|#define FALSE false
  ------------------
   62|  44.4k|  while(reader) {
  ------------------
  |  Branch (62:9): [True: 1.21k, False: 43.1k]
  ------------------
   63|  1.21k|    data->req.reader_stack = reader->next;
   64|  1.21k|    reader->crt->do_close(data, reader);
   65|  1.21k|    curlx_free(reader);
  ------------------
  |  | 1488|  1.21k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   66|  1.21k|    reader = data->req.reader_stack;
   67|  1.21k|  }
   68|  43.1k|}
sendf.c:cl_reset_writer:
   48|  41.9k|{
   49|  41.9k|  struct Curl_cwriter *writer = data->req.writer_stack;
   50|  45.0k|  while(writer) {
  ------------------
  |  Branch (50:9): [True: 3.04k, False: 41.9k]
  ------------------
   51|  3.04k|    data->req.writer_stack = writer->next;
   52|  3.04k|    writer->cwt->do_close(data, writer);
   53|  3.04k|    curlx_free(writer);
  ------------------
  |  | 1488|  3.04k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   54|  3.04k|    writer = data->req.writer_stack;
   55|  3.04k|  }
   56|  41.9k|}
sendf.c:do_init_writer_stack:
  344|    699|{
  345|    699|  struct Curl_cwriter *writer;
  346|    699|  CURLcode result;
  347|       |
  348|    699|  DEBUGASSERT(!data->req.writer_stack);
  ------------------
  |  | 1077|    699|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (348:3): [True: 0, False: 699]
  |  Branch (348:3): [True: 699, False: 0]
  ------------------
  349|    699|  result = Curl_cwriter_create(&data->req.writer_stack,
  350|    699|                               data, &Curl_cwt_out, CURL_CW_CLIENT);
  351|    699|  if(result)
  ------------------
  |  Branch (351:6): [True: 0, False: 699]
  ------------------
  352|      0|    return result;
  353|       |
  354|       |  /* This places the "pause" writer behind the "download" writer that
  355|       |   * is added below. Meaning the "download" can do checks on content length
  356|       |   * and other things *before* write outs are buffered for paused transfers. */
  357|    699|  result = Curl_cwriter_create(&writer, data, &Curl_cwt_pause,
  358|    699|                               CURL_CW_PROTOCOL);
  359|    699|  if(!result) {
  ------------------
  |  Branch (359:6): [True: 699, False: 0]
  ------------------
  360|    699|    result = Curl_cwriter_add(data, writer);
  361|    699|    if(result)
  ------------------
  |  Branch (361:8): [True: 0, False: 699]
  ------------------
  362|      0|      Curl_cwriter_free(data, writer);
  363|    699|  }
  364|    699|  if(result)
  ------------------
  |  Branch (364:6): [True: 0, False: 699]
  ------------------
  365|      0|    return result;
  366|       |
  367|    699|  result = Curl_cwriter_create(&writer, data, &cw_download, CURL_CW_PROTOCOL);
  368|    699|  if(!result) {
  ------------------
  |  Branch (368:6): [True: 699, False: 0]
  ------------------
  369|    699|    result = Curl_cwriter_add(data, writer);
  370|    699|    if(result)
  ------------------
  |  Branch (370:8): [True: 0, False: 699]
  ------------------
  371|      0|      Curl_cwriter_free(data, writer);
  372|    699|  }
  373|    699|  if(result)
  ------------------
  |  Branch (373:6): [True: 0, False: 699]
  ------------------
  374|      0|    return result;
  375|       |
  376|    699|  result = Curl_cwriter_create(&writer, data, &cw_raw, CURL_CW_RAW);
  377|    699|  if(!result) {
  ------------------
  |  Branch (377:6): [True: 699, False: 0]
  ------------------
  378|    699|    result = Curl_cwriter_add(data, writer);
  379|    699|    if(result)
  ------------------
  |  Branch (379:8): [True: 0, False: 699]
  ------------------
  380|      0|      Curl_cwriter_free(data, writer);
  381|    699|  }
  382|    699|  if(result)
  ------------------
  |  Branch (382:6): [True: 0, False: 699]
  ------------------
  383|      0|    return result;
  384|       |
  385|    699|  return result;
  386|    699|}
sendf.c:cw_download_write:
  194|  9.36k|{
  195|  9.36k|  struct cw_download_ctx *ctx = writer->ctx;
  196|  9.36k|  CURLcode result;
  197|  9.36k|  size_t nwrite, excess_len = 0;
  198|  9.36k|  bool is_connect = !!(type & CLIENTWRITE_CONNECT);
  ------------------
  |  |   46|  9.36k|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  199|       |
  200|  9.36k|  if(!ctx->started_response &&
  ------------------
  |  Branch (200:6): [True: 924, False: 8.44k]
  ------------------
  201|    924|     !(type & CLIENTWRITE_CONNECT) &&
  ------------------
  |  |   46|    924|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  |  Branch (201:6): [True: 316, False: 608]
  ------------------
  202|    316|     (!(type & CLIENTWRITE_INFO) || data->req.upload_done)) {
  ------------------
  |  |   43|    316|#define CLIENTWRITE_INFO    (1 << 1) /* meta information, not a HEADER */
  ------------------
  |  Branch (202:7): [True: 316, False: 0]
  |  Branch (202:37): [True: 0, False: 0]
  ------------------
  203|    316|    Curl_pgrsTime(data, TIMER_STARTTRANSFER);
  204|    316|    ctx->started_response = TRUE;
  ------------------
  |  | 1051|    316|#define TRUE true
  ------------------
  205|    316|  }
  206|       |
  207|  9.36k|  if(!(type & CLIENTWRITE_BODY)) {
  ------------------
  |  |   42|  9.36k|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (207:6): [True: 608, False: 8.75k]
  ------------------
  208|    608|    if(is_connect && data->set.suppress_connect_headers)
  ------------------
  |  Branch (208:8): [True: 608, False: 0]
  |  Branch (208:22): [True: 10, False: 598]
  ------------------
  209|     10|      return CURLE_OK;
  210|    598|    result = Curl_cwriter_write(data, writer->next, type, buf, nbytes);
  211|    598|    CURL_TRC_WRITE(data, "download_write header(type=%x, blen=%zu) -> %d",
  ------------------
  |  |  158|    598|  do {                                                     \
  |  |  159|    598|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|    598|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.19k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 598, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 598]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.19k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((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|    598|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|    598|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|    598|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 598]
  |  |  ------------------
  ------------------
  212|    598|                   (unsigned int)type, nbytes, (int)result);
  213|    598|    return result;
  214|    608|  }
  215|       |
  216|  8.75k|  if(!ctx->started_body &&
  ------------------
  |  Branch (216:6): [True: 316, False: 8.44k]
  ------------------
  217|    316|     !(type & (CLIENTWRITE_INFO | CLIENTWRITE_CONNECT))) {
  ------------------
  |  |   43|    316|#define CLIENTWRITE_INFO    (1 << 1) /* meta information, not a HEADER */
  ------------------
                   !(type & (CLIENTWRITE_INFO | CLIENTWRITE_CONNECT))) {
  ------------------
  |  |   46|    316|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  |  Branch (217:6): [True: 316, False: 0]
  ------------------
  218|    316|    Curl_rlimit_start(&data->progress.dl.rlimit, Curl_pgrs_now(data),
  219|    316|                      data->req.size);
  220|    316|    ctx->started_body = TRUE;
  ------------------
  |  | 1051|    316|#define TRUE true
  ------------------
  221|    316|  }
  222|       |
  223|       |  /* Here, we deal with REAL BODY bytes. All filtering and transfer
  224|       |   * encodings have been applied and only the true content, e.g. BODY,
  225|       |   * bytes are passed here.
  226|       |   * This allows us to check sizes, update stats, etc. independent
  227|       |   * from the protocol in play. */
  228|       |
  229|  8.75k|  if(data->req.no_body && nbytes > 0) {
  ------------------
  |  Branch (229:6): [True: 0, False: 8.75k]
  |  Branch (229:27): [True: 0, False: 0]
  ------------------
  230|       |    /* BODY arrives although we want none, bail out */
  231|      0|    streamclose(data->conn, "ignoring body");
  ------------------
  |  |   96|      0|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   86|      0|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
  232|      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]
  |  |  ------------------
  ------------------
  233|      0|                   "did not want a BODY", (unsigned int)type, nbytes);
  234|      0|    data->req.download_done = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  235|      0|    if(data->info.header_size)
  ------------------
  |  Branch (235:8): [True: 0, False: 0]
  ------------------
  236|       |      /* if headers have been received, this is fine */
  237|      0|      return CURLE_OK;
  238|      0|    return CURLE_WEIRD_SERVER_REPLY;
  239|      0|  }
  240|       |
  241|       |  /* Determine if we see any bytes in excess to what is allowed.
  242|       |   * We write the allowed bytes and handle excess further below.
  243|       |   * This gives deterministic BODY writes on varying buffer receive
  244|       |   * lengths. */
  245|  8.75k|  nwrite = nbytes;
  246|  8.75k|  if(data->req.maxdownload != -1) {
  ------------------
  |  Branch (246:6): [True: 0, False: 8.75k]
  ------------------
  247|      0|    size_t wmax = get_max_body_write_len(data, data->req.maxdownload);
  248|      0|    if(nwrite > wmax) {
  ------------------
  |  Branch (248:8): [True: 0, False: 0]
  ------------------
  249|      0|      excess_len = nbytes - wmax;
  250|      0|      nwrite = wmax;
  251|      0|    }
  252|       |
  253|      0|    if(nwrite == wmax) {
  ------------------
  |  Branch (253:8): [True: 0, False: 0]
  ------------------
  254|      0|      data->req.download_done = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  255|      0|    }
  256|       |
  257|      0|    if((type & CLIENTWRITE_EOS) && !data->req.no_body &&
  ------------------
  |  |   49|      0|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  |  Branch (257:8): [True: 0, False: 0]
  |  Branch (257:36): [True: 0, False: 0]
  ------------------
  258|      0|       (data->req.size > data->req.bytecount)) {
  ------------------
  |  Branch (258:8): [True: 0, False: 0]
  ------------------
  259|      0|      failf(data, "end of response with %" FMT_OFF_T " bytes missing",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  260|      0|            data->req.size - data->req.bytecount);
  261|      0|      return CURLE_PARTIAL_FILE;
  262|      0|    }
  263|      0|  }
  264|       |
  265|       |  /* Error on too large filesize is handled below, after writing
  266|       |   * the permitted bytes */
  267|  8.75k|  if(data->set.max_filesize && !data->req.ignorebody) {
  ------------------
  |  Branch (267:6): [True: 1.23k, False: 7.52k]
  |  Branch (267:32): [True: 1.23k, False: 0]
  ------------------
  268|  1.23k|    size_t wmax = get_max_body_write_len(data, data->set.max_filesize);
  269|  1.23k|    if(nwrite > wmax) {
  ------------------
  |  Branch (269:8): [True: 13, False: 1.22k]
  ------------------
  270|     13|      nwrite = wmax;
  271|     13|    }
  272|  1.23k|  }
  273|       |
  274|  8.75k|  if(!data->req.ignorebody && (nwrite || (type & CLIENTWRITE_EOS))) {
  ------------------
  |  |   49|  2.48k|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  |  Branch (274:6): [True: 8.75k, False: 0]
  |  Branch (274:32): [True: 6.27k, False: 2.48k]
  |  Branch (274:42): [True: 58, False: 2.42k]
  ------------------
  275|  6.33k|    result = Curl_cwriter_write(data, writer->next, type, buf, nwrite);
  276|  6.33k|    CURL_TRC_WRITE(data, "download_write body(type=%x, blen=%zu) -> %d",
  ------------------
  |  |  158|  6.33k|  do {                                                     \
  |  |  159|  6.33k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|  6.33k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  12.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 6.33k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 6.33k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  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.33k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  6.33k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  6.33k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 6.33k]
  |  |  ------------------
  ------------------
  277|  6.33k|                   (unsigned int)type, nbytes, (int)result);
  278|  6.33k|    if(result)
  ------------------
  |  Branch (278:8): [True: 0, False: 6.33k]
  ------------------
  279|      0|      return result;
  280|  6.33k|  }
  281|       |
  282|       |  /* Update stats, write and report progress */
  283|  8.75k|  if(nwrite) {
  ------------------
  |  Branch (283:6): [True: 6.27k, False: 2.48k]
  ------------------
  284|  6.27k|    data->req.bytecount += nwrite;
  285|  6.27k|    Curl_pgrs_download_inc(data, nwrite);
  286|  6.27k|  }
  287|       |
  288|  8.75k|  if(excess_len) {
  ------------------
  |  Branch (288:6): [True: 0, False: 8.75k]
  ------------------
  289|      0|    if(!data->req.ignorebody) {
  ------------------
  |  Branch (289:8): [True: 0, False: 0]
  ------------------
  290|      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]
  |  |  ------------------
  ------------------
  291|      0|            "Excess found writing body:"
  292|      0|            " excess = %zu"
  293|      0|            ", size = %" FMT_OFF_T
  294|      0|            ", maxdownload = %" FMT_OFF_T
  295|      0|            ", bytecount = %" FMT_OFF_T,
  296|      0|            excess_len, data->req.size, data->req.maxdownload,
  297|      0|            data->req.bytecount);
  298|      0|      connclose(data->conn, "excess found in a read");
  ------------------
  |  |   97|      0|#define connclose(x, y)   Curl_conncontrol(x, CONNCTRL_CONNECTION, y)
  |  |  ------------------
  |  |  |  |   85|      0|#define CONNCTRL_CONNECTION 1
  |  |  ------------------
  ------------------
  299|      0|    }
  300|      0|  }
  301|  8.75k|  else if((nwrite < nbytes) && !data->req.ignorebody) {
  ------------------
  |  Branch (301:11): [True: 13, False: 8.74k]
  |  Branch (301:32): [True: 13, False: 0]
  ------------------
  302|     13|    failf(data, "Exceeded the maximum allowed file size "
  ------------------
  |  |   62|     13|#define failf Curl_failf
  ------------------
  303|     13|          "(%" FMT_OFF_T ") with %" FMT_OFF_T " bytes",
  304|     13|          data->set.max_filesize, data->req.bytecount);
  305|     13|    return CURLE_FILESIZE_EXCEEDED;
  306|     13|  }
  307|       |
  308|  8.74k|  return CURLE_OK;
  309|  8.75k|}
sendf.c:get_max_body_write_len:
  175|  1.23k|{
  176|  1.23k|  if(limit != -1) {
  ------------------
  |  Branch (176:6): [True: 1.23k, False: 0]
  ------------------
  177|       |    /* How much more are we allowed to write? */
  178|  1.23k|    return curlx_sotouz_range(limit - data->req.bytecount, 0, SIZE_MAX);
  179|  1.23k|  }
  180|      0|  return SIZE_MAX;
  181|  1.23k|}
sendf.c:cw_raw_write:
  326|  9.36k|{
  327|  9.36k|  if(type & CLIENTWRITE_BODY && data->set.verbose && !data->req.ignorebody) {
  ------------------
  |  |   42|  18.7k|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (327:6): [True: 8.75k, False: 608]
  |  Branch (327:33): [True: 0, False: 8.75k]
  |  Branch (327:54): [True: 0, False: 0]
  ------------------
  328|      0|    Curl_debug(data, CURLINFO_DATA_IN, buf, nbytes);
  329|      0|  }
  330|  9.36k|  return Curl_cwriter_write(data, writer->next, type, buf, nbytes);
  331|  9.36k|}
sendf.c:do_init_reader_stack:
 1137|  1.21k|{
 1138|  1.21k|  CURLcode result = CURLE_OK;
 1139|  1.21k|  curl_off_t clen;
 1140|       |
 1141|  1.21k|  DEBUGASSERT(r);
  ------------------
  |  | 1077|  1.21k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1141:3): [True: 0, False: 1.21k]
  |  Branch (1141:3): [True: 1.21k, False: 0]
  ------------------
 1142|  1.21k|  DEBUGASSERT(r->crt);
  ------------------
  |  | 1077|  1.21k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1142:3): [True: 0, False: 1.21k]
  |  Branch (1142:3): [True: 1.21k, False: 0]
  ------------------
 1143|  1.21k|  DEBUGASSERT(r->phase == CURL_CR_CLIENT);
  ------------------
  |  | 1077|  1.21k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1143:3): [True: 0, False: 1.21k]
  |  Branch (1143:3): [True: 1.21k, False: 0]
  ------------------
 1144|  1.21k|  DEBUGASSERT(!data->req.reader_stack);
  ------------------
  |  | 1077|  1.21k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1144:3): [True: 0, False: 1.21k]
  |  Branch (1144:3): [True: 1.21k, False: 0]
  ------------------
 1145|       |
 1146|  1.21k|  data->req.reader_stack = r;
 1147|  1.21k|  clen = r->crt->total_length(data, r);
 1148|       |  /* if we do not have 0 length init, and crlf conversion is wanted,
 1149|       |   * add the reader for it */
 1150|  1.21k|  if(clen && (data->set.crlf
  ------------------
  |  Branch (1150:6): [True: 0, False: 1.21k]
  |  Branch (1150:15): [True: 0, False: 0]
  ------------------
 1151|      0|#ifdef CURL_PREFER_LF_LINEENDS
 1152|      0|     || data->state.prefer_ascii
  ------------------
  |  Branch (1152:9): [True: 0, False: 0]
  ------------------
 1153|      0|#endif
 1154|      0|    )) {
 1155|      0|    result = cr_lc_add(data);
 1156|      0|    if(result)
  ------------------
  |  Branch (1156:8): [True: 0, False: 0]
  ------------------
 1157|      0|      return result;
 1158|      0|  }
 1159|       |
 1160|  1.21k|  return result;
 1161|  1.21k|}
sendf.c:cr_null_total_length:
 1289|  1.21k|{
 1290|       |  /* this reader changes length depending on input */
 1291|  1.21k|  (void)data;
 1292|  1.21k|  (void)reader;
 1293|  1.21k|  return 0;
 1294|  1.21k|}

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

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

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

Curl_slist_append_nodup:
   56|  82.6k|{
   57|  82.6k|  struct curl_slist *last;
   58|  82.6k|  struct curl_slist *new_item;
   59|       |
   60|  82.6k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  82.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (60:3): [True: 0, False: 82.6k]
  |  Branch (60:3): [True: 82.6k, False: 0]
  ------------------
   61|       |
   62|  82.6k|  new_item = curlx_malloc(sizeof(struct curl_slist));
  ------------------
  |  | 1483|  82.6k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
   63|  82.6k|  if(!new_item)
  ------------------
  |  Branch (63:6): [True: 0, False: 82.6k]
  ------------------
   64|      0|    return NULL;
   65|       |
   66|  82.6k|  new_item->next = NULL;
   67|  82.6k|  new_item->data = CURL_UNCONST(data);
  ------------------
  |  |  862|  82.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|  82.6k|  if(!list)
  ------------------
  |  Branch (70:6): [True: 41.0k, False: 41.5k]
  ------------------
   71|  41.0k|    return new_item;
   72|       |
   73|  41.5k|  last = slist_get_last(list);
   74|  41.5k|  last->next = new_item;
   75|  41.5k|  return list;
   76|  82.6k|}
curl_slist_append:
   86|  69.0k|{
   87|  69.0k|  char *dupdata = curlx_strdup(data);
  ------------------
  |  | 1482|  69.0k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
   88|       |
   89|  69.0k|  if(!dupdata)
  ------------------
  |  Branch (89:6): [True: 0, False: 69.0k]
  ------------------
   90|      0|    return NULL;
   91|       |
   92|  69.0k|  list = Curl_slist_append_nodup(list, dupdata);
   93|  69.0k|  if(!list)
  ------------------
  |  Branch (93:6): [True: 0, False: 69.0k]
  ------------------
   94|      0|    curlx_free(dupdata);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   95|       |
   96|  69.0k|  return list;
   97|  69.0k|}
curl_slist_free_all:
  125|  74.3k|{
  126|  74.3k|  struct curl_slist *next;
  127|  74.3k|  struct curl_slist *item;
  128|       |
  129|  74.3k|  if(!list)
  ------------------
  |  Branch (129:6): [True: 33.2k, False: 41.0k]
  ------------------
  130|  33.2k|    return;
  131|       |
  132|  41.0k|  item = list;
  133|  72.0k|  do {
  134|  72.0k|    next = item->next;
  135|  72.0k|    curlx_safefree(item->data);
  ------------------
  |  | 1332|  72.0k|  do {                      \
  |  | 1333|  72.0k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  72.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  72.0k|    (ptr) = NULL;           \
  |  | 1335|  72.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 72.0k]
  |  |  ------------------
  ------------------
  136|  72.0k|    curlx_free(item);
  ------------------
  |  | 1488|  72.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  137|  72.0k|    item = next;
  138|  72.0k|  } while(next);
  ------------------
  |  Branch (138:11): [True: 31.0k, False: 41.0k]
  ------------------
  139|  41.0k|}
slist.c:slist_get_last:
   30|  41.5k|{
   31|  41.5k|  struct curl_slist *item;
   32|       |
   33|       |  /* if caller passed us a NULL, return now */
   34|  41.5k|  if(!list)
  ------------------
  |  Branch (34:6): [True: 0, False: 41.5k]
  ------------------
   35|      0|    return NULL;
   36|       |
   37|       |  /* loop through to find the last item */
   38|  41.5k|  item = list;
   39|  15.9M|  while(item->next) {
  ------------------
  |  Branch (39:9): [True: 15.8M, False: 41.5k]
  ------------------
   40|  15.8M|    item = item->next;
   41|  15.8M|  }
   42|  41.5k|  return item;
   43|  41.5k|}

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

Curl_cf_socks_proxy_insert_after:
 1351|    110|{
 1352|    110|  struct Curl_cfilter *cf;
 1353|    110|  struct socks_ctx *ctx;
 1354|    110|  CURLcode result;
 1355|       |
 1356|    110|  if(!dest)
  ------------------
  |  Branch (1356:6): [True: 0, False: 110]
  ------------------
 1357|      0|    return CURLE_FAILED_INIT;
 1358|       |
 1359|    110|  switch(proxy_type) {
 1360|     24|  case CURLPROXY_SOCKS5:
  ------------------
  |  |  800|     24|#define CURLPROXY_SOCKS5          5L /* added in 7.10 */
  ------------------
  |  Branch (1360:3): [True: 24, False: 86]
  ------------------
 1361|     36|  case CURLPROXY_SOCKS5_HOSTNAME:
  ------------------
  |  |  802|     36|#define CURLPROXY_SOCKS5_HOSTNAME 7L /* Use the SOCKS5 protocol but pass along
  ------------------
  |  Branch (1361:3): [True: 12, False: 98]
  ------------------
 1362|    106|  case CURLPROXY_SOCKS4:
  ------------------
  |  |  798|    106|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  |  Branch (1362:3): [True: 70, False: 40]
  ------------------
 1363|    110|  case CURLPROXY_SOCKS4A:
  ------------------
  |  |  801|    110|#define CURLPROXY_SOCKS4A         6L /* added in 7.18.0 */
  ------------------
  |  Branch (1363:3): [True: 4, False: 106]
  ------------------
 1364|    110|    break; /* all supported */
 1365|      0|  default:
  ------------------
  |  Branch (1365:3): [True: 0, False: 110]
  ------------------
 1366|      0|    failf(data, "unknown proxytype %d option given", proxy_type);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1367|      0|    return CURLE_COULDNT_CONNECT;
 1368|    110|  }
 1369|       |
 1370|       |  /* NUL byte already part of struct size */
 1371|    110|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1485|    110|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1372|    110|  if(!ctx) {
  ------------------
  |  Branch (1372:6): [True: 0, False: 110]
  ------------------
 1373|      0|    return CURLE_OUT_OF_MEMORY;
 1374|      0|  }
 1375|       |
 1376|    110|  Curl_peer_link(&ctx->dest, dest);
 1377|    110|  ctx->ip_version = ip_version;
 1378|    110|  ctx->proxy_type = proxy_type;
 1379|    110|  Curl_creds_link(&ctx->creds, creds);
 1380|    110|  Curl_bufq_init2(&ctx->iobuf, SOCKS_CHUNK_SIZE, SOCKS_CHUNKS,
  ------------------
  |  |   94|    110|#define SOCKS_CHUNK_SIZE    1024
  ------------------
                Curl_bufq_init2(&ctx->iobuf, SOCKS_CHUNK_SIZE, SOCKS_CHUNKS,
  ------------------
  |  |   95|    110|#define SOCKS_CHUNKS        1
  ------------------
 1381|    110|                  BUFQ_OPT_SOFT_LIMIT);
  ------------------
  |  |  111|    110|#define BUFQ_OPT_SOFT_LIMIT  (1 << 0)
  ------------------
 1382|       |
 1383|    110|  result = Curl_cf_create(&cf, &Curl_cft_socks_proxy, ctx);
 1384|    110|  if(!result)
  ------------------
  |  Branch (1384:6): [True: 110, False: 0]
  ------------------
 1385|    110|    Curl_conn_cf_insert_after(cf_at, cf);
 1386|      0|  else
 1387|      0|    socks_proxy_ctx_free(ctx);
 1388|    110|  return result;
 1389|    110|}
socks.c:socks_proxy_cf_destroy:
 1294|    110|{
 1295|    110|  (void)data;
 1296|    110|  socks_proxy_ctx_free(cf->ctx);
 1297|       |  cf->ctx = NULL;
 1298|    110|}
socks.c:socks_proxy_cf_connect:
 1200|    188|{
 1201|    188|  struct socks_ctx *ctx = cf->ctx;
 1202|    188|  CURLproxycode pxresult = CURLPX_OK;
 1203|    188|  CURLcode result;
 1204|       |
 1205|    188|  if(cf->connected) {
  ------------------
  |  Branch (1205:6): [True: 1, False: 187]
  ------------------
 1206|      1|    *done = TRUE;
  ------------------
  |  | 1051|      1|#define TRUE true
  ------------------
 1207|      1|    return CURLE_OK;
 1208|      1|  }
 1209|       |
 1210|    187|  result = cf->next->cft->do_connect(cf->next, data, done);
 1211|    187|  if(result || !*done)
  ------------------
  |  Branch (1211:6): [True: 2, False: 185]
  |  Branch (1211:16): [True: 16, False: 169]
  ------------------
 1212|     18|    return result;
 1213|       |
 1214|    169|  switch(ctx->proxy_type) {
 1215|     52|  case CURLPROXY_SOCKS5:
  ------------------
  |  |  800|     52|#define CURLPROXY_SOCKS5          5L /* added in 7.10 */
  ------------------
  |  Branch (1215:3): [True: 52, False: 117]
  ------------------
 1216|     79|  case CURLPROXY_SOCKS5_HOSTNAME:
  ------------------
  |  |  802|     79|#define CURLPROXY_SOCKS5_HOSTNAME 7L /* Use the SOCKS5 protocol but pass along
  ------------------
  |  Branch (1216:3): [True: 27, False: 142]
  ------------------
 1217|     79|    pxresult = socks5_connect(cf, ctx, data);
 1218|     79|    break;
 1219|       |
 1220|     82|  case CURLPROXY_SOCKS4:
  ------------------
  |  |  798|     82|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  |  Branch (1220:3): [True: 82, False: 87]
  ------------------
 1221|     90|  case CURLPROXY_SOCKS4A:
  ------------------
  |  |  801|     90|#define CURLPROXY_SOCKS4A         6L /* added in 7.18.0 */
  ------------------
  |  Branch (1221:3): [True: 8, False: 161]
  ------------------
 1222|     90|    pxresult = socks4_connect(cf, ctx, data);
 1223|     90|    break;
 1224|       |
 1225|      0|  default:
  ------------------
  |  Branch (1225:3): [True: 0, False: 169]
  ------------------
 1226|      0|    DEBUGASSERT(0); /* should not come here, checked it at creation time */
  ------------------
  |  | 1077|      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|    169|  }
 1230|       |
 1231|    169|  if(pxresult) {
  ------------------
  |  Branch (1231:6): [True: 73, False: 96]
  ------------------
 1232|     73|    result = CURLE_PROXY;
 1233|     73|    data->info.pxcode = pxresult;
 1234|     73|    goto out;
 1235|     73|  }
 1236|     96|  else if(ctx->state != SOCKS_ST_SUCCESS)
  ------------------
  |  Branch (1236:11): [True: 86, False: 10]
  ------------------
 1237|     86|    goto out;
 1238|       |
 1239|     10|#ifdef CURLVERBOSE
 1240|     10|  if(Curl_trc_is_verbose(data)) {
  ------------------
  |  |  319|     10|  ((data) && (data)->set.verbose &&                        \
  |  |  ------------------
  |  |  |  Branch (319:4): [True: 10, False: 0]
  |  |  |  Branch (319:14): [True: 0, False: 10]
  |  |  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
 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|     10|#endif
 1255|     10|  cf->connected = TRUE;
  ------------------
  |  | 1051|     10|#define TRUE true
  ------------------
 1256|       |
 1257|    169|out:
 1258|    169|  *done = (bool)cf->connected;
 1259|    169|  if(*done || result)
  ------------------
  |  Branch (1259:6): [True: 10, False: 159]
  |  Branch (1259:15): [True: 73, False: 86]
  ------------------
 1260|     83|    Curl_creds_unlink(&ctx->creds);
 1261|    169|  return result;
 1262|     10|}
socks.c:socks5_connect:
 1032|     79|{
 1033|     79|  CURLproxycode presult;
 1034|     79|  bool done;
 1035|       |
 1036|    108|process_state:
 1037|    108|  switch(sx->state) {
 1038|     36|  case SOCKS_ST_INIT:
  ------------------
  |  Branch (1038:3): [True: 36, False: 72]
  ------------------
 1039|     36|    sx->version = 5;
 1040|     36|    sx->resolve_local = (sx->proxy_type == CURLPROXY_SOCKS5);
  ------------------
  |  |  800|     36|#define CURLPROXY_SOCKS5          5L /* added in 7.10 */
  ------------------
 1041|     36|    sxstate(sx, cf, data, SOCKS5_ST_START);
  ------------------
  |  |  162|     36|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1042|     36|    FALLTHROUGH();
  ------------------
  |  |  817|     36|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1043|       |
 1044|     36|  case SOCKS5_ST_START:
  ------------------
  |  Branch (1044:3): [True: 0, False: 108]
  ------------------
 1045|     36|    CURL_TRC_CF(data, cf, "SOCKS5: connecting to %s:%u",
  ------------------
  |  |  153|     36|  do {                                          \
  |  |  154|     36|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     36|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     72|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 36, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 36]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     72|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((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|     36|   (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|     36|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     36|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 36]
  |  |  ------------------
  ------------------
 1046|     36|                sx->dest->hostname, sx->dest->port);
 1047|     36|    presult = socks5_req0_init(cf, sx, data);
 1048|     36|    if(presult)
  ------------------
  |  Branch (1048:8): [True: 0, False: 36]
  ------------------
 1049|      0|      return socks_failed(sx, cf, data, presult);
 1050|     36|    sxstate(sx, cf, data, SOCKS5_ST_REQ0_SEND);
  ------------------
  |  |  162|     36|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1051|     36|    FALLTHROUGH();
  ------------------
  |  |  817|     36|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1052|       |
 1053|     36|  case SOCKS5_ST_REQ0_SEND:
  ------------------
  |  Branch (1053:3): [True: 0, False: 108]
  ------------------
 1054|     36|    presult = socks_flush(sx, cf, data, &done);
 1055|     36|    if(presult)
  ------------------
  |  Branch (1055:8): [True: 0, False: 36]
  ------------------
 1056|      0|      return socks_failed(sx, cf, data, presult);
 1057|     36|    else if(!done)
  ------------------
  |  Branch (1057:13): [True: 0, False: 36]
  ------------------
 1058|      0|      return CURLPX_OK;
 1059|       |    /* done sending! */
 1060|     36|    sxstate(sx, cf, data, SOCKS5_ST_RESP0_RECV);
  ------------------
  |  |  162|     36|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1061|     36|    FALLTHROUGH();
  ------------------
  |  |  817|     36|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1062|       |
 1063|     62|  case SOCKS5_ST_RESP0_RECV:
  ------------------
  |  Branch (1063:3): [True: 26, False: 82]
  ------------------
 1064|     62|    presult = socks_recv(sx, cf, data, 2, &done);
 1065|     62|    if(presult)
  ------------------
  |  Branch (1065:8): [True: 4, False: 58]
  ------------------
 1066|      4|      return socks_failed(sx, cf, data, presult);
 1067|     58|    else if(!done)
  ------------------
  |  Branch (1067:13): [True: 28, False: 30]
  ------------------
 1068|     28|      return CURLPX_OK;
 1069|     30|    presult = socks5_check_resp0(sx, cf, data);
 1070|     30|    if(presult)
  ------------------
  |  Branch (1070:8): [True: 6, False: 24]
  ------------------
 1071|      6|      return socks_failed(sx, cf, data, presult);
 1072|       |    /* socks5_check_resp0() sets next socks state */
 1073|     24|    goto process_state;
 1074|       |
 1075|     24|  case SOCKS5_ST_GSSAPI_INIT: {
  ------------------
  |  Branch (1075:3): [True: 1, False: 107]
  ------------------
 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|     30|#endif
 1089|     30|  }
 1090|       |
 1091|      8|  case SOCKS5_ST_AUTH_INIT:
  ------------------
  |  Branch (1091:3): [True: 8, False: 100]
  ------------------
 1092|      8|    presult = socks5_auth_init(cf, sx, data);
 1093|      8|    if(presult)
  ------------------
  |  Branch (1093:8): [True: 0, False: 8]
  ------------------
 1094|      0|      return socks_failed(sx, cf, data, presult);
 1095|      8|    sxstate(sx, cf, data, SOCKS5_ST_AUTH_SEND);
  ------------------
  |  |  162|      8|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1096|      8|    FALLTHROUGH();
  ------------------
  |  |  817|      8|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1097|       |
 1098|      8|  case SOCKS5_ST_AUTH_SEND:
  ------------------
  |  Branch (1098:3): [True: 0, False: 108]
  ------------------
 1099|      8|    presult = socks_flush(sx, cf, data, &done);
 1100|      8|    if(presult)
  ------------------
  |  Branch (1100:8): [True: 0, False: 8]
  ------------------
 1101|      0|      return socks_failed(sx, cf, data, presult);
 1102|      8|    else if(!done)
  ------------------
  |  Branch (1102:13): [True: 0, False: 8]
  ------------------
 1103|      0|      return CURLPX_OK;
 1104|      8|    sxstate(sx, cf, data, SOCKS5_ST_AUTH_RECV);
  ------------------
  |  |  162|      8|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1105|      8|    FALLTHROUGH();
  ------------------
  |  |  817|      8|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1106|       |
 1107|      8|  case SOCKS5_ST_AUTH_RECV:
  ------------------
  |  Branch (1107:3): [True: 0, False: 108]
  ------------------
 1108|      8|    presult = socks_recv(sx, cf, data, 2, &done);
 1109|      8|    if(presult)
  ------------------
  |  Branch (1109:8): [True: 0, False: 8]
  ------------------
 1110|      0|      return socks_failed(sx, cf, data, presult);
 1111|      8|    else if(!done)
  ------------------
  |  Branch (1111:13): [True: 0, False: 8]
  ------------------
 1112|      0|      return CURLPX_OK;
 1113|      8|    presult = socks5_check_auth_resp(sx, cf, data);
 1114|      8|    if(presult)
  ------------------
  |  Branch (1114:8): [True: 3, False: 5]
  ------------------
 1115|      3|      return socks_failed(sx, cf, data, presult);
 1116|       |    /* Everything is good so far, user was authenticated! */
 1117|      5|    sxstate(sx, cf, data, SOCKS5_ST_REQ1_INIT);
  ------------------
  |  |  162|      5|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1118|      5|    FALLTHROUGH();
  ------------------
  |  |  817|      5|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1119|       |
 1120|     20|  case SOCKS5_ST_REQ1_INIT:
  ------------------
  |  Branch (1120:3): [True: 15, False: 93]
  ------------------
 1121|     20|    presult = socks5_req1_init(sx, cf, data);
 1122|     20|    if(presult)
  ------------------
  |  Branch (1122:8): [True: 0, False: 20]
  ------------------
 1123|      0|      return socks_failed(sx, cf, data, presult);
 1124|     20|    if(!sx->resolve_local) {
  ------------------
  |  Branch (1124:8): [True: 5, False: 15]
  ------------------
 1125|       |      /* we do not resolve, request is complete */
 1126|      5|      sxstate(sx, cf, data, SOCKS5_ST_REQ1_SEND);
  ------------------
  |  |  162|      5|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1127|      5|      goto process_state;
 1128|      5|    }
 1129|     15|    sx->start_resolving = TRUE;
  ------------------
  |  | 1051|     15|#define TRUE true
  ------------------
 1130|     15|    sxstate(sx, cf, data, SOCKS5_ST_RESOLVING);
  ------------------
  |  |  162|     15|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1131|     15|    FALLTHROUGH();
  ------------------
  |  |  817|     15|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1132|       |
 1133|     15|  case SOCKS5_ST_RESOLVING:
  ------------------
  |  Branch (1133:3): [True: 0, False: 108]
  ------------------
 1134|     15|    presult = socks5_resolving(sx, cf, data, &done);
 1135|     15|    if(presult)
  ------------------
  |  Branch (1135:8): [True: 0, False: 15]
  ------------------
 1136|      0|      return socks_failed(sx, cf, data, presult);
 1137|     15|    if(!done)
  ------------------
  |  Branch (1137:8): [True: 0, False: 15]
  ------------------
 1138|      0|      return CURLPX_OK;
 1139|     15|    sxstate(sx, cf, data, SOCKS5_ST_REQ1_SEND);
  ------------------
  |  |  162|     15|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1140|     15|    FALLTHROUGH();
  ------------------
  |  |  817|     15|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1141|       |
 1142|     20|  case SOCKS5_ST_REQ1_SEND:
  ------------------
  |  Branch (1142:3): [True: 5, False: 103]
  ------------------
 1143|     20|    presult = socks_flush(sx, cf, data, &done);
 1144|     20|    if(presult)
  ------------------
  |  Branch (1144:8): [True: 0, False: 20]
  ------------------
 1145|      0|      return socks_failed(sx, cf, data, presult);
 1146|     20|    else if(!done)
  ------------------
  |  Branch (1146:13): [True: 0, False: 20]
  ------------------
 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|     20|    sxstate(sx, cf, data, SOCKS5_ST_RESP1_RECV);
  ------------------
  |  |  162|     20|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1155|     20|    FALLTHROUGH();
  ------------------
  |  |  817|     20|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1156|       |
 1157|     37|  case SOCKS5_ST_RESP1_RECV:
  ------------------
  |  Branch (1157:3): [True: 17, False: 91]
  ------------------
 1158|     37|    presult = socks5_recv_resp1(sx, cf, data, &done);
 1159|     37|    if(presult)
  ------------------
  |  Branch (1159:8): [True: 11, False: 26]
  ------------------
 1160|     11|      return socks_failed(sx, cf, data, presult);
 1161|     26|    if(!done)
  ------------------
  |  Branch (1161:8): [True: 21, False: 5]
  ------------------
 1162|     21|      return CURLPX_OK;
 1163|      5|    CURL_TRC_CF(data, cf, "SOCKS5 request granted.");
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
 1164|      5|    sxstate(sx, cf, data, SOCKS_ST_SUCCESS);
  ------------------
  |  |  162|      5|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1165|      5|    FALLTHROUGH();
  ------------------
  |  |  817|      5|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1166|       |
 1167|      5|  case SOCKS_ST_SUCCESS:
  ------------------
  |  Branch (1167:3): [True: 0, False: 108]
  ------------------
 1168|      5|    return CURLPX_OK;
 1169|       |
 1170|      0|  case SOCKS_ST_FAILED:
  ------------------
  |  Branch (1170:3): [True: 0, False: 108]
  ------------------
 1171|      0|    DEBUGASSERT(sx->presult);
  ------------------
  |  | 1077|      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: 108]
  ------------------
 1175|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1077|      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|    108|  }
 1178|    108|}
socks.c:socksstate:
  176|    551|{
  177|    551|  enum socks_state_t oldstate = sx->state;
  178|       |
  179|    551|  if(oldstate == state)
  ------------------
  |  Branch (179:6): [True: 8, False: 543]
  ------------------
  180|       |    /* do not bother when the new state is the same as the old state */
  181|      8|    return;
  182|       |
  183|    543|  sx->state = state;
  184|       |
  185|    543|#if defined(DEBUGBUILD) && defined(CURLVERBOSE)
  186|    543|  CURL_TRC_CF(data, cf, "[%s] -> [%s] (line %d)",
  ------------------
  |  |  153|    543|  do {                                          \
  |  |  154|    543|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    543|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.08k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 543, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 543]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.08k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((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|    543|   (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|    543|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    543|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 543]
  |  |  ------------------
  ------------------
  187|    543|              cf_socks_statename[oldstate],
  188|    543|              cf_socks_statename[sx->state], lineno);
  189|       |#else
  190|       |  (void)cf;
  191|       |  (void)data;
  192|       |#endif
  193|    543|}
socks.c:socks5_req0_init:
  584|     36|{
  585|     36|  const unsigned char auth = data->set.socks5auth;
  586|     36|  unsigned char req[5]; /* version + len + 3 possible auth methods */
  587|     36|  unsigned char nauths;
  588|     36|  size_t req_len, nwritten;
  589|     36|  CURLcode result;
  590|       |
  591|     36|  (void)cf;
  592|       |  /* RFC1928 chapter 5 specifies max 255 chars for domain name in packet */
  593|     36|  if(!sx->resolve_local && strlen(sx->dest->hostname) > 255) {
  ------------------
  |  Branch (593:6): [True: 12, False: 24]
  |  Branch (593:28): [True: 0, False: 12]
  ------------------
  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|     36|  if(auth & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI))
  ------------------
  |  |  831|     36|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
                if(auth & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI))
  ------------------
  |  |  837|     36|#define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
  |  |  ------------------
  |  |  |  |  833|     36|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  |  |  ------------------
  ------------------
  |  Branch (599:6): [True: 0, False: 36]
  ------------------
  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|     36|          "CURLOPT_SOCKS5_AUTH: %u", auth);
  602|     36|  if(!(auth & CURLAUTH_BASIC))
  ------------------
  |  |  831|     36|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  |  Branch (602:6): [True: 3, False: 33]
  ------------------
  603|       |    /* disable username/password auth */
  604|      3|    Curl_creds_unlink(&sx->creds);
  605|       |
  606|     36|  req[0] = 5;   /* version */
  607|     36|  nauths = 1;
  608|     36|  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|     36|  if(sx->creds) {
  ------------------
  |  Branch (615:6): [True: 20, False: 16]
  ------------------
  616|     20|    ++nauths;
  617|     20|    req[1 + nauths] = 2; /* username/password */
  618|     20|  }
  619|     36|  req[1] = nauths;
  620|     36|  req_len = 2 + nauths;
  621|       |
  622|     36|  result = Curl_bufq_write(&sx->iobuf, req, req_len, &nwritten);
  623|     36|  if(result || (nwritten != req_len))
  ------------------
  |  Branch (623:6): [True: 0, False: 36]
  |  Branch (623:16): [True: 0, False: 36]
  ------------------
  624|      0|    return CURLPX_SEND_REQUEST;
  625|     36|  return CURLPX_OK;
  626|     36|}
socks.c:socks_failed:
  199|     73|{
  200|     73|  sxstate(sx, cf, data, SOCKS_ST_FAILED);
  ------------------
  |  |  162|     73|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  201|     73|  sx->presult = presult;
  202|     73|  return presult;
  203|     73|}
socks.c:socks_flush:
  209|    118|{
  210|    118|  CURLcode result;
  211|    118|  size_t nwritten;
  212|       |
  213|    118|  *done = FALSE;
  ------------------
  |  | 1054|    118|#define FALSE false
  ------------------
  214|    236|  while(!Curl_bufq_is_empty(&sx->iobuf)) {
  ------------------
  |  Branch (214:9): [True: 118, False: 118]
  ------------------
  215|    118|    result = Curl_cf_send_bufq(cf->next, data, &sx->iobuf, NULL, 0,
  216|    118|                               &nwritten);
  217|    118|    if(result == CURLE_AGAIN)
  ------------------
  |  Branch (217:8): [True: 0, False: 118]
  ------------------
  218|      0|      return CURLPX_OK;
  219|    118|    else if(result) {
  ------------------
  |  Branch (219:13): [True: 0, False: 118]
  ------------------
  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|    118|  }
  225|    118|  *done = TRUE;
  ------------------
  |  | 1051|    118|#define TRUE true
  ------------------
  226|    118|  return CURLPX_OK;
  227|    118|}
socks.c:socks_recv:
  234|    196|{
  235|    196|  CURLcode result;
  236|    196|  size_t nread;
  237|       |
  238|    196|  *done = FALSE;
  ------------------
  |  | 1054|    196|#define FALSE false
  ------------------
  239|    296|  while(Curl_bufq_len(&sx->iobuf) < min_bytes) {
  ------------------
  |  Branch (239:9): [True: 218, False: 78]
  ------------------
  240|    218|    result = Curl_cf_recv_bufq(cf->next, data, &sx->iobuf,
  241|    218|                               min_bytes - Curl_bufq_len(&sx->iobuf),
  242|    218|                               &nread);
  243|    218|    if(result == CURLE_AGAIN)
  ------------------
  |  Branch (243:8): [True: 68, False: 150]
  ------------------
  244|     68|      return CURLPX_OK;
  245|    150|    else if(result) {
  ------------------
  |  Branch (245:13): [True: 0, False: 150]
  ------------------
  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|    150|    else if(!nread) { /* EOF */
  ------------------
  |  Branch (250:13): [True: 50, False: 100]
  ------------------
  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|    218|  }
  259|     78|  *done = TRUE;
  ------------------
  |  | 1051|     78|#define TRUE true
  ------------------
  260|     78|  return CURLPX_OK;
  261|    196|}
socks.c:socks5_check_resp0:
  631|     30|{
  632|     30|  const unsigned char *resp;
  633|     30|  unsigned char auth_mode;
  634|     30|  size_t rlen;
  635|       |
  636|     30|  if(!Curl_bufq_peek(&sx->iobuf, &resp, &rlen) || rlen < 2) {
  ------------------
  |  Branch (636:6): [True: 0, False: 30]
  |  Branch (636:51): [True: 0, False: 30]
  ------------------
  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|     30|  if(resp[0] != 5) {
  ------------------
  |  Branch (641:6): [True: 2, False: 28]
  ------------------
  642|      2|    failf(data, "Received invalid version in initial SOCKS5 response.");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  643|      2|    return CURLPX_BAD_VERSION;
  644|      2|  }
  645|       |
  646|     28|  auth_mode = resp[1];
  647|     28|  Curl_bufq_skip(&sx->iobuf, 2);
  648|       |
  649|     28|  switch(auth_mode) {
  650|     15|  case 0:
  ------------------
  |  Branch (650:3): [True: 15, False: 13]
  ------------------
  651|       |    /* DONE! No authentication needed. Send request. */
  652|     15|    sxstate(sx, cf, data, SOCKS5_ST_REQ1_INIT);
  ------------------
  |  |  162|     15|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  653|     15|    return CURLPX_OK;
  654|      2|  case 1:
  ------------------
  |  Branch (654:3): [True: 2, False: 26]
  ------------------
  655|      2|    if(data->set.socks5auth & CURLAUTH_GSSAPI) {
  ------------------
  |  |  837|      2|#define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
  |  |  ------------------
  |  |  |  |  833|      2|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  |  |  ------------------
  ------------------
  |  Branch (655:8): [True: 1, False: 1]
  ------------------
  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|      1|    failf(data, "SOCKS5 GSSAPI per-message authentication is not enabled.");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  660|      1|    return CURLPX_GSSAPI_PERMSG;
  661|      9|  case 2:
  ------------------
  |  Branch (661:3): [True: 9, False: 19]
  ------------------
  662|       |    /* regular name + password authentication */
  663|      9|    if(data->set.socks5auth & CURLAUTH_BASIC) {
  ------------------
  |  |  831|      9|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  |  Branch (663:8): [True: 8, False: 1]
  ------------------
  664|      8|      sxstate(sx, cf, data, SOCKS5_ST_AUTH_INIT);
  ------------------
  |  |  162|      8|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  665|      8|      return CURLPX_OK;
  666|      8|    }
  667|      1|    failf(data, "BASIC authentication proposed but not enabled.");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  668|      1|    return CURLPX_NO_AUTH;
  669|      1|  case 255:
  ------------------
  |  Branch (669:3): [True: 1, False: 27]
  ------------------
  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: 27]
  ------------------
  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|     28|  }
  676|     28|}
socks.c:socks5_auth_init:
  681|      8|{
  682|       |  /* Needs username and password */
  683|      8|  size_t ulen = 0, plen = 0, nwritten;
  684|      8|  unsigned char buf[2];
  685|      8|  CURLcode result;
  686|       |
  687|      8|  if(sx->creds) {
  ------------------
  |  Branch (687:6): [True: 3, False: 5]
  ------------------
  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|      8|  buf[0] = 1;    /* username/pw subnegotiation version */
  709|      8|  buf[1] = (unsigned char)ulen;
  710|      8|  result = Curl_bufq_write(&sx->iobuf, buf, 2, &nwritten);
  711|      8|  if(result || (nwritten != 2))
  ------------------
  |  Branch (711:6): [True: 0, False: 8]
  |  Branch (711:16): [True: 0, False: 8]
  ------------------
  712|      0|    return CURLPX_SEND_REQUEST;
  713|      8|  if(ulen) {
  ------------------
  |  Branch (713:6): [True: 3, False: 5]
  ------------------
  714|      3|    result = Curl_bufq_cwrite(&sx->iobuf, sx->creds->user, ulen, &nwritten);
  715|      3|    if(result || (nwritten != ulen))
  ------------------
  |  Branch (715:8): [True: 0, False: 3]
  |  Branch (715:18): [True: 0, False: 3]
  ------------------
  716|      0|      return CURLPX_SEND_REQUEST;
  717|      3|  }
  718|      8|  buf[0] = (unsigned char)plen;
  719|      8|  result = Curl_bufq_write(&sx->iobuf, buf, 1, &nwritten);
  720|      8|  if(result || (nwritten != 1))
  ------------------
  |  Branch (720:6): [True: 0, False: 8]
  |  Branch (720:16): [True: 0, False: 8]
  ------------------
  721|      0|    return CURLPX_SEND_REQUEST;
  722|      8|  if(plen) {
  ------------------
  |  Branch (722:6): [True: 1, False: 7]
  ------------------
  723|      1|    result = Curl_bufq_cwrite(&sx->iobuf, sx->creds->passwd, plen, &nwritten);
  724|      1|    if(result || (nwritten != plen))
  ------------------
  |  Branch (724:8): [True: 0, False: 1]
  |  Branch (724:18): [True: 0, False: 1]
  ------------------
  725|      0|      return CURLPX_SEND_REQUEST;
  726|      1|  }
  727|      8|  sxstate(sx, cf, data, SOCKS5_ST_AUTH_SEND);
  ------------------
  |  |  162|      8|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  728|      8|  return CURLPX_OK;
  729|      8|}
socks.c:socks5_check_auth_resp:
  734|      8|{
  735|      8|  const unsigned char *resp;
  736|      8|  unsigned char auth_status;
  737|      8|  size_t rlen;
  738|       |
  739|      8|  (void)cf;
  740|      8|  if(!Curl_bufq_peek(&sx->iobuf, &resp, &rlen) || rlen < 2) {
  ------------------
  |  Branch (740:6): [True: 0, False: 8]
  |  Branch (740:51): [True: 0, False: 8]
  ------------------
  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|      8|  auth_status = resp[1];
  747|      8|  if(auth_status) {
  ------------------
  |  Branch (747:6): [True: 3, False: 5]
  ------------------
  748|      3|    failf(data, "User was rejected by the SOCKS5 server (%d %d).",
  ------------------
  |  |   62|      3|#define failf Curl_failf
  ------------------
  749|      3|          resp[0], resp[1]);
  750|      3|    return CURLPX_USER_REJECTED;
  751|      3|  }
  752|      5|  Curl_bufq_skip(&sx->iobuf, 2);
  753|      5|  return CURLPX_OK;
  754|      8|}
socks.c:socks5_req1_init:
  759|     20|{
  760|     20|  unsigned char req[5];
  761|     20|  unsigned char ipbuf[16];
  762|     20|  const unsigned char *destination;
  763|     20|  unsigned char desttype, destlen, hdlen;
  764|     20|  size_t nwritten;
  765|     20|  CURLcode result;
  766|       |
  767|     20|  req[0] = 5; /* version (SOCKS5) */
  768|     20|  req[1] = 1; /* connect */
  769|     20|  req[2] = 0; /* must be zero */
  770|     20|  if(sx->resolve_local) {
  ------------------
  |  Branch (770:6): [True: 15, False: 5]
  ------------------
  771|       |    /* rest of request is added after resolving */
  772|     15|    result = Curl_bufq_write(&sx->iobuf, req, 3, &nwritten);
  773|     15|    if(result || (nwritten != 3))
  ------------------
  |  Branch (773:8): [True: 0, False: 15]
  |  Branch (773:18): [True: 0, False: 15]
  ------------------
  774|      0|      return CURLPX_SEND_REQUEST;
  775|     15|    return CURLPX_OK;
  776|     15|  }
  777|       |
  778|       |  /* remote resolving, send what type+addr/string to resolve */
  779|      5|#ifdef USE_IPV6
  780|      5|  if(strchr(sx->dest->hostname, ':')) {
  ------------------
  |  Branch (780:6): [True: 0, False: 5]
  ------------------
  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)
  ------------------
  |  Branch (784:8): [True: 0, False: 0]
  ------------------
  785|      0|      return CURLPX_BAD_ADDRESS_TYPE;
  786|      0|  }
  787|      5|  else
  788|      5|#endif
  789|      5|  if(curlx_inet_pton(AF_INET, sx->dest->hostname, ipbuf) == 1) {
  ------------------
  |  Branch (789:6): [True: 5, False: 0]
  ------------------
  790|      5|    desttype = 1;
  791|      5|    destination = ipbuf;
  792|      5|    destlen = 4;
  793|      5|  }
  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);
  ------------------
  |  | 1077|      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; /* 1-byte length */
  803|      0|  }
  804|       |
  805|      5|  req[3] = desttype;
  806|      5|  req[4] = destlen;
  807|      5|  hdlen = (desttype == 3) ? 5 : 4; /* no length byte for ip addresses */
  ------------------
  |  Branch (807:11): [True: 0, False: 5]
  ------------------
  808|      5|  result = Curl_bufq_write(&sx->iobuf, req, hdlen, &nwritten);
  809|      5|  if(result || (nwritten != hdlen))
  ------------------
  |  Branch (809:6): [True: 0, False: 5]
  |  Branch (809:16): [True: 0, False: 5]
  ------------------
  810|      0|    return CURLPX_SEND_REQUEST;
  811|      5|  result = Curl_bufq_write(&sx->iobuf, destination, destlen, &nwritten);
  812|      5|  if(result || (nwritten != destlen))
  ------------------
  |  Branch (812:6): [True: 0, False: 5]
  |  Branch (812:16): [True: 0, False: 5]
  ------------------
  813|      0|    return CURLPX_SEND_REQUEST;
  814|       |  /* PORT MSB+LSB */
  815|      5|  req[0] = (unsigned char)((sx->dest->port >> 8) & 0xff);
  816|      5|  req[1] = (unsigned char)(sx->dest->port & 0xff);
  817|      5|  result = Curl_bufq_write(&sx->iobuf, req, 2, &nwritten);
  818|      5|  if(result || (nwritten != 2))
  ------------------
  |  Branch (818:6): [True: 0, False: 5]
  |  Branch (818:16): [True: 0, False: 5]
  ------------------
  819|      0|    return CURLPX_SEND_REQUEST;
  820|      5|  CURL_TRC_CF(data, cf, "SOCKS5 connect to %s:%u (remotely resolved)",
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  821|      5|              sx->dest->hostname, sx->dest->port);
  822|      5|  return CURLPX_OK;
  823|      5|}
socks.c:socks5_resolving:
  829|     15|{
  830|     15|  const struct Curl_addrinfo *ai = NULL;
  831|     15|  char dest[MAX_IPADR_LEN];  /* printable address */
  832|     15|  const unsigned char *destination = NULL;
  833|     15|  unsigned char desttype = 1, destlen = 4;
  834|     15|  unsigned char req[2];
  835|     15|  CURLcode result;
  836|     15|  CURLproxycode presult = CURLPX_OK;
  837|     15|  size_t nwritten;
  838|     15|  bool dns_done;
  839|       |
  840|     15|  *done = FALSE;
  ------------------
  |  | 1054|     15|#define FALSE false
  ------------------
  841|     15|  if(sx->start_resolving) {
  ------------------
  |  Branch (841:6): [True: 15, False: 0]
  ------------------
  842|       |    /* need to resolve hostname to add destination address */
  843|     15|    sx->start_resolving = FALSE;
  ------------------
  |  | 1054|     15|#define FALSE false
  ------------------
  844|     15|    result = Curl_cf_dns_insert_after(
  845|     15|      cf, data, Curl_resolv_dns_queries(data, sx->ip_version),
  846|     15|      sx->dest, TRNSPRT_TCP, TRUE);
  ------------------
  |  |  249|     15|#define TRNSPRT_TCP  3
  ------------------
                    sx->dest, TRNSPRT_TCP, TRUE);
  ------------------
  |  | 1051|     15|#define TRUE true
  ------------------
  847|     15|    if(result) {
  ------------------
  |  Branch (847:8): [True: 0, False: 15]
  ------------------
  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|     15|  }
  852|       |
  853|       |  /* resolve the hostname by connecting the DNS filter */
  854|     15|  result = Curl_conn_cf_connect(cf->next, data, &dns_done);
  855|     15|  if(result) {
  ------------------
  |  Branch (855:6): [True: 0, False: 15]
  ------------------
  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|     15|  else if(!dns_done)
  ------------------
  |  Branch (860:11): [True: 0, False: 15]
  ------------------
  861|      0|    return CURLPX_OK;
  862|       |
  863|     15|#ifdef USE_IPV6
  864|     15|  if(data->set.ipver != CURL_IPRESOLVE_V4)
  ------------------
  |  | 2311|     15|#define CURL_IPRESOLVE_V4       1L /* uses only IPv4 addresses/connections */
  ------------------
  |  Branch (864:6): [True: 15, False: 0]
  ------------------
  865|     15|    ai = Curl_cf_dns_get_ai(cf->next, data, sx->dest, AF_INET6, 0);
  866|     15|#endif
  867|     15|  if(!ai)
  ------------------
  |  Branch (867:6): [True: 15, False: 0]
  ------------------
  868|     15|    ai = Curl_cf_dns_get_ai(cf->next, data, sx->dest, AF_INET, 0);
  869|       |
  870|     15|  if(!ai) {
  ------------------
  |  Branch (870:6): [True: 0, False: 15]
  ------------------
  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|     15|  Curl_printable_address(ai, dest, sizeof(dest));
  878|       |
  879|     15|  if(ai->ai_family == AF_INET) {
  ------------------
  |  Branch (879:6): [True: 15, False: 0]
  ------------------
  880|     15|    struct sockaddr_in *saddr_in;
  881|     15|    desttype = 1; /* ATYP: IPv4 = 1 */
  882|     15|    destlen = 4;
  883|     15|    saddr_in = (struct sockaddr_in *)(void *)ai->ai_addr;
  884|     15|    destination = (const unsigned char *)&saddr_in->sin_addr.s_addr;
  885|     15|    CURL_TRC_CF(data, cf, "SOCKS5 connect to %s:%u (locally resolved)",
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  886|     15|                dest, sx->dest->port);
  887|     15|  }
  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|     15|#endif
  899|       |
  900|     15|  if(!destination) {
  ------------------
  |  Branch (900:6): [True: 0, False: 15]
  ------------------
  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|     15|  req[0] = desttype;
  907|     15|  result = Curl_bufq_write(&sx->iobuf, req, 1, &nwritten);
  908|     15|  if(result || (nwritten != 1)) {
  ------------------
  |  Branch (908:6): [True: 0, False: 15]
  |  Branch (908:16): [True: 0, False: 15]
  ------------------
  909|      0|    presult = CURLPX_SEND_REQUEST;
  910|      0|    goto out;
  911|      0|  }
  912|     15|  result = Curl_bufq_write(&sx->iobuf, destination, destlen, &nwritten);
  913|     15|  if(result || (nwritten != destlen)) {
  ------------------
  |  Branch (913:6): [True: 0, False: 15]
  |  Branch (913:16): [True: 0, False: 15]
  ------------------
  914|      0|    presult = CURLPX_SEND_REQUEST;
  915|      0|    goto out;
  916|      0|  }
  917|       |  /* PORT MSB+LSB */
  918|     15|  req[0] = (unsigned char)((sx->dest->port >> 8) & 0xffU);
  919|     15|  req[1] = (unsigned char)(sx->dest->port & 0xffU);
  920|     15|  result = Curl_bufq_write(&sx->iobuf, req, 2, &nwritten);
  921|     15|  if(result || (nwritten != 2)) {
  ------------------
  |  Branch (921:6): [True: 0, False: 15]
  |  Branch (921:16): [True: 0, False: 15]
  ------------------
  922|      0|    presult = CURLPX_SEND_REQUEST;
  923|      0|    goto out;
  924|      0|  }
  925|       |
  926|     15|out:
  927|     15|  *done = (presult == CURLPX_OK);
  928|     15|  return presult;
  929|     15|}
socks.c:socks5_recv_resp1:
  935|     37|{
  936|     37|  const unsigned char *resp;
  937|     37|  size_t rlen, resp_len = 8; /* minimum response length */
  938|     37|  CURLproxycode presult;
  939|       |
  940|     37|  presult = socks_recv(sx, cf, data, resp_len, done);
  941|     37|  if(presult)
  ------------------
  |  Branch (941:6): [True: 2, False: 35]
  ------------------
  942|      2|    return presult;
  943|     35|  else if(!*done)
  ------------------
  |  Branch (943:11): [True: 11, False: 24]
  ------------------
  944|     11|    return CURLPX_OK;
  945|       |
  946|     24|  if(!Curl_bufq_peek(&sx->iobuf, &resp, &rlen) || rlen < resp_len) {
  ------------------
  |  Branch (946:6): [True: 0, False: 24]
  |  Branch (946:51): [True: 0, False: 24]
  ------------------
  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|     24|  if(resp[0] != 5) { /* version */
  ------------------
  |  Branch (966:6): [True: 2, False: 22]
  ------------------
  967|      2|    failf(data, "SOCKS5 reply has wrong version, version should be 5.");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  968|      2|    return CURLPX_BAD_VERSION;
  969|      2|  }
  970|     22|  else if(resp[1]) { /* Anything besides 0 is an error */
  ------------------
  |  Branch (970:11): [True: 2, False: 20]
  ------------------
  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|     20|  switch(resp[3]) {
  995|      5|  case 1: /* IPv4 */
  ------------------
  |  Branch (995:3): [True: 5, False: 15]
  ------------------
  996|      5|    resp_len = 4 + 4 + 2;
  997|      5|    break;
  998|      8|  case 3: /* domain name */
  ------------------
  |  Branch (998:3): [True: 8, False: 12]
  ------------------
  999|      8|    resp_len = 4 + 1 + resp[4] + 2; /* header, var length, var bytes, port */
 1000|      8|    break;
 1001|      6|  case 4: /* IPv6 */
  ------------------
  |  Branch (1001:3): [True: 6, False: 14]
  ------------------
 1002|      6|    resp_len = 4 + 16 + 2;
 1003|      6|    break;
 1004|      1|  default:
  ------------------
  |  Branch (1004:3): [True: 1, False: 19]
  ------------------
 1005|      1|    failf(data, "SOCKS5 reply has wrong address type.");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 1006|      1|    return CURLPX_BAD_ADDRESS_TYPE;
 1007|     20|  }
 1008|       |
 1009|       |  /* receive the rest of the response */
 1010|     19|  presult = socks_recv(sx, cf, data, resp_len, done);
 1011|     19|  if(presult)
  ------------------
  |  Branch (1011:6): [True: 4, False: 15]
  ------------------
 1012|      4|    return presult;
 1013|     15|  else if(!*done)
  ------------------
  |  Branch (1013:11): [True: 10, False: 5]
  ------------------
 1014|     10|    return CURLPX_OK;
 1015|       |
 1016|      5|  if(!Curl_bufq_peek(&sx->iobuf, &resp, &rlen) || rlen < resp_len) {
  ------------------
  |  Branch (1016:6): [True: 0, False: 5]
  |  Branch (1016:51): [True: 0, False: 5]
  ------------------
 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|      5|  *done = TRUE;
  ------------------
  |  | 1051|      5|#define TRUE true
  ------------------
 1022|      5|  return CURLPX_OK;
 1023|      5|}
socks.c:socks4_connect:
  464|     90|{
  465|     90|  size_t nwritten;
  466|     90|  CURLproxycode presult;
  467|     90|  CURLcode result;
  468|     90|  bool done;
  469|       |
  470|     94|process_state:
  471|     94|  switch(sx->state) {
  472|     74|  case SOCKS_ST_INIT:
  ------------------
  |  Branch (472:3): [True: 74, False: 20]
  ------------------
  473|     74|    sx->version = 4;
  474|     74|    sxstate(sx, cf, data, SOCKS4_ST_START);
  ------------------
  |  |  162|     74|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  475|     74|    FALLTHROUGH();
  ------------------
  |  |  817|     74|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  476|       |
  477|     74|  case SOCKS4_ST_START:
  ------------------
  |  Branch (477:3): [True: 0, False: 94]
  ------------------
  478|     74|    Curl_bufq_reset(&sx->iobuf);
  479|     74|    sx->start_resolving = FALSE;
  ------------------
  |  | 1054|     74|#define FALSE false
  ------------------
  480|     74|    sx->socks4a = (sx->proxy_type == CURLPROXY_SOCKS4A);
  ------------------
  |  |  801|     74|#define CURLPROXY_SOCKS4A         6L /* added in 7.18.0 */
  ------------------
  481|     74|    sx->resolve_local = !sx->socks4a;
  482|     74|    sx->presult = CURLPX_OK;
  483|       |
  484|       |    /* SOCKS4 can only do IPv4, insist! */
  485|     74|    sx->ip_version = CURL_IPRESOLVE_V4;
  ------------------
  |  | 2311|     74|#define CURL_IPRESOLVE_V4       1L /* uses only IPv4 addresses/connections */
  ------------------
  486|     74|    CURL_TRC_CF(data, cf, "SOCKS4%s connecting to %s:%u",
  ------------------
  |  |  153|     74|  do {                                          \
  |  |  154|     74|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     74|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    148|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 74, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 74]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    148|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((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|   (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|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|     74|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 74]
  |  |  ------------------
  ------------------
  487|     74|                sx->socks4a ? "a" : "",
  488|     74|                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|     74|    presult = socks4_req_add_hd(sx, data);
  501|     74|    if(presult)
  ------------------
  |  Branch (501:8): [True: 0, False: 74]
  ------------------
  502|      0|      return socks_failed(sx, cf, data, presult);
  503|       |
  504|       |    /* DNS resolve only for SOCKS4, not SOCKS4a */
  505|     74|    if(!sx->resolve_local) {
  ------------------
  |  Branch (505:8): [True: 4, False: 70]
  ------------------
  506|       |      /* socks4a, not resolving locally, sends the hostname.
  507|       |       * add an invalid address + user + hostname */
  508|      4|      unsigned char buf[4] = { 0, 0, 0, 1 };
  509|      4|      size_t hlen = strlen(sx->dest->hostname) + 1; /* including NUL */
  510|       |
  511|      4|      if(hlen > 255) {
  ------------------
  |  Branch (511:10): [True: 0, False: 4]
  ------------------
  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|      4|      result = Curl_bufq_write(&sx->iobuf, buf, 4, &nwritten);
  516|      4|      if(result || (nwritten != 4))
  ------------------
  |  Branch (516:10): [True: 0, False: 4]
  |  Branch (516:20): [True: 0, False: 4]
  ------------------
  517|      0|        return socks_failed(sx, cf, data, CURLPX_SEND_REQUEST);
  518|      4|      presult = socks4_req_add_user(sx, data);
  519|      4|      if(presult)
  ------------------
  |  Branch (519:10): [True: 0, False: 4]
  ------------------
  520|      0|        return socks_failed(sx, cf, data, presult);
  521|      4|      result = Curl_bufq_cwrite(&sx->iobuf, sx->dest->hostname, hlen,
  522|      4|                                &nwritten);
  523|      4|      if(result || (nwritten != hlen))
  ------------------
  |  Branch (523:10): [True: 0, False: 4]
  |  Branch (523:20): [True: 0, False: 4]
  ------------------
  524|      0|        return socks_failed(sx, cf, data, CURLPX_SEND_REQUEST);
  525|       |      /* request complete */
  526|      4|      sxstate(sx, cf, data, SOCKS4_ST_SEND);
  ------------------
  |  |  162|      4|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  527|      4|      goto process_state;
  528|      4|    }
  529|     70|    sx->start_resolving = TRUE;
  ------------------
  |  | 1051|     70|#define TRUE true
  ------------------
  530|     70|    sxstate(sx, cf, data, SOCKS4_ST_RESOLVING);
  ------------------
  |  |  162|     70|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  531|     70|    FALLTHROUGH();
  ------------------
  |  |  817|     70|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  532|       |
  533|     70|  case SOCKS4_ST_RESOLVING:
  ------------------
  |  Branch (533:3): [True: 0, False: 94]
  ------------------
  534|     70|    presult = socks4_resolving(sx, cf, data, &done);
  535|     70|    if(presult)
  ------------------
  |  Branch (535:8): [True: 2, False: 68]
  ------------------
  536|      2|      return socks_failed(sx, cf, data, presult);
  537|     68|    if(!done)
  ------------------
  |  Branch (537:8): [True: 18, False: 50]
  ------------------
  538|     18|      return CURLPX_OK;
  539|       |    /* append user */
  540|     50|    presult = socks4_req_add_user(sx, data);
  541|     50|    if(presult)
  ------------------
  |  Branch (541:8): [True: 0, False: 50]
  ------------------
  542|      0|      return socks_failed(sx, cf, data, presult);
  543|     50|    sxstate(sx, cf, data, SOCKS4_ST_SEND);
  ------------------
  |  |  162|     50|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  544|     50|    FALLTHROUGH();
  ------------------
  |  |  817|     50|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  545|       |
  546|     54|  case SOCKS4_ST_SEND:
  ------------------
  |  Branch (546:3): [True: 4, False: 90]
  ------------------
  547|     54|    presult = socks_flush(sx, cf, data, &done);
  548|     54|    if(presult)
  ------------------
  |  Branch (548:8): [True: 0, False: 54]
  ------------------
  549|      0|      return socks_failed(sx, cf, data, presult);
  550|     54|    else if(!done)
  ------------------
  |  Branch (550:13): [True: 0, False: 54]
  ------------------
  551|      0|      return CURLPX_OK;
  552|     54|    sxstate(sx, cf, data, SOCKS4_ST_RECV);
  ------------------
  |  |  162|     54|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  553|     54|    FALLTHROUGH();
  ------------------
  |  |  817|     54|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  554|       |
  555|     70|  case SOCKS4_ST_RECV:
  ------------------
  |  Branch (555:3): [True: 16, False: 78]
  ------------------
  556|       |    /* Receive 8-byte response */
  557|     70|    presult = socks_recv(sx, cf, data, 8, &done);
  558|     70|    if(presult)
  ------------------
  |  Branch (558:8): [True: 40, False: 30]
  ------------------
  559|     40|      return socks_failed(sx, cf, data, presult);
  560|     30|    else if(!done)
  ------------------
  |  Branch (560:13): [True: 19, False: 11]
  ------------------
  561|     19|      return CURLPX_OK;
  562|     11|    presult = socks4_check_resp(sx, cf, data);
  563|     11|    if(presult)
  ------------------
  |  Branch (563:8): [True: 6, False: 5]
  ------------------
  564|      6|      return socks_failed(sx, cf, data, presult);
  565|      5|    sxstate(sx, cf, data, SOCKS_ST_SUCCESS);
  ------------------
  |  |  162|      5|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  566|      5|    FALLTHROUGH();
  ------------------
  |  |  817|      5|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  567|       |
  568|      5|  case SOCKS_ST_SUCCESS:
  ------------------
  |  Branch (568:3): [True: 0, False: 94]
  ------------------
  569|      5|    return CURLPX_OK;
  570|       |
  571|      0|  case SOCKS_ST_FAILED:
  ------------------
  |  Branch (571:3): [True: 0, False: 94]
  ------------------
  572|      0|    DEBUGASSERT(sx->presult);
  ------------------
  |  | 1077|      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: 94]
  ------------------
  576|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1077|      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|     94|  }
  579|     94|}
socks.c:socks4_req_add_hd:
  265|     74|{
  266|     74|  unsigned char buf[4];
  267|     74|  size_t nwritten;
  268|     74|  CURLcode result;
  269|       |
  270|     74|  (void)data;
  271|     74|  buf[0] = 4; /* version (SOCKS4) */
  272|     74|  buf[1] = 1; /* connect */
  273|     74|  buf[2] = (unsigned char)((sx->dest->port >> 8) & 0xffU); /* MSB */
  274|     74|  buf[3] = (unsigned char)(sx->dest->port & 0xffU);        /* LSB */
  275|       |
  276|     74|  result = Curl_bufq_write(&sx->iobuf, buf, 4, &nwritten);
  277|     74|  if(result || (nwritten != 4))
  ------------------
  |  Branch (277:6): [True: 0, False: 74]
  |  Branch (277:16): [True: 0, False: 74]
  ------------------
  278|      0|    return CURLPX_SEND_REQUEST;
  279|     74|  return CURLPX_OK;
  280|     74|}
socks.c:socks4_req_add_user:
  284|     54|{
  285|     54|  CURLcode result;
  286|     54|  size_t nwritten;
  287|       |
  288|     54|  if(sx->creds) {
  ------------------
  |  Branch (288:6): [True: 7, False: 47]
  ------------------
  289|      7|    size_t plen = strlen(sx->creds->user);
  290|      7|    if(plen > 255) {
  ------------------
  |  Branch (290:8): [True: 0, False: 7]
  ------------------
  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|      0|      failf(data, "Too long SOCKS proxy username");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  295|      0|      return CURLPX_LONG_USER;
  296|      0|    }
  297|       |    /* add proxy name WITH trailing zero */
  298|      7|    result = Curl_bufq_cwrite(&sx->iobuf, sx->creds->user, plen + 1,
  299|      7|                              &nwritten);
  300|      7|    if(result || (nwritten != (plen + 1)))
  ------------------
  |  Branch (300:8): [True: 0, False: 7]
  |  Branch (300:18): [True: 0, False: 7]
  ------------------
  301|      0|      return CURLPX_SEND_REQUEST;
  302|      7|  }
  303|     47|  else {
  304|       |    /* empty username */
  305|     47|    unsigned char b = 0;
  306|     47|    result = Curl_bufq_write(&sx->iobuf, &b, 1, &nwritten);
  307|     47|    if(result || (nwritten != 1))
  ------------------
  |  Branch (307:8): [True: 0, False: 47]
  |  Branch (307:18): [True: 0, False: 47]
  ------------------
  308|      0|      return CURLPX_SEND_REQUEST;
  309|     47|  }
  310|     54|  return CURLPX_OK;
  311|     54|}
socks.c:socks4_resolving:
  317|     70|{
  318|     70|  const struct Curl_addrinfo *ai = NULL;
  319|     70|  CURLcode result;
  320|     70|  size_t nwritten;
  321|     70|  bool dns_done;
  322|       |
  323|     70|  *done = FALSE;
  ------------------
  |  | 1054|     70|#define FALSE false
  ------------------
  324|     70|  if(sx->start_resolving) {
  ------------------
  |  Branch (324:6): [True: 70, False: 0]
  ------------------
  325|       |    /* need to resolve hostname to add destination address */
  326|     70|    sx->start_resolving = FALSE;
  ------------------
  |  | 1054|     70|#define FALSE false
  ------------------
  327|     70|    result = Curl_cf_dns_insert_after(
  328|     70|      cf, data, Curl_resolv_dns_queries(data, sx->ip_version),
  329|     70|      sx->dest, TRNSPRT_TCP, TRUE);
  ------------------
  |  |  249|     70|#define TRNSPRT_TCP  3
  ------------------
                    sx->dest, TRNSPRT_TCP, TRUE);
  ------------------
  |  | 1051|     70|#define TRUE true
  ------------------
  330|     70|    if(result) {
  ------------------
  |  Branch (330:8): [True: 0, False: 70]
  ------------------
  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|     70|  }
  335|       |
  336|       |  /* resolve the hostname by connecting the DNS filter */
  337|     70|  result = Curl_conn_cf_connect(cf->next, data, &dns_done);
  338|     70|  if(result) {
  ------------------
  |  Branch (338:6): [True: 1, False: 69]
  ------------------
  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|     69|  else if(!dns_done)
  ------------------
  |  Branch (343:11): [True: 18, False: 51]
  ------------------
  344|     18|    return CURLPX_OK;
  345|       |
  346|     51|  ai = Curl_cf_dns_get_ai(cf->next, data, sx->dest, AF_INET, 0);
  347|     51|  if(ai) {
  ------------------
  |  Branch (347:6): [True: 50, False: 1]
  ------------------
  348|     50|    struct sockaddr_in *saddr_in;
  349|     50|    char ipbuf[64];
  350|       |
  351|     50|    Curl_printable_address(ai, ipbuf, sizeof(ipbuf));
  352|     50|    CURL_TRC_CF(data, cf, "SOCKS4 connect to IPv4 %s (locally resolved)",
  ------------------
  |  |  153|     50|  do {                                          \
  |  |  154|     50|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     50|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    100|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 50, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 50]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    100|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((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|     50|   (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|     50|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     50|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 50]
  |  |  ------------------
  ------------------
  353|     50|                ipbuf);
  354|       |
  355|     50|    saddr_in = (struct sockaddr_in *)(void *)ai->ai_addr;
  356|     50|    result = Curl_bufq_write(&sx->iobuf,
  357|     50|                             (unsigned char *)&saddr_in->sin_addr.s_addr, 4,
  358|     50|                             &nwritten);
  359|       |
  360|     50|    if(result || (nwritten != 4))
  ------------------
  |  Branch (360:8): [True: 0, False: 50]
  |  Branch (360:18): [True: 0, False: 50]
  ------------------
  361|      0|      return CURLPX_SEND_REQUEST;
  362|     50|  }
  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|     50|  *done = TRUE;
  ------------------
  |  | 1051|     50|#define TRUE true
  ------------------
  370|     50|  return CURLPX_OK;
  371|     51|}
socks.c:socks4_check_resp:
  376|     11|{
  377|     11|  const unsigned char *resp;
  378|     11|  size_t rlen;
  379|       |
  380|     11|  if(!Curl_bufq_peek(&sx->iobuf, &resp, &rlen) || rlen < 8) {
  ------------------
  |  Branch (380:6): [True: 0, False: 11]
  |  Branch (380:51): [True: 0, False: 11]
  ------------------
  381|      0|    failf(data, "SOCKS4 reply is incomplete.");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  382|      0|    return CURLPX_RECV_CONNECT;
  383|      0|  }
  384|       |
  385|     11|  DEBUGASSERT(rlen == 8);
  ------------------
  |  | 1077|     11|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (385:3): [True: 0, False: 11]
  |  Branch (385:3): [True: 11, 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|     11|  if(resp[0]) {
  ------------------
  |  Branch (406:6): [True: 2, False: 9]
  ------------------
  407|      2|    failf(data, "SOCKS4 reply has wrong version, version should be 0.");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  408|      2|    return CURLPX_BAD_VERSION;
  409|      2|  }
  410|       |
  411|       |  /* Result */
  412|      9|  switch(resp[1]) {
  413|      5|  case 90:
  ------------------
  |  Branch (413:3): [True: 5, False: 4]
  ------------------
  414|      5|    CURL_TRC_CF(data, cf, "SOCKS4%s request granted.", sx->socks4a ? "a" : "");
  ------------------
  |  |  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__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|      5|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5]
  |  |  ------------------
  ------------------
  415|      5|    Curl_bufq_skip(&sx->iobuf, 8);
  416|      5|    return CURLPX_OK;
  417|      1|  case 91:
  ------------------
  |  Branch (417:3): [True: 1, False: 8]
  ------------------
  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: 8]
  ------------------
  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: 8]
  ------------------
  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: 8]
  ------------------
  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|      9|  }
  448|      9|}
socks.c:socks_cf_adjust_pollset:
 1267|     83|{
 1268|     83|  struct socks_ctx *sx = cf->ctx;
 1269|     83|  CURLcode result = CURLE_OK;
 1270|       |
 1271|     83|  if(!cf->connected && sx) {
  ------------------
  |  Branch (1271:6): [True: 68, False: 15]
  |  Branch (1271:24): [True: 68, 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|     68|    curl_socket_t sock = Curl_conn_cf_get_socket(cf, data);
 1275|     68|    switch(sx->state) {
 1276|      0|    case SOCKS4_ST_SEND:
  ------------------
  |  Branch (1276:5): [True: 0, False: 68]
  ------------------
 1277|      0|    case SOCKS5_ST_REQ0_SEND:
  ------------------
  |  Branch (1277:5): [True: 0, False: 68]
  ------------------
 1278|      0|    case SOCKS5_ST_AUTH_SEND:
  ------------------
  |  Branch (1278:5): [True: 0, False: 68]
  ------------------
 1279|      0|    case SOCKS5_ST_REQ1_SEND:
  ------------------
  |  Branch (1279:5): [True: 0, False: 68]
  ------------------
 1280|      0|      CURL_TRC_CF(data, cf, "adjust pollset out (%d)", (int)sx->state);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  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|     68|    default:
  ------------------
  |  Branch (1283:5): [True: 68, False: 0]
  ------------------
 1284|     68|      CURL_TRC_CF(data, cf, "adjust pollset in (%d)", (int)sx->state);
  ------------------
  |  |  153|     68|  do {                                          \
  |  |  154|     68|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     68|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    136|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 68, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 68]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    136|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((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|     68|   (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|     68|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     68|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 68]
  |  |  ------------------
  ------------------
 1285|     68|      result = Curl_pollset_set_in_only(data, ps, sock);
  ------------------
  |  |  172|     68|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  283|     68|#define CURL_POLL_IN     1
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  284|     68|#define CURL_POLL_OUT    2
  |  |  ------------------
  ------------------
 1286|     68|      break;
 1287|     68|    }
 1288|     68|  }
 1289|     83|  return result;
 1290|     83|}
socks.c:socks_cf_query:
 1303|    415|{
 1304|    415|  struct socks_ctx *sx = cf->ctx;
 1305|       |
 1306|    415|  switch(query) {
 1307|      0|  case CF_QUERY_HOST_PORT:
  ------------------
  |  |  173|      0|#define CF_QUERY_HOST_PORT         11  /* port       const char * */
  ------------------
  |  Branch (1307:3): [True: 0, False: 415]
  ------------------
 1308|      0|    if(sx) {
  ------------------
  |  Branch (1308:8): [True: 0, False: 0]
  ------------------
 1309|      0|      *pres1 = sx->dest->port;
 1310|      0|      *((const char **)pres2) = sx->dest->hostname;
 1311|      0|      return CURLE_OK;
 1312|      0|    }
 1313|      0|    break;
 1314|      0|  case CF_QUERY_ALPN_NEGOTIATED: {
  ------------------
  |  |  177|      0|#define CF_QUERY_ALPN_NEGOTIATED   15  /* -          const char * */
  ------------------
  |  Branch (1314:3): [True: 0, False: 415]
  ------------------
 1315|      0|    const char **palpn = pres2;
 1316|      0|    DEBUGASSERT(palpn);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1316:5): [True: 0, False: 0]
  |  Branch (1316:5): [True: 0, False: 0]
  ------------------
 1317|      0|    *palpn = NULL;
 1318|      0|    return CURLE_OK;
 1319|      0|  }
 1320|    415|  default:
  ------------------
  |  Branch (1320:3): [True: 415, False: 0]
  ------------------
 1321|    415|    break;
 1322|    415|  }
 1323|    415|  return cf->next ?
  ------------------
  |  Branch (1323:10): [True: 415, False: 0]
  ------------------
 1324|    415|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
 1325|    415|    CURLE_UNKNOWN_OPTION;
 1326|    415|}
socks.c:socks_proxy_ctx_free:
 1181|    110|{
 1182|    110|  if(ctx) {
  ------------------
  |  Branch (1182:6): [True: 110, False: 0]
  ------------------
 1183|    110|    Curl_peer_unlink(&ctx->dest);
 1184|    110|    Curl_creds_unlink(&ctx->creds);
 1185|    110|    Curl_bufq_free(&ctx->iobuf);
 1186|    110|    curlx_free(ctx);
  ------------------
  |  | 1488|    110|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1187|    110|  }
 1188|    110|}

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

Curl_raw_toupper:
   75|  1.37M|{
   76|  1.37M|  return (char)touppermap[(unsigned char)in];
   77|  1.37M|}
Curl_raw_tolower:
   82|  1.20M|{
   83|  1.20M|  return (char)tolowermap[(unsigned char)in];
   84|  1.20M|}
Curl_strntoupper:
   92|  8.12k|{
   93|  8.12k|  if(n < 1)
  ------------------
  |  Branch (93:6): [True: 0, False: 8.12k]
  ------------------
   94|      0|    return;
   95|       |
   96|  74.0k|  do {
   97|  74.0k|    *dest++ = Curl_raw_toupper(*src);
   98|  74.0k|  } while(*src++ && --n);
  ------------------
  |  Branch (98:11): [True: 68.3k, False: 5.61k]
  |  Branch (98:21): [True: 65.8k, False: 2.51k]
  ------------------
   99|  8.12k|}
Curl_strntolower:
  107|  50.5k|{
  108|  50.5k|  if(n < 1)
  ------------------
  |  Branch (108:6): [True: 267, False: 50.2k]
  ------------------
  109|    267|    return;
  110|       |
  111|   927k|  do {
  112|   927k|    *dest++ = Curl_raw_tolower(*src);
  113|   927k|  } while(*src++ && --n);
  ------------------
  |  Branch (113:11): [True: 927k, False: 0]
  |  Branch (113:21): [True: 876k, False: 50.2k]
  ------------------
  114|  50.2k|}
Curl_safecmp:
  120|  1.93k|{
  121|  1.93k|  if(a && b)
  ------------------
  |  Branch (121:6): [True: 0, False: 1.93k]
  |  Branch (121:11): [True: 0, False: 0]
  ------------------
  122|      0|    return !strcmp(a, b);
  123|  1.93k|  return !a && !b;
  ------------------
  |  Branch (123:10): [True: 1.93k, False: 0]
  |  Branch (123:16): [True: 0, False: 1.93k]
  ------------------
  124|  1.93k|}
Curl_timestrcmp:
  131|     20|{
  132|     20|  int match = 0;
  133|     20|  int i = 0;
  134|       |
  135|     20|  if(a && b) {
  ------------------
  |  Branch (135:6): [True: 20, False: 0]
  |  Branch (135:11): [True: 20, False: 0]
  ------------------
  136|     28|    while(1) {
  ------------------
  |  Branch (136:11): [True: 28, Folded]
  ------------------
  137|     28|      match |= a[i] ^ b[i];
  138|     28|      if(!a[i] || !b[i])
  ------------------
  |  Branch (138:10): [True: 20, False: 8]
  |  Branch (138:19): [True: 0, False: 8]
  ------------------
  139|     20|        break;
  140|      8|      i++;
  141|      8|    }
  142|     20|  }
  143|      0|  else
  144|      0|    return a || b;
  ------------------
  |  Branch (144:12): [True: 0, False: 0]
  |  Branch (144:17): [True: 0, False: 0]
  ------------------
  145|     20|  return match;
  146|     20|}

curl_strequal:
   77|  59.5k|{
   78|  59.5k|  if(s1 && s2)
  ------------------
  |  Branch (78:6): [True: 59.2k, False: 226]
  |  Branch (78:12): [True: 55.3k, False: 3.95k]
  ------------------
   79|       |    /* both pointers point to something then compare them */
   80|  55.3k|    return casecompare(s1, s2);
   81|       |
   82|       |  /* if both pointers are NULL then treat them as equal */
   83|  4.18k|  return NULL == s1 && NULL == s2;
  ------------------
  |  Branch (83:10): [True: 226, False: 3.95k]
  |  Branch (83:24): [True: 226, False: 0]
  ------------------
   84|  59.5k|}
curl_strnequal:
   88|   273k|{
   89|   273k|  if(s1 && s2)
  ------------------
  |  Branch (89:6): [True: 273k, False: 0]
  |  Branch (89:12): [True: 273k, False: 0]
  ------------------
   90|       |    /* both pointers point to something then compare them */
   91|   273k|    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|   273k|}
strequal.c:casecompare:
   36|  55.3k|{
   37|  71.8k|  while(*first) {
  ------------------
  |  Branch (37:9): [True: 70.6k, False: 1.28k]
  ------------------
   38|  70.6k|    if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second))
  ------------------
  |  Branch (38:8): [True: 54.0k, False: 16.5k]
  ------------------
   39|       |      /* get out of the loop as soon as they do not match */
   40|  54.0k|      return 0;
   41|  16.5k|    first++;
   42|  16.5k|    second++;
   43|  16.5k|  }
   44|       |  /* If we are here either the strings are the same or the length is different.
   45|       |     We can test if the "current" character is non-zero for one and zero
   46|       |     for the other. Note that the characters may not be exactly the same even
   47|       |     if they match, we only want to compare zero-ness. */
   48|  1.28k|  return !*first == !*second;
   49|  55.3k|}
strequal.c:ncasecompare:
   52|   273k|{
   53|   654k|  while(*first && max) {
  ------------------
  |  Branch (53:9): [True: 601k, False: 53.5k]
  |  Branch (53:19): [True: 571k, False: 29.8k]
  ------------------
   54|   571k|    if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second))
  ------------------
  |  Branch (54:8): [True: 189k, False: 381k]
  ------------------
   55|   189k|      return 0;
   56|   381k|    max--;
   57|   381k|    first++;
   58|   381k|    second++;
   59|   381k|  }
   60|  83.3k|  if(max == 0)
  ------------------
  |  Branch (60:6): [True: 79.6k, False: 3.69k]
  ------------------
   61|  79.6k|    return 1; /* they are equal this far */
   62|       |
   63|  3.69k|  return Curl_raw_toupper(*first) == Curl_raw_toupper(*second);
   64|  83.3k|}

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

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

Curl_thrdq_create:
  209|  13.0k|{
  210|  13.0k|  struct curl_thrdq *tqueue;
  211|  13.0k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  212|       |
  213|  13.0k|  tqueue = curlx_calloc(1, sizeof(*tqueue));
  ------------------
  |  | 1485|  13.0k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  214|  13.0k|  if(!tqueue)
  ------------------
  |  Branch (214:6): [True: 0, False: 13.0k]
  ------------------
  215|      0|    goto out;
  216|       |
  217|  13.0k|  Curl_mutex_init(&tqueue->lock);
  ------------------
  |  |   35|  13.0k|#  define Curl_mutex_init(m)     pthread_mutex_init(m, NULL)
  ------------------
  218|  13.0k|  Curl_cond_init(&tqueue->await);
  ------------------
  |  |   40|  13.0k|#  define Curl_cond_init(c)      pthread_cond_init(c, NULL)
  ------------------
  219|  13.0k|  Curl_llist_init(&tqueue->sendq, thrdq_item_list_dtor);
  220|  13.0k|  Curl_llist_init(&tqueue->recvq, thrdq_item_list_dtor);
  221|  13.0k|  tqueue->fn_free = fn_free;
  222|  13.0k|  tqueue->fn_process = fn_process;
  223|  13.0k|  tqueue->fn_event = fn_event;
  224|  13.0k|  tqueue->fn_user_data = user_data;
  225|  13.0k|  tqueue->send_max_len = max_len;
  226|       |
  227|  13.0k|  tqueue->name = curlx_strdup(name);
  ------------------
  |  | 1482|  13.0k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  228|  13.0k|  if(!tqueue->name)
  ------------------
  |  Branch (228:6): [True: 0, False: 13.0k]
  ------------------
  229|      0|    goto out;
  230|       |
  231|  13.0k|  result = Curl_thrdpool_create(&tqueue->tpool, name,
  232|  13.0k|                                min_threads, max_threads, idle_time_ms,
  233|  13.0k|                                thrdq_tpool_take,
  234|  13.0k|                                thrdq_tpool_process,
  235|  13.0k|                                thrdq_tpool_return,
  236|  13.0k|                                tqueue);
  237|       |
  238|  13.0k|out:
  239|  13.0k|  if(result && tqueue) {
  ------------------
  |  Branch (239:6): [True: 0, False: 13.0k]
  |  Branch (239:16): [True: 0, False: 0]
  ------------------
  240|      0|    tqueue->aborted = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  241|      0|    thrdq_unlink(tqueue, FALSE, TRUE);
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
                  thrdq_unlink(tqueue, FALSE, TRUE);
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  242|       |    tqueue = NULL;
  243|      0|  }
  244|  13.0k|  *ptqueue = tqueue;
  245|  13.0k|  return result;
  246|  13.0k|}
Curl_thrdq_destroy:
  249|  13.0k|{
  250|  13.0k|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|  13.0k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  251|  13.0k|  DEBUGASSERT(!tqueue->aborted);
  ------------------
  |  | 1077|  13.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (251:3): [True: 0, False: 13.0k]
  |  Branch (251:3): [True: 13.0k, False: 0]
  ------------------
  252|  13.0k|  tqueue->aborted = TRUE;
  ------------------
  |  | 1051|  13.0k|#define TRUE true
  ------------------
  253|       |  thrdq_unlink(tqueue, TRUE, join);
  ------------------
  |  | 1051|  13.0k|#define TRUE true
  ------------------
  254|  13.0k|}
Curl_thrdq_send:
  258|    548|{
  259|    548|  CURLcode result = CURLE_AGAIN;
  260|    548|  size_t signals = 0;
  261|       |
  262|    548|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|    548|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  263|    548|  if(tqueue->aborted) {
  ------------------
  |  Branch (263:6): [True: 0, False: 548]
  ------------------
  264|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1077|      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|    548|  if(timeout_ms < 0) {
  ------------------
  |  Branch (268:6): [True: 0, False: 548]
  ------------------
  269|      0|    result = CURLE_OPERATION_TIMEDOUT;
  270|      0|    goto out;
  271|      0|  }
  272|       |
  273|    548|  if(!tqueue->send_max_len ||
  ------------------
  |  Branch (273:6): [True: 548, False: 0]
  ------------------
  274|    548|     (Curl_llist_count(&tqueue->sendq) < tqueue->send_max_len)) {
  ------------------
  |  Branch (274:6): [True: 0, False: 0]
  ------------------
  275|    548|    struct thrdq_item *qitem = thrdq_item_create(tqueue, item, description,
  276|    548|                                                 timeout_ms);
  277|    548|    if(!qitem) {
  ------------------
  |  Branch (277:8): [True: 0, False: 548]
  ------------------
  278|      0|      result = CURLE_OUT_OF_MEMORY;
  279|      0|      goto out;
  280|      0|    }
  281|    548|    item = NULL;
  282|    548|    Curl_llist_append(&tqueue->sendq, qitem, &qitem->node);
  283|    548|    signals = Curl_llist_count(&tqueue->sendq);
  284|    548|    result = CURLE_OK;
  285|    548|  }
  286|       |
  287|    548|out:
  288|    548|  Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|    548|#  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|    548|  if(!result && signals)
  ------------------
  |  Branch (293:6): [True: 548, False: 0]
  |  Branch (293:17): [True: 548, False: 0]
  ------------------
  294|    548|    (void)Curl_thrdpool_signal(tqueue->tpool, (uint32_t)signals);
  295|    548|  return result;
  296|    548|}
Curl_thrdq_recv:
  299|   958k|{
  300|   958k|  CURLcode result = CURLE_AGAIN;
  301|   958k|  struct Curl_llist_node *e;
  302|       |
  303|   958k|  *pitem = NULL;
  304|   958k|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|   958k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  305|   958k|  if(tqueue->aborted) {
  ------------------
  |  Branch (305:6): [True: 0, False: 958k]
  ------------------
  306|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1077|      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|   958k|  e = Curl_llist_head(&tqueue->recvq);
  312|   958k|  if(e) {
  ------------------
  |  Branch (312:6): [True: 275, False: 957k]
  ------------------
  313|    275|    struct thrdq_item *qitem = Curl_node_take_elem(e);
  314|    275|    *pitem = qitem->item;
  315|    275|    qitem->item = NULL;
  316|    275|    thrdq_item_destroy(qitem);
  317|    275|    result = CURLE_OK;
  318|    275|  }
  319|   958k|out:
  320|   958k|  Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|   958k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  321|   958k|  return result;
  322|   958k|}
Curl_thrdq_clear:
  342|    201|{
  343|    201|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|    201|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  344|    201|  if(tqueue->aborted) {
  ------------------
  |  Branch (344:6): [True: 0, False: 201]
  ------------------
  345|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1077|      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|    201|  thrdq_llist_clean_matches(&tqueue->sendq, fn_match, match_data);
  349|    201|  thrdq_llist_clean_matches(&tqueue->recvq, fn_match, match_data);
  350|    201|out:
  351|    201|  Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|    201|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  352|    201|}
Curl_thrdq_trace:
  389|   971k|{
  390|   971k|  struct curl_trc_feat *feat = &Curl_trc_feat_threads;
  391|   971k|  if(Curl_trc_ft_is_verbose(data, feat)) {
  ------------------
  |  |  326|   971k|  (Curl_trc_is_verbose(data) &&          \
  |  |  ------------------
  |  |  |  |  319|  1.94M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 971k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 971k]
  |  |  |  |  ------------------
  |  |  |  |  320|  1.94M|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|   971k|   (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|   971k|}
thrdqueue.c:thrdq_item_list_dtor:
   93|    115|{
   94|    115|  (void)user_data;
   95|    115|  thrdq_item_destroy(elem);
   96|    115|}
thrdqueue.c:thrdq_tpool_take:
  100|    925|{
  101|    925|  struct curl_thrdq *tqueue = user_data;
  102|    925|  struct thrdq_item *qitem = NULL;
  103|    925|  struct Curl_llist_node *e;
  104|    925|  Curl_thrdq_ev_cb *fn_event = NULL;
  105|    925|  void *fn_user_data = NULL;
  106|       |
  107|    925|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|    925|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  108|    925|  *pdescription = NULL;
  109|    925|  *ptimeout_ms = 0;
  110|    925|  if(!tqueue->aborted) {
  ------------------
  |  Branch (110:6): [True: 924, False: 1]
  ------------------
  111|    924|    e = Curl_llist_head(&tqueue->sendq);
  112|    924|    if(e) {
  ------------------
  |  Branch (112:8): [True: 538, False: 386]
  ------------------
  113|    538|      struct curltime now = curlx_now();
  114|    538|      timediff_t timeout_ms;
  115|    538|      while(e) {
  ------------------
  |  Branch (115:13): [True: 538, False: 0]
  ------------------
  116|    538|        qitem = Curl_node_take_elem(e);
  117|    538|        timeout_ms = (!qitem->timeout_ms) ? 0 :
  ------------------
  |  Branch (117:22): [True: 107, False: 431]
  ------------------
  118|    538|          (qitem->timeout_ms - curlx_ptimediff_ms(&now, &qitem->start));
  119|    538|        if(timeout_ms < 0) {
  ------------------
  |  Branch (119:12): [True: 0, False: 538]
  ------------------
  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|    538|        else {
  129|    538|          *pdescription = qitem->description;
  130|    538|          *ptimeout_ms = timeout_ms;
  131|    538|          break;
  132|    538|        }
  133|    538|      }
  134|    538|    }
  135|    924|  }
  136|    925|  Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|    925|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  137|       |  /* avoiding deadlocks */
  138|    925|  if(fn_event)
  ------------------
  |  Branch (138:6): [True: 0, False: 925]
  ------------------
  139|      0|    fn_event(tqueue, CURL_THRDQ_EV_ITEM_DONE, fn_user_data);
  140|    925|  return qitem;
  141|    925|}
thrdqueue.c:thrdq_tpool_process:
  172|    538|{
  173|    538|  struct thrdq_item *qitem = item;
  174|    538|  qitem->fn_process(qitem->item);
  175|    538|}
thrdqueue.c:thrdq_tpool_return:
  144|    538|{
  145|    538|  struct curl_thrdq *tqueue = user_data;
  146|    538|  struct thrdq_item *qitem = item;
  147|    538|  Curl_thrdq_ev_cb *fn_event = NULL;
  148|    538|  void *fn_user_data = NULL;
  149|       |
  150|    538|  if(!tqueue) {
  ------------------
  |  Branch (150:6): [True: 158, False: 380]
  ------------------
  151|    158|    thrdq_item_destroy(item);
  152|    158|    return;
  153|    158|  }
  154|       |
  155|    380|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|    380|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  156|    380|  if(tqueue->aborted) {
  ------------------
  |  Branch (156:6): [True: 0, False: 380]
  ------------------
  157|      0|    thrdq_item_destroy(qitem);
  158|      0|  }
  159|    380|  else {
  160|    380|    DEBUGASSERT(!Curl_node_llist(&qitem->node));
  ------------------
  |  | 1077|    380|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (160:5): [True: 0, False: 380]
  |  Branch (160:5): [True: 380, False: 0]
  ------------------
  161|    380|    Curl_llist_append(&tqueue->recvq, qitem, &qitem->node);
  162|    380|    fn_event = tqueue->fn_event;
  163|    380|    fn_user_data = tqueue->fn_user_data;
  164|    380|  }
  165|    380|  Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|    380|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  166|       |  /* avoiding deadlocks */
  167|    380|  if(fn_event)
  ------------------
  |  Branch (167:6): [True: 380, False: 0]
  ------------------
  168|    380|    fn_event(tqueue, CURL_THRDQ_EV_ITEM_DONE, fn_user_data);
  169|    380|}
thrdqueue.c:thrdq_unlink:
  178|  13.0k|{
  179|  13.0k|  DEBUGASSERT(tqueue->aborted);
  ------------------
  |  | 1077|  13.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 0, False: 13.0k]
  |  Branch (179:3): [True: 13.0k, False: 0]
  ------------------
  180|  13.0k|  if(tqueue->tpool) {
  ------------------
  |  Branch (180:6): [True: 13.0k, False: 0]
  ------------------
  181|  13.0k|    if(locked)
  ------------------
  |  Branch (181:8): [True: 13.0k, False: 0]
  ------------------
  182|  13.0k|      Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|  13.0k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  183|  13.0k|    Curl_thrdpool_destroy(tqueue->tpool, join);
  184|  13.0k|    tqueue->tpool = NULL;
  185|  13.0k|    if(locked)
  ------------------
  |  Branch (185:8): [True: 13.0k, False: 0]
  ------------------
  186|  13.0k|      Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|  13.0k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  187|  13.0k|  }
  188|       |
  189|  13.0k|  Curl_llist_destroy(&tqueue->sendq, NULL);
  190|  13.0k|  Curl_llist_destroy(&tqueue->recvq, NULL);
  191|  13.0k|  curlx_free(tqueue->name);
  ------------------
  |  | 1488|  13.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  192|  13.0k|  Curl_cond_destroy(&tqueue->await);
  ------------------
  |  |   41|  13.0k|#  define Curl_cond_destroy(c)   pthread_cond_destroy(c)
  ------------------
  193|  13.0k|  if(locked)
  ------------------
  |  Branch (193:6): [True: 13.0k, False: 0]
  ------------------
  194|  13.0k|    Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|  13.0k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  195|  13.0k|  Curl_mutex_destroy(&tqueue->lock);
  ------------------
  |  |   38|  13.0k|#  define Curl_mutex_destroy(m)  pthread_mutex_destroy(m)
  ------------------
  196|  13.0k|  curlx_free(tqueue);
  ------------------
  |  | 1488|  13.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  197|  13.0k|}
thrdqueue.c:thrdq_item_create:
   68|    548|{
   69|    548|  struct thrdq_item *qitem;
   70|       |
   71|    548|  qitem = curlx_calloc(1, sizeof(*qitem));
  ------------------
  |  | 1485|    548|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   72|    548|  if(!qitem)
  ------------------
  |  Branch (72:6): [True: 0, False: 548]
  ------------------
   73|      0|    return NULL;
   74|    548|  qitem->item = item;
   75|    548|  qitem->description = description;
   76|    548|  qitem->fn_free = tqueue->fn_free;
   77|    548|  qitem->fn_process = tqueue->fn_process;
   78|    548|  if(timeout_ms) {
  ------------------
  |  Branch (78:6): [True: 441, False: 107]
  ------------------
   79|    441|    qitem->start = curlx_now();
   80|    441|    qitem->timeout_ms = timeout_ms;
   81|    441|  }
   82|    548|  return qitem;
   83|    548|}
thrdqueue.c:thrdq_item_destroy:
   86|    548|{
   87|    548|  if(qitem->item)
  ------------------
  |  Branch (87:6): [True: 273, False: 275]
  ------------------
   88|    273|    qitem->fn_free(qitem->item);
   89|    548|  curlx_free(qitem);
  ------------------
  |  | 1488|    548|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   90|    548|}
thrdqueue.c:thrdq_llist_clean_matches:
  327|    402|{
  328|    402|  struct Curl_llist_node *e, *n;
  329|    402|  struct thrdq_item *qitem;
  330|       |
  331|    516|  for(e = Curl_llist_head(llist); e; e = n) {
  ------------------
  |  Branch (331:35): [True: 114, False: 402]
  ------------------
  332|    114|    n = Curl_node_next(e);
  333|    114|    qitem = Curl_node_elem(e);
  334|    114|    if(fn_match(qitem->item, match_data))
  ------------------
  |  Branch (334:8): [True: 114, False: 0]
  ------------------
  335|    114|      Curl_node_remove(e);
  336|    114|  }
  337|    402|}

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

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

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

Curl_freeset:
  150|  28.3k|{
  151|       |  /* Free all dynamic strings stored in the data->set substructure. */
  152|  28.3k|  enum dupstring i;
  153|  28.3k|  enum dupblob j;
  154|       |
  155|  2.04M|  for(i = (enum dupstring)0; i < STRING_LAST; i++) {
  ------------------
  |  Branch (155:30): [True: 2.01M, False: 28.3k]
  ------------------
  156|  2.01M|    curlx_safefree(data->set.str[i]);
  ------------------
  |  | 1332|  2.01M|  do {                      \
  |  | 1333|  2.01M|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  2.01M|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  2.01M|    (ptr) = NULL;           \
  |  | 1335|  2.01M|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 2.01M]
  |  |  ------------------
  ------------------
  157|  2.01M|  }
  158|       |
  159|   255k|  for(j = (enum dupblob)0; j < BLOB_LAST; j++) {
  ------------------
  |  Branch (159:28): [True: 226k, False: 28.3k]
  ------------------
  160|   226k|    curlx_safefree(data->set.blobs[j]);
  ------------------
  |  | 1332|   226k|  do {                      \
  |  | 1333|   226k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|   226k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|   226k|    (ptr) = NULL;           \
  |  | 1335|   226k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 226k]
  |  |  ------------------
  ------------------
  161|   226k|  }
  162|       |
  163|  28.3k|  Curl_bufref_free(&data->state.referer);
  164|  28.3k|  Curl_bufref_free(&data->state.url);
  165|       |
  166|  28.3k|#if !defined(CURL_DISABLE_MIME) || !defined(CURL_DISABLE_FORM_API)
  167|  28.3k|  Curl_mime_cleanpart(data->set.mimepostp);
  168|  28.3k|  curlx_safefree(data->set.mimepostp);
  ------------------
  |  | 1332|  28.3k|  do {                      \
  |  | 1333|  28.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  28.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  28.3k|    (ptr) = NULL;           \
  |  | 1335|  28.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 28.3k]
  |  |  ------------------
  ------------------
  169|  28.3k|#endif
  170|       |
  171|  28.3k|#ifndef CURL_DISABLE_COOKIES
  172|  28.3k|  curl_slist_free_all(data->state.cookielist);
  173|       |  data->state.cookielist = NULL;
  174|  28.3k|#endif
  175|  28.3k|}
Curl_close:
  196|  28.3k|{
  197|  28.3k|  struct Curl_easy *data;
  198|       |
  199|  28.3k|  if(!datap || !*datap)
  ------------------
  |  Branch (199:6): [True: 0, False: 28.3k]
  |  Branch (199:16): [True: 9, False: 28.3k]
  ------------------
  200|      9|    return CURLE_OK;
  201|       |
  202|  28.3k|  data = *datap;
  203|  28.3k|  *datap = NULL;
  204|       |
  205|  28.3k|  if(!data->state.internal && data->multi) {
  ------------------
  |  Branch (205:6): [True: 14.6k, False: 13.6k]
  |  Branch (205:31): [True: 0, False: 14.6k]
  ------------------
  206|       |    /* This handle is still part of a multi handle, take care of this first
  207|       |       and detach this handle from there.
  208|       |       This detaches the connection. */
  209|      0|    curl_multi_remove_handle(data->multi, data);
  210|      0|  }
  211|  28.3k|  else {
  212|       |    /* Detach connection if any is left. This should not be normal, but can be
  213|       |       the case for example with CONNECT_ONLY + recv/send (test 556) */
  214|  28.3k|    Curl_detach_connection(data);
  215|  28.3k|    if(!data->state.internal && data->multi_easy) {
  ------------------
  |  Branch (215:8): [True: 14.6k, False: 13.6k]
  |  Branch (215:33): [True: 0, False: 14.6k]
  ------------------
  216|       |      /* when curl_easy_perform() is used, it creates its own multi handle to
  217|       |         use and this is the one */
  218|      0|      curl_multi_cleanup(data->multi_easy);
  219|      0|      data->multi_easy = NULL;
  220|      0|    }
  221|  28.3k|  }
  222|  28.3k|  DEBUGASSERT(!data->conn || data->state.internal);
  ------------------
  |  | 1077|  28.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (222:3): [True: 28.3k, False: 0]
  |  Branch (222:3): [True: 0, False: 0]
  |  Branch (222:3): [True: 28.3k, False: 0]
  |  Branch (222:3): [True: 0, False: 0]
  ------------------
  223|       |
  224|  28.3k|  Curl_expire_clear(data); /* shut off any timers left */
  225|       |
  226|  28.3k|  if(data->state.rangestringalloc)
  ------------------
  |  Branch (226:6): [True: 98, False: 28.2k]
  ------------------
  227|     98|    curlx_free(data->state.range);
  ------------------
  |  | 1488|     98|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  228|       |
  229|       |  /* release any resolve information this transfer kept */
  230|  28.3k|  Curl_resolv_destroy_all(data);
  231|       |
  232|  28.3k|  data->set.verbose = FALSE; /* no more calls to DEBUGFUNCTION */
  ------------------
  |  | 1054|  28.3k|#define FALSE false
  ------------------
  233|  28.3k|  data->magic = 0; /* force a clear AFTER the possibly enforced removal from
  234|       |                    * the multi handle and async dns shutdown. The multi
  235|       |                    * handle might check the magic and so might any
  236|       |                    * DEBUGFUNCTION invoked for tracing */
  237|       |
  238|       |  /* freed here in case DONE was not called */
  239|  28.3k|  Curl_req_free(&data->req, data);
  240|       |
  241|       |  /* Close down all open SSL info and sessions */
  242|  28.3k|  Curl_ssl_close_all(data);
  243|  28.3k|  Curl_peer_unlink(&data->state.origin);
  244|  28.3k|  Curl_peer_unlink(&data->state.initial_origin);
  245|  28.3k|  Curl_ssl_free_certinfo(data);
  246|       |
  247|  28.3k|  Curl_bufref_free(&data->state.referer);
  248|       |
  249|  28.3k|  up_free(data);
  250|  28.3k|  curlx_dyn_free(&data->state.headerb);
  251|  28.3k|  Curl_flush_cookies(data, TRUE);
  ------------------
  |  | 1051|  28.3k|#define TRUE true
  ------------------
  252|  28.3k|#ifndef CURL_DISABLE_ALTSVC
  253|  28.3k|  Curl_altsvc_save(data, data->asi, data->set.str[STRING_ALTSVC]);
  254|  28.3k|  Curl_altsvc_cleanup(&data->asi);
  255|  28.3k|#endif
  256|  28.3k|#ifndef CURL_DISABLE_HSTS
  257|  28.3k|  Curl_hsts_save(data, data->hsts, data->set.str[STRING_HSTS]);
  258|  28.3k|  if(!data->share || !data->share->hsts)
  ------------------
  |  Branch (258:6): [True: 28.3k, False: 0]
  |  Branch (258:22): [True: 0, False: 0]
  ------------------
  259|  28.3k|    Curl_hsts_cleanup(&data->hsts);
  260|  28.3k|  curl_slist_free_all(data->state.hstslist); /* clean up list */
  261|  28.3k|#endif
  262|  28.3k|#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_DIGEST_AUTH)
  263|  28.3k|  Curl_http_auth_cleanup_digest(data);
  264|  28.3k|#endif
  265|  28.3k|  curlx_safefree(data->state.most_recent_ftp_entrypath);
  ------------------
  |  | 1332|  28.3k|  do {                      \
  |  | 1333|  28.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  28.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  28.3k|    (ptr) = NULL;           \
  |  | 1335|  28.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 28.3k]
  |  |  ------------------
  ------------------
  266|  28.3k|  curlx_safefree(data->info.contenttype);
  ------------------
  |  | 1332|  28.3k|  do {                      \
  |  | 1333|  28.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  28.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  28.3k|    (ptr) = NULL;           \
  |  | 1335|  28.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 28.3k]
  |  |  ------------------
  ------------------
  267|  28.3k|  curlx_safefree(data->info.wouldredirect);
  ------------------
  |  | 1332|  28.3k|  do {                      \
  |  | 1333|  28.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  28.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  28.3k|    (ptr) = NULL;           \
  |  | 1335|  28.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 28.3k]
  |  |  ------------------
  ------------------
  268|       |
  269|       |  /* No longer a dirty share, if it exists */
  270|  28.3k|  if(Curl_share_easy_unlink(data))
  ------------------
  |  Branch (270:6): [True: 0, False: 28.3k]
  ------------------
  271|  28.3k|    DEBUGASSERT(0);
  ------------------
  |  | 1077|  28.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (271:5): [Folded, False: 0]
  |  Branch (271:5): [Folded, False: 0]
  ------------------
  272|       |
  273|  28.3k|  Curl_hash_destroy(&data->meta_hash);
  274|  28.3k|  Curl_creds_unlink(&data->state.creds);
  275|  28.3k|  curlx_safefree(data->state.aptr.uagent);
  ------------------
  |  | 1332|  28.3k|  do {                      \
  |  | 1333|  28.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  28.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  28.3k|    (ptr) = NULL;           \
  |  | 1335|  28.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 28.3k]
  |  |  ------------------
  ------------------
  276|  28.3k|  curlx_safefree(data->state.aptr.accept_encoding);
  ------------------
  |  | 1332|  28.3k|  do {                      \
  |  | 1333|  28.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  28.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  28.3k|    (ptr) = NULL;           \
  |  | 1335|  28.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 28.3k]
  |  |  ------------------
  ------------------
  277|  28.3k|  curlx_safefree(data->state.aptr.rangeline);
  ------------------
  |  | 1332|  28.3k|  do {                      \
  |  | 1333|  28.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  28.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  28.3k|    (ptr) = NULL;           \
  |  | 1335|  28.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 28.3k]
  |  |  ------------------
  ------------------
  278|  28.3k|  curlx_safefree(data->state.aptr.ref);
  ------------------
  |  | 1332|  28.3k|  do {                      \
  |  | 1333|  28.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  28.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  28.3k|    (ptr) = NULL;           \
  |  | 1335|  28.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 28.3k]
  |  |  ------------------
  ------------------
  279|  28.3k|  curlx_safefree(data->state.aptr.host);
  ------------------
  |  | 1332|  28.3k|  do {                      \
  |  | 1333|  28.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  28.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  28.3k|    (ptr) = NULL;           \
  |  | 1335|  28.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 28.3k]
  |  |  ------------------
  ------------------
  280|  28.3k|#ifndef CURL_DISABLE_COOKIES
  281|  28.3k|  curlx_safefree(data->req.cookiehost);
  ------------------
  |  | 1332|  28.3k|  do {                      \
  |  | 1333|  28.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  28.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  28.3k|    (ptr) = NULL;           \
  |  | 1335|  28.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 28.3k]
  |  |  ------------------
  ------------------
  282|  28.3k|#endif
  283|  28.3k|#ifndef CURL_DISABLE_RTSP
  284|  28.3k|  curlx_safefree(data->state.aptr.rtsp_transport);
  ------------------
  |  | 1332|  28.3k|  do {                      \
  |  | 1333|  28.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  28.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  28.3k|    (ptr) = NULL;           \
  |  | 1335|  28.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 28.3k]
  |  |  ------------------
  ------------------
  285|  28.3k|#endif
  286|       |
  287|  28.3k|#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_FORM_API)
  288|  28.3k|  Curl_mime_cleanpart(data->state.formp);
  289|  28.3k|  curlx_safefree(data->state.formp);
  ------------------
  |  | 1332|  28.3k|  do {                      \
  |  | 1333|  28.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  28.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  28.3k|    (ptr) = NULL;           \
  |  | 1335|  28.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 28.3k]
  |  |  ------------------
  ------------------
  290|  28.3k|#endif
  291|       |
  292|       |  /* destruct wildcard structures if it is needed */
  293|  28.3k|  Curl_wildcard_dtor(&data->wildcard);
  294|  28.3k|  Curl_freeset(data);
  295|  28.3k|  Curl_headers_cleanup(data);
  296|  28.3k|  Curl_netrc_cleanup(&data->state.netrc);
  297|  28.3k|#ifndef CURL_DISABLE_DIGEST_AUTH
  298|  28.3k|  curlx_free(data->state.envproxy);
  ------------------
  |  | 1488|  28.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  299|  28.3k|#endif
  300|  28.3k|  Curl_ssl_config_cleanup(&data->set.ssl.primary);
  301|  28.3k|#ifndef CURL_DISABLE_PROXY
  302|  28.3k|  Curl_ssl_config_cleanup(&data->set.proxy_ssl.primary);
  303|  28.3k|#endif
  304|  28.3k|  curlx_free(data);
  ------------------
  |  | 1488|  28.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  305|  28.3k|  return CURLE_OK;
  306|  28.3k|}
Curl_init_userdefined:
  313|  28.3k|{
  314|  28.3k|  struct UserDefined *set = &data->set;
  315|       |
  316|  28.3k|  set->out = stdout;  /* default output to stdout */
  317|  28.3k|  set->in_set = stdin;  /* default input from stdin */
  318|  28.3k|  set->err = stderr;  /* default stderr to stderr */
  319|       |
  320|  28.3k|#if defined(__clang__) && __clang_major__ >= 16
  321|  28.3k|#pragma clang diagnostic push
  322|  28.3k|#pragma clang diagnostic ignored "-Wcast-function-type-strict"
  323|  28.3k|#endif
  324|       |  /* use fwrite as default function to store output */
  325|  28.3k|  set->fwrite_func = (curl_write_callback)fwrite;
  326|       |
  327|       |  /* use fread as default function to read input */
  328|  28.3k|  set->fread_func_set = (curl_read_callback)fread;
  329|  28.3k|#if defined(__clang__) && __clang_major__ >= 16
  330|  28.3k|#pragma clang diagnostic pop
  331|  28.3k|#endif
  332|  28.3k|  set->is_fread_set = 0;
  333|       |
  334|  28.3k|  set->seek_client = ZERO_NULL;
  ------------------
  |  | 1160|  28.3k|#define ZERO_NULL 0
  ------------------
  335|       |
  336|  28.3k|  set->filesize = -1;        /* we do not know the size */
  337|  28.3k|  set->postfieldsize = -1;   /* unknown size */
  338|  28.3k|  set->maxredirs = 30;       /* sensible default */
  339|       |
  340|  28.3k|  set->method = HTTPREQ_GET; /* Default HTTP request */
  341|  28.3k|#ifndef CURL_DISABLE_RTSP
  342|  28.3k|  set->rtspreq = RTSPREQ_OPTIONS; /* Default RTSP request */
  343|  28.3k|#endif
  344|  28.3k|#ifndef CURL_DISABLE_FTP
  345|  28.3k|  set->ftp_use_epsv = TRUE;   /* FTP defaults to EPSV operations */
  ------------------
  |  | 1051|  28.3k|#define TRUE true
  ------------------
  346|  28.3k|  set->ftp_use_eprt = TRUE;   /* FTP defaults to EPRT operations */
  ------------------
  |  | 1051|  28.3k|#define TRUE true
  ------------------
  347|  28.3k|  set->ftp_use_pret = FALSE;  /* mainly useful for drftpd servers */
  ------------------
  |  | 1054|  28.3k|#define FALSE false
  ------------------
  348|  28.3k|  set->ftp_filemethod = FTPFILE_MULTICWD;
  349|  28.3k|  set->ftp_skip_ip = TRUE;    /* skip PASV IP by default */
  ------------------
  |  | 1051|  28.3k|#define TRUE true
  ------------------
  350|  28.3k|#endif
  351|  28.3k|  set->dns_cache_timeout_ms = 60000; /* Timeout every 60 seconds by default */
  352|       |
  353|       |  /* Timeout every 24 hours by default */
  354|  28.3k|  set->general_ssl.ca_cache_timeout = 24 * 60 * 60;
  355|       |
  356|  28.3k|  set->httpauth = CURLAUTH_BASIC;  /* defaults to basic */
  ------------------
  |  |  831|  28.3k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  357|       |
  358|  28.3k|  Curl_ssl_config_init(&data->set.ssl.primary);
  359|  28.3k|#ifndef CURL_DISABLE_PROXY
  360|  28.3k|  Curl_ssl_config_init(&data->set.proxy_ssl.primary);
  361|  28.3k|  set->proxyport = 0;
  362|  28.3k|  set->proxytype = CURLPROXY_HTTP; /* defaults to HTTP proxy */
  ------------------
  |  |  790|  28.3k|#define CURLPROXY_HTTP            0L /* added in 7.10, new in 7.19.4 default is
  ------------------
  363|  28.3k|  set->proxyauth = CURLAUTH_BASIC; /* defaults to basic */
  ------------------
  |  |  831|  28.3k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  364|       |  /* SOCKS5 proxy auth defaults to username/password + GSS-API */
  365|  28.3k|  set->socks5auth = CURLAUTH_BASIC | CURLAUTH_GSSAPI;
  ------------------
  |  |  831|  28.3k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
                set->socks5auth = CURLAUTH_BASIC | CURLAUTH_GSSAPI;
  ------------------
  |  |  837|  28.3k|#define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
  |  |  ------------------
  |  |  |  |  833|  28.3k|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  |  |  ------------------
  ------------------
  366|  28.3k|#endif
  367|       |
  368|  28.3k|#ifndef CURL_DISABLE_DOH
  369|  28.3k|  set->doh_verifyhost = TRUE;
  ------------------
  |  | 1051|  28.3k|#define TRUE true
  ------------------
  370|  28.3k|  set->doh_verifypeer = TRUE;
  ------------------
  |  | 1051|  28.3k|#define TRUE true
  ------------------
  371|  28.3k|#endif
  372|       |#ifdef USE_SSH
  373|       |  /* defaults to any auth type */
  374|       |  set->ssh_auth_types = CURLSSH_AUTH_DEFAULT;
  375|       |  set->new_directory_perms = 0755; /* Default permissions */
  376|       |#endif
  377|       |
  378|  28.3k|  set->new_file_perms = 0644;    /* Default permissions */
  379|  28.3k|  set->allowed_protocols = (curl_prot_t)CURLPROTO_64ALL;
  ------------------
  |  |   68|  28.3k|#define CURLPROTO_64ALL ((uint64_t)0xffffffffffffffff)
  ------------------
  380|  28.3k|  set->redir_protocols = CURLPROTO_REDIR;
  ------------------
  |  |   71|  28.3k|#define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1078|  28.3k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1079|  28.3k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1080|  28.3k|#define CURLPROTO_FTP     (1L << 2)
  |  |  ------------------
  |  |   72|  28.3k|                         CURLPROTO_FTPS)
  |  |  ------------------
  |  |  |  | 1081|  28.3k|#define CURLPROTO_FTPS    (1L << 3)
  |  |  ------------------
  ------------------
  381|       |
  382|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
  383|       |  /*
  384|       |   * disallow unprotected protection negotiation NEC reference implementation
  385|       |   * seem not to follow rfc1961 section 4.3/4.4
  386|       |   */
  387|       |  set->socks5_gssapi_nec = FALSE;
  388|       |#endif
  389|       |
  390|       |  /* set default minimum TLS version */
  391|  28.3k|#ifdef USE_SSL
  392|  28.3k|  Curl_setopt_SSLVERSION(data, CURLOPT_SSLVERSION, CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 2374|  28.3k|#define CURL_SSLVERSION_DEFAULT 0L
  ------------------
  393|  28.3k|#ifndef CURL_DISABLE_PROXY
  394|  28.3k|  Curl_setopt_SSLVERSION(data, CURLOPT_PROXY_SSLVERSION,
  395|  28.3k|                         CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 2374|  28.3k|#define CURL_SSLVERSION_DEFAULT 0L
  ------------------
  396|  28.3k|#endif
  397|  28.3k|#endif
  398|  28.3k|#ifndef CURL_DISABLE_FTP
  399|  28.3k|  set->wildcard_enabled = FALSE;
  ------------------
  |  | 1054|  28.3k|#define FALSE false
  ------------------
  400|  28.3k|  set->chunk_bgn = ZERO_NULL;
  ------------------
  |  | 1160|  28.3k|#define ZERO_NULL 0
  ------------------
  401|  28.3k|  set->chunk_end = ZERO_NULL;
  ------------------
  |  | 1160|  28.3k|#define ZERO_NULL 0
  ------------------
  402|  28.3k|  set->fnmatch = ZERO_NULL;
  ------------------
  |  | 1160|  28.3k|#define ZERO_NULL 0
  ------------------
  403|  28.3k|#endif
  404|  28.3k|  set->tcp_keepalive = FALSE;
  ------------------
  |  | 1054|  28.3k|#define FALSE false
  ------------------
  405|  28.3k|  set->tcp_keepintvl = 60;
  406|  28.3k|  set->tcp_keepidle = 60;
  407|  28.3k|  set->tcp_keepcnt = 9;
  408|  28.3k|  set->tcp_fastopen = FALSE;
  ------------------
  |  | 1054|  28.3k|#define FALSE false
  ------------------
  409|  28.3k|  set->tcp_nodelay = TRUE;
  ------------------
  |  | 1051|  28.3k|#define TRUE true
  ------------------
  410|  28.3k|  set->ssl_enable_alpn = TRUE;
  ------------------
  |  | 1051|  28.3k|#define TRUE true
  ------------------
  411|  28.3k|  set->expect_100_timeout = 1000L; /* Wait for a second by default. */
  412|  28.3k|  set->sep_headers = TRUE; /* separated header lists by default */
  ------------------
  |  | 1051|  28.3k|#define TRUE true
  ------------------
  413|  28.3k|  set->buffer_size = READBUFFER_SIZE;
  ------------------
  |  |  119|  28.3k|#define READBUFFER_SIZE CURL_MAX_WRITE_SIZE
  |  |  ------------------
  |  |  |  |  265|  28.3k|#define CURL_MAX_WRITE_SIZE 16384
  |  |  ------------------
  ------------------
  414|  28.3k|  set->upload_buffer_size = UPLOADBUFFER_DEFAULT;
  ------------------
  |  |  131|  28.3k|#define UPLOADBUFFER_DEFAULT 65536
  ------------------
  415|  28.3k|  set->upload_flags = CURLULFLAG_SEEN;
  ------------------
  |  | 1044|  28.3k|#define CURLULFLAG_SEEN     (1L << 4)
  ------------------
  416|  28.3k|  set->happy_eyeballs_timeout = CURL_HET_DEFAULT;
  ------------------
  |  |  969|  28.3k|#define CURL_HET_DEFAULT 200L
  ------------------
  417|  28.3k|  set->upkeep_interval_ms = CURL_UPKEEP_INTERVAL_DEFAULT;
  ------------------
  |  |  972|  28.3k|#define CURL_UPKEEP_INTERVAL_DEFAULT 60000L
  ------------------
  418|  28.3k|  set->maxconnects = DEFAULT_CONNCACHE_SIZE; /* for easy handles */
  ------------------
  |  |   38|  28.3k|#define DEFAULT_CONNCACHE_SIZE 5
  ------------------
  419|  28.3k|  set->conn_max_idle_ms = 118 * 1000;
  420|  28.3k|  set->conn_max_age_ms = 24 * 3600 * 1000;
  421|  28.3k|  set->http09_allowed = FALSE;
  ------------------
  |  | 1054|  28.3k|#define FALSE false
  ------------------
  422|  28.3k|  set->httpwant = CURL_HTTP_VERSION_NONE;
  ------------------
  |  | 2318|  28.3k|#define CURL_HTTP_VERSION_NONE  0L /* setting this means we do not care, and
  ------------------
  423|  28.3k|#if defined(USE_HTTP2) || defined(USE_HTTP3)
  424|  28.3k|  memset(&set->priority, 0, sizeof(set->priority));
  425|  28.3k|#endif
  426|  28.3k|  set->quick_exit = 0L;
  427|  28.3k|#ifndef CURL_DISABLE_WEBSOCKETS
  428|  28.3k|  set->ws_raw_mode = FALSE;
  ------------------
  |  | 1054|  28.3k|#define FALSE false
  ------------------
  429|       |  set->ws_no_auto_pong = FALSE;
  ------------------
  |  | 1054|  28.3k|#define FALSE false
  ------------------
  430|  28.3k|#endif
  431|  28.3k|}
Curl_open:
  453|  28.3k|{
  454|  28.3k|  struct Curl_easy *data;
  455|       |
  456|       |  /* simple start-up: alloc the struct, init it with zeroes and return */
  457|  28.3k|  data = curlx_calloc(1, sizeof(struct Curl_easy));
  ------------------
  |  | 1485|  28.3k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  458|  28.3k|  if(!data) {
  ------------------
  |  Branch (458:6): [True: 0, False: 28.3k]
  ------------------
  459|       |    /* this is a serious error */
  460|      0|    DEBUGF(curl_mfprintf(stderr, "Error: calloc of Curl_easy failed\n"));
  ------------------
  |  | 1063|      0|#define DEBUGF(x) x
  ------------------
  461|      0|    return CURLE_OUT_OF_MEMORY;
  462|      0|  }
  463|       |
  464|  28.3k|  data->magic = CURLEASY_MAGIC_NUMBER;
  ------------------
  |  |  135|  28.3k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  ------------------
  465|       |  /* most recent connection is not yet defined */
  466|  28.3k|  data->state.lastconnect_id = -1;
  467|  28.3k|  data->state.recent_conn_id = -1;
  468|       |  /* and not assigned an id yet */
  469|  28.3k|  data->id = -1;
  470|  28.3k|  data->mid = UINT32_MAX;
  471|  28.3k|  data->master_mid = UINT32_MAX;
  472|  28.3k|  data->progress.hide = TRUE;
  ------------------
  |  | 1051|  28.3k|#define TRUE true
  ------------------
  473|  28.3k|  data->state.current_speed = -1; /* init to negative == impossible */
  474|       |
  475|  28.3k|  Curl_hash_init(&data->meta_hash, 23,
  476|  28.3k|                 Curl_hash_str, curlx_str_key_compare, easy_meta_freeentry);
  477|  28.3k|  curlx_dyn_init(&data->state.headerb, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  272|  28.3k|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  478|  28.3k|  Curl_bufref_init(&data->state.url);
  479|  28.3k|  Curl_bufref_init(&data->state.referer);
  480|  28.3k|  Curl_req_init(&data->req);
  481|  28.3k|  Curl_initinfo(data);
  482|  28.3k|#ifndef CURL_DISABLE_HTTP
  483|  28.3k|  Curl_llist_init(&data->state.httphdrs, NULL);
  484|  28.3k|#endif
  485|  28.3k|  Curl_netrc_init(&data->state.netrc);
  486|  28.3k|  Curl_init_userdefined(data);
  487|       |
  488|  28.3k|  *curl = data;
  489|  28.3k|  return CURLE_OK;
  490|  28.3k|}
Curl_conn_free:
  493|  8.94k|{
  494|  8.94k|  size_t i;
  495|       |
  496|  8.94k|  DEBUGASSERT(conn);
  ------------------
  |  | 1077|  8.94k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (496:3): [True: 0, False: 8.94k]
  |  Branch (496:3): [True: 8.94k, False: 0]
  ------------------
  497|       |
  498|  8.94k|  if(conn->scheme && conn->scheme->run->disconnect &&
  ------------------
  |  Branch (498:6): [True: 8.27k, False: 669]
  |  Branch (498:22): [True: 7.85k, False: 425]
  ------------------
  499|  7.85k|     !conn->bits.shutdown_handler)
  ------------------
  |  Branch (499:6): [True: 166, False: 7.68k]
  ------------------
  500|    166|    conn->scheme->run->disconnect(data, conn, TRUE);
  ------------------
  |  | 1051|    166|#define TRUE true
  ------------------
  501|       |
  502|  26.8k|  for(i = 0; i < CURL_ARRAYSIZE(conn->cfilter); ++i) {
  ------------------
  |  | 1299|  26.8k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (502:14): [True: 17.8k, False: 8.94k]
  ------------------
  503|  17.8k|    Curl_conn_cf_discard_all(data, conn, (int)i);
  504|  17.8k|  }
  505|       |
  506|  8.94k|#ifndef CURL_DISABLE_PROXY
  507|  8.94k|  Curl_peer_unlink(&conn->http_proxy.peer);
  508|  8.94k|  Curl_peer_unlink(&conn->socks_proxy.peer);
  509|  8.94k|  Curl_creds_unlink(&conn->http_proxy.creds);
  510|  8.94k|  Curl_creds_unlink(&conn->socks_proxy.creds);
  511|  8.94k|#endif
  512|  8.94k|  Curl_creds_unlink(&conn->creds);
  513|  8.94k|  Curl_peer_unlink(&conn->creds_origin);
  514|  8.94k|  curlx_safefree(conn->options);
  ------------------
  |  | 1332|  8.94k|  do {                      \
  |  | 1333|  8.94k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  8.94k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  8.94k|    (ptr) = NULL;           \
  |  | 1335|  8.94k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 8.94k]
  |  |  ------------------
  ------------------
  515|  8.94k|  curlx_safefree(conn->localdev);
  ------------------
  |  | 1332|  8.94k|  do {                      \
  |  | 1333|  8.94k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  8.94k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  8.94k|    (ptr) = NULL;           \
  |  | 1335|  8.94k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 8.94k]
  |  |  ------------------
  ------------------
  516|  8.94k|  Curl_ssl_conn_config_cleanup(conn);
  517|       |
  518|  8.94k|  curlx_safefree(conn->destination);
  ------------------
  |  | 1332|  8.94k|  do {                      \
  |  | 1333|  8.94k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  8.94k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  8.94k|    (ptr) = NULL;           \
  |  | 1335|  8.94k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 8.94k]
  |  |  ------------------
  ------------------
  519|  8.94k|  Curl_hash_destroy(&conn->meta_hash);
  520|  8.94k|  Curl_peer_unlink(&conn->origin);
  521|  8.94k|  Curl_peer_unlink(&conn->via_peer);
  522|  8.94k|  Curl_peer_unlink(&conn->origin2);
  523|  8.94k|  Curl_peer_unlink(&conn->via_peer2);
  524|       |
  525|  8.94k|  curlx_free(conn); /* free all the connection oriented data */
  ------------------
  |  | 1488|  8.94k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  526|  8.94k|}
Curl_uc_to_curlcode:
 1353|    663|{
 1354|    663|  switch(uc) {
 1355|    662|  default:
  ------------------
  |  Branch (1355:3): [True: 662, False: 1]
  ------------------
 1356|    662|    return CURLE_URL_MALFORMAT;
 1357|      0|  case CURLUE_UNSUPPORTED_SCHEME:
  ------------------
  |  Branch (1357:3): [True: 0, False: 663]
  ------------------
 1358|      0|    return CURLE_UNSUPPORTED_PROTOCOL;
 1359|      0|  case CURLUE_OUT_OF_MEMORY:
  ------------------
  |  Branch (1359:3): [True: 0, False: 663]
  ------------------
 1360|      0|    return CURLE_OUT_OF_MEMORY;
 1361|      1|  case CURLUE_USER_NOT_ALLOWED:
  ------------------
  |  Branch (1361:3): [True: 1, False: 662]
  ------------------
 1362|      1|    return CURLE_LOGIN_DENIED;
 1363|    663|  }
 1364|    663|}
Curl_parse_login_details:
 1758|  2.00k|{
 1759|  2.00k|  char *ubuf = NULL;
 1760|  2.00k|  char *pbuf = NULL;
 1761|  2.00k|  const char *psep = NULL;
 1762|  2.00k|  const char *osep = NULL;
 1763|  2.00k|  size_t ulen;
 1764|  2.00k|  size_t plen;
 1765|  2.00k|  size_t olen;
 1766|       |
 1767|  2.00k|  DEBUGASSERT(userp);
  ------------------
  |  | 1077|  2.00k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1767:3): [True: 0, False: 2.00k]
  |  Branch (1767:3): [True: 2.00k, False: 0]
  ------------------
 1768|  2.00k|  DEBUGASSERT(passwdp);
  ------------------
  |  | 1077|  2.00k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1768:3): [True: 0, False: 2.00k]
  |  Branch (1768:3): [True: 2.00k, False: 0]
  ------------------
 1769|       |
 1770|       |  /* Attempt to find the password separator */
 1771|  2.00k|  psep = memchr(login, ':', len);
 1772|       |
 1773|       |  /* Attempt to find the options separator */
 1774|  2.00k|  if(optionsp)
  ------------------
  |  Branch (1774:6): [True: 3, False: 1.99k]
  ------------------
 1775|      3|    osep = memchr(login, ';', len);
 1776|       |
 1777|       |  /* Calculate the portion lengths */
 1778|  2.00k|  ulen = (psep ?
  ------------------
  |  Branch (1778:11): [True: 417, False: 1.58k]
  ------------------
 1779|    417|          (size_t)(osep && psep > osep ? osep - login : psep - login) :
  ------------------
  |  Branch (1779:20): [True: 2, False: 415]
  |  Branch (1779:28): [True: 1, False: 1]
  ------------------
 1780|  2.00k|          (osep ? (size_t)(osep - login) : len));
  ------------------
  |  Branch (1780:12): [True: 1, False: 1.58k]
  ------------------
 1781|  2.00k|  plen = (psep ?
  ------------------
  |  Branch (1781:11): [True: 417, False: 1.58k]
  ------------------
 1782|    417|          (osep && osep > psep ? (size_t)(osep - psep) :
  ------------------
  |  Branch (1782:12): [True: 2, False: 415]
  |  Branch (1782:20): [True: 1, False: 1]
  ------------------
 1783|  1.58k|           (size_t)(login + len - psep)) - 1 : 0);
 1784|  2.00k|  olen = (osep ?
  ------------------
  |  Branch (1784:11): [True: 3, False: 1.99k]
  ------------------
 1785|      3|          (psep && psep > osep ? (size_t)(psep - osep) :
  ------------------
  |  Branch (1785:12): [True: 2, False: 1]
  |  Branch (1785:20): [True: 1, False: 1]
  ------------------
 1786|  1.99k|           (size_t)(login + len - osep)) - 1 : 0);
 1787|       |
 1788|       |  /* Clone the user portion buffer, which can be zero length */
 1789|  2.00k|  ubuf = curlx_memdup0(login, ulen);
 1790|  2.00k|  if(!ubuf)
  ------------------
  |  Branch (1790:6): [True: 0, False: 2.00k]
  ------------------
 1791|      0|    goto error;
 1792|       |
 1793|       |  /* Clone the password portion buffer */
 1794|  2.00k|  if(psep) {
  ------------------
  |  Branch (1794:6): [True: 417, False: 1.58k]
  ------------------
 1795|    417|    pbuf = curlx_memdup0(&psep[1], plen);
 1796|    417|    if(!pbuf)
  ------------------
  |  Branch (1796:8): [True: 0, False: 417]
  ------------------
 1797|      0|      goto error;
 1798|    417|  }
 1799|       |
 1800|       |  /* Allocate the options portion buffer */
 1801|  2.00k|  if(optionsp) {
  ------------------
  |  Branch (1801:6): [True: 3, False: 1.99k]
  ------------------
 1802|      3|    char *obuf = NULL;
 1803|      3|    if(olen) {
  ------------------
  |  Branch (1803:8): [True: 1, False: 2]
  ------------------
 1804|      1|      obuf = curlx_memdup0(&osep[1], olen);
 1805|      1|      if(!obuf)
  ------------------
  |  Branch (1805:10): [True: 0, False: 1]
  ------------------
 1806|      0|        goto error;
 1807|      1|    }
 1808|      3|    *optionsp = obuf;
 1809|      3|  }
 1810|  2.00k|  *userp = ubuf;
 1811|  2.00k|  *passwdp = pbuf;
 1812|  2.00k|  return CURLE_OK;
 1813|      0|error:
 1814|      0|  curlx_free(ubuf);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1815|      0|  curlx_free(pbuf);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1816|      0|  return CURLE_OUT_OF_MEMORY;
 1817|  2.00k|}
Curl_connect:
 2536|  9.78k|{
 2537|  9.78k|  CURLcode result;
 2538|  9.78k|  struct connectdata *conn = NULL;
 2539|       |
 2540|  9.78k|  *pconnected = FALSE;
  ------------------
  |  | 1054|  9.78k|#define FALSE false
  ------------------
 2541|       |
 2542|       |  /* Set the request to virgin state based on transfer settings */
 2543|  9.78k|  Curl_req_hard_reset(&data->req, data);
 2544|       |  /* Determine the origin of the transfer and what credentials to use */
 2545|  9.78k|  result = url_set_data_origin_and_creds(data);
 2546|  9.78k|  if(result)
  ------------------
  |  Branch (2546:6): [True: 841, False: 8.94k]
  ------------------
 2547|    841|    goto out;
 2548|  8.94k|  if(!data->state.origin) { /* just make really sure */
  ------------------
  |  Branch (2548:6): [True: 0, False: 8.94k]
  ------------------
 2549|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2549:5): [Folded, False: 0]
  |  Branch (2549:5): [Folded, False: 0]
  ------------------
 2550|      0|    result = CURLE_FAILED_INIT;
 2551|      0|    goto out;
 2552|      0|  }
 2553|       |
 2554|       |  /* Get or create a connection for the transfer. */
 2555|  8.94k|  result = url_find_or_create_conn(data);
 2556|  8.94k|  conn = data->conn;
 2557|  8.94k|  if(result)
  ------------------
  |  Branch (2557:6): [True: 1.01k, False: 7.93k]
  ------------------
 2558|  1.01k|    goto out;
 2559|  7.93k|  if(!data->conn) { /* just make really sure */
  ------------------
  |  Branch (2559:6): [True: 0, False: 7.93k]
  ------------------
 2560|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2560:5): [Folded, False: 0]
  |  Branch (2560:5): [Folded, False: 0]
  ------------------
 2561|      0|    result = CURLE_FAILED_INIT;
 2562|      0|    goto out;
 2563|      0|  }
 2564|       |
 2565|  7.93k|  Curl_pgrsTime(data, TIMER_POSTQUEUE);
 2566|  7.93k|  if(conn->bits.reuse) {
  ------------------
  |  Branch (2566:6): [True: 0, False: 7.93k]
  ------------------
 2567|      0|    if(conn->attached_xfers > 1)
  ------------------
  |  Branch (2567:8): [True: 0, False: 0]
  ------------------
 2568|       |      /* multiplexed */
 2569|      0|      *pconnected = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 2570|      0|  }
 2571|  7.93k|  else if(conn->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  215|  7.93k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (2571:11): [True: 0, False: 7.93k]
  ------------------
 2572|      0|    Curl_pgrsTime(data, TIMER_NAMELOOKUP);
 2573|      0|    *pconnected = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 2574|      0|  }
 2575|  7.93k|  else {
 2576|  7.93k|    result = Curl_conn_setup(data, conn, FIRSTSOCKET, CURL_CF_SSL_DEFAULT);
  ------------------
  |  |  245|  7.93k|#define FIRSTSOCKET     0
  ------------------
                  result = Curl_conn_setup(data, conn, FIRSTSOCKET, CURL_CF_SSL_DEFAULT);
  ------------------
  |  |  359|  7.93k|#define CURL_CF_SSL_DEFAULT  (-1)
  ------------------
 2577|  7.93k|    if(!result)
  ------------------
  |  Branch (2577:8): [True: 7.93k, False: 0]
  ------------------
 2578|  7.93k|      result = Curl_headers_init(data);
 2579|  7.93k|    CURL_TRC_M(data, "Curl_conn_setup() -> %d", (int)result);
  ------------------
  |  |  148|  7.93k|  do {                                   \
  |  |  149|  7.93k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  7.93k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  7.93k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  15.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 7.93k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 7.93k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  15.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|  7.93k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  7.93k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  7.93k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 7.93k]
  |  |  ------------------
  ------------------
 2580|  7.93k|  }
 2581|       |
 2582|  9.78k|out:
 2583|  9.78k|  if(result == CURLE_NO_CONNECTION_AVAILABLE)
  ------------------
  |  Branch (2583:6): [True: 178, False: 9.60k]
  ------------------
 2584|  9.78k|    DEBUGASSERT(!conn);
  ------------------
  |  | 1077|  9.78k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2584:5): [True: 0, False: 178]
  |  Branch (2584:5): [True: 178, False: 0]
  ------------------
 2585|       |
 2586|  9.78k|  if(result && conn) {
  ------------------
  |  Branch (2586:6): [True: 1.85k, False: 7.93k]
  |  Branch (2586:16): [True: 0, False: 1.85k]
  ------------------
 2587|       |    /* We are not allowed to return failure with memory left allocated in the
 2588|       |       connectdata struct, free those here */
 2589|      0|    Curl_detach_connection(data);
 2590|      0|    Curl_conn_terminate(data, conn, TRUE);
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 2591|      0|  }
 2592|       |
 2593|  9.78k|  return result;
 2594|  9.78k|}
Curl_init_do:
 2607|  7.93k|{
 2608|  7.93k|  CURLcode result;
 2609|       |
 2610|  7.93k|  if(conn) {
  ------------------
  |  Branch (2610:6): [True: 7.93k, False: 0]
  ------------------
 2611|  7.93k|    conn->bits.do_more = FALSE; /* by default there is no curl_do_more() to
  ------------------
  |  | 1054|  7.93k|#define FALSE false
  ------------------
 2612|       |                                   use */
 2613|       |    /* if the protocol used does not support wildcards, switch it off */
 2614|  7.93k|    if(data->state.wildcardmatch &&
  ------------------
  |  Branch (2614:8): [True: 2, False: 7.93k]
  ------------------
 2615|      2|       !(conn->scheme->flags & PROTOPT_WILDCARD))
  ------------------
  |  |  231|      2|#define PROTOPT_WILDCARD (1 << 12)  /* protocol supports wildcard matching */
  ------------------
  |  Branch (2615:8): [True: 2, False: 0]
  ------------------
 2616|      2|      data->state.wildcardmatch = FALSE;
  ------------------
  |  | 1054|      2|#define FALSE false
  ------------------
 2617|  7.93k|  }
 2618|       |
 2619|  7.93k|  data->state.done = FALSE; /* *_done() is not called yet */
  ------------------
  |  | 1054|  7.93k|#define FALSE false
  ------------------
 2620|       |
 2621|  7.93k|  data->req.no_body = data->set.opt_no_body;
 2622|  7.93k|  if(data->req.no_body)
  ------------------
  |  Branch (2622:6): [True: 4, False: 7.92k]
  ------------------
 2623|       |    /* in HTTP lingo, no body means using the HEAD request... */
 2624|      4|    data->state.httpreq = HTTPREQ_HEAD;
 2625|       |
 2626|  7.93k|  result = Curl_req_start(&data->req, data);
 2627|  7.93k|  if(!result) {
  ------------------
  |  Branch (2627:6): [True: 7.93k, False: 0]
  ------------------
 2628|  7.93k|    Curl_pgrsReset(data);
 2629|  7.93k|  }
 2630|  7.93k|  return result;
 2631|  7.93k|}
Curl_data_priority_clear_state:
 2636|  9.76k|{
 2637|  9.76k|  memset(&data->state.priority, 0, sizeof(data->state.priority));
 2638|  9.76k|}
Curl_conn_meta_set:
 2644|  3.40k|{
 2645|  3.40k|  if(!Curl_hash_add2(&conn->meta_hash, CURL_UNCONST(key), strlen(key) + 1,
  ------------------
  |  |  862|  3.40k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  |  Branch (2645:6): [True: 0, False: 3.40k]
  ------------------
 2646|  3.40k|                     meta_data, meta_dtor)) {
 2647|      0|    meta_dtor(CURL_UNCONST(key), strlen(key) + 1, meta_data);
  ------------------
  |  |  862|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 2648|      0|    return CURLE_OUT_OF_MEMORY;
 2649|      0|  }
 2650|  3.40k|  return CURLE_OK;
 2651|  3.40k|}
Curl_conn_meta_remove:
 2654|  7.93k|{
 2655|  7.93k|  Curl_hash_delete(&conn->meta_hash, CURL_UNCONST(key), strlen(key) + 1);
  ------------------
  |  |  862|  7.93k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 2656|  7.93k|}
Curl_conn_meta_get:
 2659|  31.1k|{
 2660|  31.1k|  return Curl_hash_pick(&conn->meta_hash, CURL_UNCONST(key), strlen(key) + 1);
  ------------------
  |  |  862|  31.1k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 2661|  31.1k|}
Curl_1st_fatal:
 2664|  7.93k|{
 2665|  7.93k|  if(r1 && (r1 != CURLE_AGAIN))
  ------------------
  |  Branch (2665:6): [True: 4.08k, False: 3.84k]
  |  Branch (2665:12): [True: 4.08k, False: 0]
  ------------------
 2666|  4.08k|    return r1;
 2667|  3.84k|  if(r2 && (r2 != CURLE_AGAIN))
  ------------------
  |  Branch (2667:6): [True: 0, False: 3.84k]
  |  Branch (2667:12): [True: 0, False: 0]
  ------------------
 2668|      0|    return r2;
 2669|  3.84k|  return r1;
 2670|  3.84k|}
url.c:up_free:
  179|  38.1k|{
  180|  38.1k|  struct urlpieces *up = &data->state.up;
  181|  38.1k|  curlx_safefree(up->options);
  ------------------
  |  | 1332|  38.1k|  do {                      \
  |  | 1333|  38.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  38.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  38.1k|    (ptr) = NULL;           \
  |  | 1335|  38.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 38.1k]
  |  |  ------------------
  ------------------
  182|  38.1k|  curlx_safefree(up->path);
  ------------------
  |  | 1332|  38.1k|  do {                      \
  |  | 1333|  38.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  38.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  38.1k|    (ptr) = NULL;           \
  |  | 1335|  38.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 38.1k]
  |  |  ------------------
  ------------------
  183|  38.1k|  curlx_safefree(up->query);
  ------------------
  |  | 1332|  38.1k|  do {                      \
  |  | 1333|  38.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  38.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  38.1k|    (ptr) = NULL;           \
  |  | 1335|  38.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 38.1k]
  |  |  ------------------
  ------------------
  184|  38.1k|  curl_url_cleanup(data->state.uh);
  185|       |  data->state.uh = NULL;
  186|  38.1k|}
url.c:url_set_data_origin_and_creds:
 2218|  9.78k|{
 2219|  9.78k|  CURLcode result = CURLE_OK;
 2220|  9.78k|  CURLU *uh;
 2221|  9.78k|  CURLUcode uc;
 2222|  9.78k|  bool use_set_uh = (data->set.uh && !data->state.this_is_a_follow);
  ------------------
  |  Branch (2222:22): [True: 0, False: 9.78k]
  |  Branch (2222:38): [True: 0, False: 0]
  ------------------
 2223|  9.78k|  uint16_t port_override = data->state.allow_port ? data->set.use_port : 0;
  ------------------
  |  Branch (2223:28): [True: 9.78k, False: 0]
  ------------------
 2224|  9.78k|  uint32_t scope_id = 0;
 2225|       |
 2226|       |  /*************************************************************
 2227|       |   * Check input data
 2228|       |   *************************************************************/
 2229|  9.78k|  if(!Curl_bufref_ptr(&data->state.url)) {
  ------------------
  |  Branch (2229:6): [True: 0, False: 9.78k]
  ------------------
 2230|      0|    result = CURLE_URL_MALFORMAT;
 2231|      0|    goto out;
 2232|      0|  }
 2233|       |
 2234|  9.78k|  up_free(data); /* cleanup previous leftovers first */
 2235|       |
 2236|       |  /* parse the URL */
 2237|  9.78k|  if(use_set_uh)
  ------------------
  |  Branch (2237:6): [True: 0, False: 9.78k]
  ------------------
 2238|      0|    uh = data->state.uh = curl_url_dup(data->set.uh);
 2239|  9.78k|  else
 2240|  9.78k|    uh = data->state.uh = curl_url();
 2241|  9.78k|  if(!uh) {
  ------------------
  |  Branch (2241:6): [True: 0, False: 9.78k]
  ------------------
 2242|      0|    result = CURLE_OUT_OF_MEMORY;
 2243|      0|    goto out;
 2244|      0|  }
 2245|       |
 2246|       |  /* Calculate the *real* URL this transfer uses, applying defaults
 2247|       |   * where information is missing. */
 2248|  9.78k|  if(data->set.str[STRING_DEFAULT_PROTOCOL] &&
  ------------------
  |  Branch (2248:6): [True: 703, False: 9.08k]
  ------------------
 2249|    703|     !Curl_is_absolute_url(Curl_bufref_ptr(&data->state.url), NULL, 0, TRUE)) {
  ------------------
  |  | 1051|    703|#define TRUE true
  ------------------
  |  Branch (2249:6): [True: 610, False: 93]
  ------------------
 2250|    610|    char *url = curl_maprintf("%s://%s",
 2251|    610|                              data->set.str[STRING_DEFAULT_PROTOCOL],
 2252|    610|                              Curl_bufref_ptr(&data->state.url));
 2253|    610|    if(!url) {
  ------------------
  |  Branch (2253:8): [True: 0, False: 610]
  ------------------
 2254|      0|      result = CURLE_OUT_OF_MEMORY;
 2255|      0|      goto out;
 2256|      0|    }
 2257|    610|    Curl_bufref_set(&data->state.url, url, 0, curl_free);
 2258|    610|  }
 2259|       |
 2260|  9.78k|  if(!use_set_uh) {
  ------------------
  |  Branch (2260:6): [True: 9.78k, False: 0]
  ------------------
 2261|  9.78k|    char *newurl;
 2262|  9.78k|    uc = curl_url_set(uh, CURLUPART_URL, Curl_bufref_ptr(&data->state.url),
 2263|  9.78k|                      (unsigned int)(CURLU_GUESS_SCHEME |
  ------------------
  |  |   96|  9.78k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
 2264|  9.78k|                       CURLU_NON_SUPPORT_SCHEME |
  ------------------
  |  |   90|  9.78k|#define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
  ------------------
 2265|  9.78k|                       (data->set.disallow_username_in_url ?
  ------------------
  |  Branch (2265:25): [True: 1, False: 9.78k]
  ------------------
 2266|  9.78k|                        CURLU_DISALLOW_USER : 0) |
  ------------------
  |  |   92|      1|#define CURLU_DISALLOW_USER (1 << 5)      /* no user+password allowed */
  ------------------
 2267|  9.78k|                       (data->set.path_as_is ? CURLU_PATH_AS_IS : 0)));
  ------------------
  |  |   91|      2|#define CURLU_PATH_AS_IS (1 << 4)         /* leave dot sequences */
  ------------------
  |  Branch (2267:25): [True: 2, False: 9.78k]
  ------------------
 2268|  9.78k|    if(uc) {
  ------------------
  |  Branch (2268:8): [True: 661, False: 9.12k]
  ------------------
 2269|    661|      failf(data, "URL rejected: %s", curl_url_strerror(uc));
  ------------------
  |  |   62|    661|#define failf Curl_failf
  ------------------
 2270|    661|      result = Curl_uc_to_curlcode(uc);
 2271|    661|      goto out;
 2272|    661|    }
 2273|       |
 2274|       |    /* after it was parsed, get the generated normalized version */
 2275|  9.12k|    uc = curl_url_get(uh, CURLUPART_URL, &newurl, CURLU_GET_EMPTY);
  ------------------
  |  |  102|  9.12k|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
 2276|  9.12k|    if(uc) {
  ------------------
  |  Branch (2276:8): [True: 0, False: 9.12k]
  ------------------
 2277|      0|      result = Curl_uc_to_curlcode(uc);
 2278|      0|      goto out;
 2279|      0|    }
 2280|  9.12k|    Curl_bufref_set(&data->state.url, newurl, 0, curl_free);
 2281|  9.12k|  }
 2282|       |
 2283|  9.12k|#ifdef USE_IPV6
 2284|  9.12k|  scope_id = data->set.scope_id;
 2285|  9.12k|#endif
 2286|       |
 2287|       |  /* `uh` is now as the connection should use it, probably. */
 2288|  9.12k|  result = Curl_peer_from_url(uh, data, port_override, scope_id,
 2289|  9.12k|                              &data->state.origin);
 2290|  9.12k|  if(result)
  ------------------
  |  Branch (2290:6): [True: 164, False: 8.96k]
  ------------------
 2291|    164|    goto out;
 2292|       |  /* The origin might get changed when HSTS applies */
 2293|  8.96k|  result = hsts_upgrade(data, uh, port_override, scope_id);
 2294|  8.96k|  if(result)
  ------------------
  |  Branch (2294:6): [True: 0, False: 8.96k]
  ------------------
 2295|      0|    goto out;
 2296|       |
 2297|       |  /* When the transfers initial_origin is not set, this is the initial
 2298|       |   * request. Remember this starting point. */
 2299|  8.96k|  if(!data->state.initial_origin)
  ------------------
  |  Branch (2299:6): [True: 8.93k, False: 24]
  ------------------
 2300|  8.93k|    Curl_peer_link(&data->state.initial_origin, data->state.origin);
 2301|       |
 2302|  8.96k|  uc = curl_url_get(uh, CURLUPART_PATH, &data->state.up.path, CURLU_URLENCODE);
  ------------------
  |  |   94|  8.96k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
 2303|  8.96k|  if(uc) {
  ------------------
  |  Branch (2303:6): [True: 0, False: 8.96k]
  ------------------
 2304|      0|    result = Curl_uc_to_curlcode(uc);
 2305|      0|    goto out;
 2306|      0|  }
 2307|  8.96k|  uc = curl_url_get(uh, CURLUPART_QUERY, &data->state.up.query,
 2308|  8.96k|                    CURLU_GET_EMPTY);
  ------------------
  |  |  102|  8.96k|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
 2309|  8.96k|  if(uc && (uc != CURLUE_NO_QUERY)) {
  ------------------
  |  Branch (2309:6): [True: 6.76k, False: 2.19k]
  |  Branch (2309:12): [True: 0, False: 6.76k]
  ------------------
 2310|      0|    result = CURLE_OUT_OF_MEMORY;
 2311|      0|    goto out;
 2312|      0|  }
 2313|       |
 2314|  8.96k|  uc = curl_url_get(uh, CURLUPART_OPTIONS, &data->state.up.options,
 2315|  8.96k|                    CURLU_URLDECODE);
  ------------------
  |  |   93|  8.96k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
 2316|  8.96k|  if(uc && (uc != CURLUE_NO_OPTIONS)) {
  ------------------
  |  Branch (2316:6): [True: 8.96k, False: 1]
  |  Branch (2316:12): [True: 0, False: 8.96k]
  ------------------
 2317|      0|    result = Curl_uc_to_curlcode(uc);
 2318|      0|    goto out;
 2319|      0|  }
 2320|       |
 2321|  8.96k|  result = url_set_data_creds(data, uh);
 2322|  8.96k|  if(result)
  ------------------
  |  Branch (2322:6): [True: 16, False: 8.94k]
  ------------------
 2323|     16|    goto out;
 2324|       |
 2325|  9.78k|out:
 2326|  9.78k|  return result;
 2327|  8.96k|}
url.c:hsts_upgrade:
 1371|  8.96k|{
 1372|       |  /* HSTS upgrade */
 1373|  8.96k|  if(data->hsts && (data->state.origin->scheme == &Curl_scheme_http) &&
  ------------------
  |  Branch (1373:6): [True: 8.51k, False: 443]
  |  Branch (1373:20): [True: 593, False: 7.92k]
  ------------------
 1374|    593|     Curl_hsts_applies(data->hsts, data->state.origin)) {
  ------------------
  |  Branch (1374:6): [True: 0, False: 593]
  ------------------
 1375|      0|    char *url;
 1376|      0|    CURLUcode uc;
 1377|      0|    CURLcode result;
 1378|       |
 1379|      0|    uc = curl_url_set(uh, CURLUPART_SCHEME, "https", 0);
 1380|      0|    if(uc)
  ------------------
  |  Branch (1380:8): [True: 0, False: 0]
  ------------------
 1381|      0|      return Curl_uc_to_curlcode(uc);
 1382|      0|    Curl_bufref_free(&data->state.url);
 1383|       |    /* after update, get the updated version */
 1384|      0|    uc = curl_url_get(uh, CURLUPART_URL, &url, 0);
 1385|      0|    if(uc)
  ------------------
  |  Branch (1385:8): [True: 0, False: 0]
  ------------------
 1386|      0|      return Curl_uc_to_curlcode(uc);
 1387|      0|    Curl_bufref_set(&data->state.url, url, 0, curl_free);
 1388|       |
 1389|      0|    result = Curl_peer_from_url(uh, data, port_override, scope_id,
 1390|      0|                                &data->state.origin);
 1391|      0|    if(result)
  ------------------
  |  Branch (1391:8): [True: 0, False: 0]
  ------------------
 1392|      0|      return result;
 1393|      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]
  |  |  ------------------
  ------------------
 1394|      0|  }
 1395|  8.96k|  return CURLE_OK;
 1396|  8.96k|}
url.c:url_set_data_creds:
 1523|  8.96k|{
 1524|  8.96k|  struct Curl_creds *newcreds = NULL;
 1525|  8.96k|  CURLcode result = CURLE_OK;
 1526|       |
 1527|  8.96k|  if((data->set.str[STRING_USERNAME] ||
  ------------------
  |  Branch (1527:7): [True: 171, False: 8.79k]
  ------------------
 1528|  8.79k|      data->set.str[STRING_PASSWORD] ||
  ------------------
  |  Branch (1528:7): [True: 10, False: 8.78k]
  ------------------
 1529|  8.78k|      data->set.str[STRING_BEARER] ||
  ------------------
  |  Branch (1529:7): [True: 3, False: 8.77k]
  ------------------
 1530|  8.77k|      data->set.str[STRING_SASL_AUTHZID] ||
  ------------------
  |  Branch (1530:7): [True: 7, False: 8.77k]
  ------------------
 1531|  8.77k|      data->set.str[STRING_SERVICE_NAME]) &&
  ------------------
  |  Branch (1531:7): [True: 5, False: 8.76k]
  ------------------
 1532|    196|     Curl_auth_allowed_to_origin(data, data->state.origin)) {
  ------------------
  |  Branch (1532:6): [True: 196, False: 0]
  ------------------
 1533|    196|    result = Curl_creds_create(data->set.str[STRING_USERNAME],
 1534|    196|                               data->set.str[STRING_PASSWORD],
 1535|    196|                               data->set.str[STRING_BEARER],
 1536|    196|                               data->set.str[STRING_SASL_AUTHZID],
 1537|    196|                               data->set.str[STRING_SERVICE_NAME],
 1538|    196|                               CREDS_OPTION, &newcreds);
  ------------------
  |  |   31|    196|#define CREDS_OPTION 2 /* username/passwd set with a CURLOPT_ */
  ------------------
 1539|    196|    if(result)
  ------------------
  |  Branch (1539:8): [True: 0, False: 196]
  ------------------
 1540|      0|      goto out;
 1541|    196|    if(newcreds &&
  ------------------
  |  Branch (1541:8): [True: 193, False: 3]
  ------------------
 1542|    193|       !(data->state.origin->scheme->flags & PROTOPT_USERPWDCTRL) &&
  ------------------
  |  |  232|    193|#define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in
  ------------------
  |  Branch (1542:8): [True: 187, False: 6]
  ------------------
 1543|    187|       (str_has_ctrl(Curl_creds_user(newcreds)) ||
  ------------------
  |  |   80|    187|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (80:43): [True: 187, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1543:9): [True: 8, False: 179]
  ------------------
 1544|    179|        str_has_ctrl(Curl_creds_passwd(newcreds)))) {
  ------------------
  |  |   81|    179|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (81:43): [True: 179, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1544:9): [True: 5, False: 174]
  ------------------
 1545|       |      /* if the protocol cannot handle control codes in credentials, make
 1546|       |         sure there are none */
 1547|     13|      failf(data, "control code detected in credentials");
  ------------------
  |  |   62|     13|#define failf Curl_failf
  ------------------
 1548|     13|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1549|     13|      goto out;
 1550|     13|    }
 1551|    196|  }
 1552|       |
 1553|       |  /* Extract credentials from the URL only if there are none OR
 1554|       |   * if no CURLOPT_USER was set. */
 1555|  8.94k|  if(!newcreds || !Curl_creds_has_user(newcreds)) {
  ------------------
  |  |   74|    180|#define Curl_creds_has_user(c)           ((c) && (c)->user[0])
  |  |  ------------------
  |  |  |  Branch (74:43): [True: 180, False: 0]
  |  |  |  Branch (74:50): [True: 154, False: 26]
  |  |  ------------------
  ------------------
  |  Branch (1555:6): [True: 8.76k, False: 180]
  ------------------
 1556|  8.79k|    char *user = NULL;
 1557|  8.79k|    char *passwd = NULL;
 1558|  8.79k|    char *udecoded = NULL;
 1559|  8.79k|    char *pdecoded = NULL;
 1560|  8.79k|    CURLUcode uc;
 1561|       |
 1562|  8.79k|    uc = curl_url_get(uh, CURLUPART_USER, &user, 0);
 1563|  8.79k|    if(uc && (uc != CURLUE_NO_USER))
  ------------------
  |  Branch (1563:8): [True: 8.67k, False: 117]
  |  Branch (1563:14): [True: 0, False: 8.67k]
  ------------------
 1564|      0|      result = Curl_uc_to_curlcode(uc);
 1565|  8.79k|    if(!result) {
  ------------------
  |  Branch (1565:8): [True: 8.79k, False: 0]
  ------------------
 1566|  8.79k|      uc = curl_url_get(uh, CURLUPART_PASSWORD, &passwd, 0);
 1567|  8.79k|      if(uc && (uc != CURLUE_NO_PASSWORD))
  ------------------
  |  Branch (1567:10): [True: 8.75k, False: 38]
  |  Branch (1567:16): [True: 0, False: 8.75k]
  ------------------
 1568|      0|        result = Curl_uc_to_curlcode(uc);
 1569|  8.79k|    }
 1570|  8.79k|    if(!result && user) {
  ------------------
  |  Branch (1570:8): [True: 8.79k, False: 0]
  |  Branch (1570:19): [True: 117, False: 8.67k]
  ------------------
 1571|    117|      result = Curl_urldecode(user, 0, &udecoded, NULL,
 1572|    117|                              (data->state.origin->scheme->flags &
  ------------------
  |  Branch (1572:31): [True: 83, False: 34]
  ------------------
 1573|    117|                               PROTOPT_USERPWDCTRL) ?
  ------------------
  |  |  232|    117|#define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in
  ------------------
 1574|     83|                              REJECT_ZERO : REJECT_CTRL);
 1575|    117|    }
 1576|  8.79k|    if(!result && passwd) {
  ------------------
  |  Branch (1576:8): [True: 8.79k, False: 3]
  |  Branch (1576:19): [True: 35, False: 8.75k]
  ------------------
 1577|     35|      result = Curl_urldecode(passwd, 0, &pdecoded, NULL,
 1578|     35|                              (data->state.origin->scheme->flags &
  ------------------
  |  Branch (1578:31): [True: 28, False: 7]
  ------------------
 1579|     35|                               PROTOPT_USERPWDCTRL) ?
  ------------------
  |  |  232|     35|#define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in
  ------------------
 1580|     28|                              REJECT_ZERO : REJECT_CTRL);
 1581|     35|    }
 1582|  8.79k|    if(!result)
  ------------------
  |  Branch (1582:8): [True: 8.79k, False: 3]
  ------------------
 1583|  8.79k|      result = Curl_creds_merge(udecoded, pdecoded, newcreds,
 1584|  8.79k|                                CREDS_URL, &newcreds);
  ------------------
  |  |   30|  8.79k|#define CREDS_URL    1 /* username/passwd from URL */
  ------------------
 1585|       |
 1586|  8.79k|    curlx_free(udecoded);
  ------------------
  |  | 1488|  8.79k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1587|  8.79k|    curlx_free(pdecoded);
  ------------------
  |  | 1488|  8.79k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1588|  8.79k|    curlx_free(passwd);
  ------------------
  |  | 1488|  8.79k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1589|  8.79k|    curlx_free(user);
  ------------------
  |  | 1488|  8.79k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1590|  8.79k|    if(result) {
  ------------------
  |  Branch (1590:8): [True: 3, False: 8.79k]
  ------------------
 1591|      3|      failf(data, "error extracting credentials from URL");
  ------------------
  |  |   62|      3|#define failf Curl_failf
  ------------------
 1592|      3|      goto out;
 1593|      3|    }
 1594|  8.79k|  }
 1595|       |
 1596|  8.94k|#ifndef CURL_DISABLE_NETRC
 1597|       |  /* Check for overridden login details and set them accordingly so that
 1598|       |     they are known when protocol->setup_connection is called! */
 1599|  8.94k|  result = url_set_data_creds_netrc(data, &newcreds);
 1600|  8.94k|#endif /* CURL_DISABLE_NETRC */
 1601|       |
 1602|  8.96k|out:
 1603|  8.96k|  if(!result && !Curl_creds_equal(data->state.creds, newcreds)) {
  ------------------
  |  Branch (1603:6): [True: 8.94k, False: 16]
  |  Branch (1603:17): [True: 287, False: 8.65k]
  ------------------
 1604|       |    /* Do we have more things to trigger on credentials change? */
 1605|    287|    Curl_creds_link(&data->state.creds, newcreds);
 1606|    287|  }
 1607|  8.96k|  Curl_creds_unlink(&newcreds);
 1608|  8.96k|  return result;
 1609|  8.94k|}
url.c:str_has_ctrl:
 1402|    366|{
 1403|    366|  if(input) {
  ------------------
  |  Branch (1403:6): [True: 366, False: 0]
  ------------------
 1404|    366|    const unsigned char *str = (const unsigned char *)input;
 1405|   856k|    while(*str) {
  ------------------
  |  Branch (1405:11): [True: 856k, False: 353]
  ------------------
 1406|   856k|      if(*str < 0x20)
  ------------------
  |  Branch (1406:10): [True: 13, False: 856k]
  ------------------
 1407|     13|        return TRUE;
  ------------------
  |  | 1051|     13|#define TRUE true
  ------------------
 1408|   856k|      str++;
 1409|   856k|    }
 1410|    366|  }
 1411|    353|  return FALSE;
  ------------------
  |  | 1054|    353|#define FALSE false
  ------------------
 1412|    366|}
url.c:url_set_data_creds_netrc:
 1421|  8.94k|{
 1422|  8.94k|  struct Curl_creds *ncreds_out = NULL;
 1423|  8.94k|  CURLcode result = CURLE_OK;
 1424|       |
 1425|  8.94k|  if(data->set.use_netrc) { /* not CURL_NETRC_IGNORED */
  ------------------
  |  Branch (1425:6): [True: 7, False: 8.93k]
  ------------------
 1426|      7|    struct Curl_creds *ncreds_in = NULL;
 1427|      7|    bool scan_netrc = TRUE;
  ------------------
  |  | 1051|      7|#define TRUE true
  ------------------
 1428|      7|    NETRCcode ret;
 1429|      7|    CURLUcode uc;
 1430|       |
 1431|      7|    if(*pcreds) {
  ------------------
  |  Branch (1431:8): [True: 5, False: 2]
  ------------------
 1432|      5|      switch((*pcreds)->source) {
 1433|      1|      case CREDS_OPTION:
  ------------------
  |  |   31|      1|#define CREDS_OPTION 2 /* username/passwd set with a CURLOPT_ */
  ------------------
  |  Branch (1433:7): [True: 1, False: 4]
  ------------------
 1434|       |        /* we never override credentials set via CURLOPT_*, leave. */
 1435|      1|        scan_netrc = FALSE;
  ------------------
  |  | 1054|      1|#define FALSE false
  ------------------
 1436|      1|        break;
 1437|      4|      case CREDS_URL: /* only apply when netrc is not required */
  ------------------
  |  |   30|      4|#define CREDS_URL    1 /* username/passwd from URL */
  ------------------
  |  Branch (1437:7): [True: 4, False: 1]
  ------------------
 1438|      4|        if(data->set.use_netrc == CURL_NETRC_REQUIRED) {
  ------------------
  |  | 2365|      4|#define CURL_NETRC_REQUIRED 2L /* A user:password in the URL is ignored.
  ------------------
  |  Branch (1438:12): [True: 1, False: 3]
  ------------------
 1439|       |          /* We ignore password from URL */
 1440|      1|          ncreds_in = *pcreds;
 1441|      1|        }
 1442|      3|        else if(!Curl_creds_has_user(*pcreds) ||
  ------------------
  |  |   74|      6|#define Curl_creds_has_user(c)           ((c) && (c)->user[0])
  |  |  ------------------
  |  |  |  Branch (74:43): [True: 3, False: 0]
  |  |  |  Branch (74:50): [True: 2, False: 1]
  |  |  ------------------
  ------------------
 1443|      2|                !Curl_creds_has_passwd(*pcreds)) {
  ------------------
  |  |   75|      2|#define Curl_creds_has_passwd(c)         ((c) && (c)->passwd[0])
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 2, False: 0]
  |  |  |  Branch (75:50): [True: 1, False: 1]
  |  |  ------------------
  ------------------
 1444|       |          /* We use netrc to complete what is missing */
 1445|      2|          ncreds_in = *pcreds;
 1446|      2|        }
 1447|      1|        else
 1448|      1|          scan_netrc = FALSE;
  ------------------
  |  | 1054|      1|#define FALSE false
  ------------------
 1449|      4|        break;
 1450|      0|      default: /* ignore credentials from other sources */
  ------------------
  |  Branch (1450:7): [True: 0, False: 5]
  ------------------
 1451|      0|        break;
 1452|      5|      }
 1453|      5|    }
 1454|       |
 1455|      7|    if(!scan_netrc)
  ------------------
  |  Branch (1455:8): [True: 2, False: 5]
  ------------------
 1456|      2|      goto out;
 1457|       |
 1458|      5|    ret = Curl_netrc_scan(data, &data->state.netrc,
 1459|      5|                          data->state.origin->hostname,
 1460|      5|                          Curl_creds_user(ncreds_in),
  ------------------
  |  |   80|      5|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (80:43): [True: 3, False: 2]
  |  |  ------------------
  ------------------
 1461|      5|                          data->set.str[STRING_NETRC_FILE],
 1462|      5|                          &ncreds_out);
 1463|      5|    DEBUGASSERT(!ret || !ncreds_out);
  ------------------
  |  | 1077|      5|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1463:5): [True: 5, False: 0]
  |  Branch (1463:5): [True: 0, False: 0]
  |  Branch (1463:5): [True: 0, False: 5]
  |  Branch (1463:5): [True: 5, False: 0]
  ------------------
 1464|      5|    if(ret == NETRC_OUT_OF_MEMORY) {
  ------------------
  |  Branch (1464:8): [True: 0, False: 5]
  ------------------
 1465|      0|      result = CURLE_OUT_OF_MEMORY;
 1466|      0|      goto out;
 1467|      0|    }
 1468|      5|    else if(ret && ((ret == NETRC_NO_MATCH) ||
  ------------------
  |  Branch (1468:13): [True: 5, False: 0]
  |  Branch (1468:21): [True: 5, False: 0]
  ------------------
 1469|      5|                    (data->set.use_netrc == CURL_NETRC_OPTIONAL))) {
  ------------------
  |  | 2363|      0|#define CURL_NETRC_OPTIONAL 1L /* A user:password in the URL is preferred
  ------------------
  |  Branch (1469:21): [True: 0, False: 0]
  ------------------
 1470|      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]
  |  |  ------------------
  ------------------
 1471|      5|            data->state.origin->hostname,
 1472|      5|            (data->set.str[STRING_NETRC_FILE] ?
 1473|      5|             data->set.str[STRING_NETRC_FILE] : ".netrc"));
 1474|      5|    }
 1475|      0|    else if(ret) {
  ------------------
  |  Branch (1475:13): [True: 0, False: 0]
  ------------------
 1476|      0|      const char *m = Curl_netrc_strerror(ret);
 1477|      0|      failf(data, ".netrc error: %s", m);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1478|      0|      result = CURLE_READ_ERROR;
 1479|      0|      goto out;
 1480|      0|    }
 1481|      0|    else if(ncreds_out) {
  ------------------
  |  Branch (1481:13): [True: 0, False: 0]
  ------------------
 1482|      0|      if(!(data->state.origin->scheme->flags & PROTOPT_USERPWDCTRL)) {
  ------------------
  |  |  232|      0|#define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in
  ------------------
  |  Branch (1482:10): [True: 0, False: 0]
  ------------------
 1483|       |        /* if the protocol cannot handle control codes in credentials, make
 1484|       |           sure there are none */
 1485|      0|        if(str_has_ctrl(ncreds_out->user) ||
  ------------------
  |  Branch (1485:12): [True: 0, False: 0]
  ------------------
 1486|      0|           str_has_ctrl(ncreds_out->passwd)) {
  ------------------
  |  Branch (1486:12): [True: 0, False: 0]
  ------------------
 1487|      0|          failf(data, "control code detected in .netrc credentials");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1488|      0|          result = CURLE_READ_ERROR;
 1489|      0|          goto out;
 1490|      0|        }
 1491|      0|      }
 1492|      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]
  |  |  ------------------
  ------------------
 1493|      0|                 data->state.origin->hostname, ncreds_out->user);
 1494|      0|      result = Curl_creds_merge(ncreds_out->user, ncreds_out->passwd,
 1495|      0|                                *pcreds, CREDS_NETRC, pcreds);
  ------------------
  |  |   32|      0|#define CREDS_NETRC  3 /* username/passwd found in netrc */
  ------------------
 1496|      0|      if(result)
  ------------------
  |  Branch (1496:10): [True: 0, False: 0]
  ------------------
 1497|      0|        goto out;
 1498|       |      /* for updated strings, we update them in the URL */
 1499|      0|      uc = curl_url_set(data->state.uh, CURLUPART_USER,
 1500|      0|                        Curl_creds_user(*pcreds), CURLU_URLENCODE);
  ------------------
  |  |   80|      0|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (80:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                                      Curl_creds_user(*pcreds), CURLU_URLENCODE);
  ------------------
  |  |   94|      0|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
 1501|      0|      if(!uc)
  ------------------
  |  Branch (1501:10): [True: 0, False: 0]
  ------------------
 1502|      0|        uc = curl_url_set(data->state.uh, CURLUPART_PASSWORD,
 1503|      0|                          Curl_creds_passwd(*pcreds),
  ------------------
  |  |   81|      0|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (81:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1504|      0|                          CURLU_URLENCODE);
  ------------------
  |  |   94|      0|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
 1505|      0|      if(uc)
  ------------------
  |  Branch (1505:10): [True: 0, False: 0]
  ------------------
 1506|      0|        result = Curl_uc_to_curlcode(uc);
 1507|      0|    }
 1508|      0|    else
 1509|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1509:7): [Folded, False: 0]
  |  Branch (1509:7): [Folded, False: 0]
  ------------------
 1510|      5|  }
 1511|       |
 1512|  8.94k|#ifdef CURLVERBOSE
 1513|  8.94k|  Curl_creds_trace(data, data->state.creds, "transfer credentials");
 1514|  8.94k|#endif
 1515|       |
 1516|  8.94k|out:
 1517|  8.94k|  Curl_creds_unlink(&ncreds_out);
 1518|  8.94k|  return result;
 1519|  8.94k|}
url.c:url_find_or_create_conn:
 2338|  8.94k|{
 2339|  8.94k|  struct connectdata *needle = NULL;
 2340|  8.94k|  bool waitpipe = FALSE;
  ------------------
  |  | 1054|  8.94k|#define FALSE false
  ------------------
 2341|  8.94k|  CURLcode result;
 2342|       |
 2343|       |  /* create the template connection for transfer data. Use this needle to
 2344|       |   * find an existing connection or, if none exists, convert needle
 2345|       |   * to a full connection and attach it to data. */
 2346|  8.94k|  result = url_create_needle(data, &needle);
 2347|  8.94k|  if(result)
  ------------------
  |  Branch (2347:6): [True: 835, False: 8.11k]
  ------------------
 2348|    835|    goto out;
 2349|  8.11k|  DEBUGASSERT(needle);
  ------------------
  |  | 1077|  8.11k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2349:3): [True: 0, False: 8.11k]
  |  Branch (2349:3): [True: 8.11k, False: 0]
  ------------------
 2350|       |
 2351|       |  /***********************************************************************
 2352|       |   * file: is a special case in that it does not need a network connection
 2353|       |   ***********************************************************************/
 2354|  8.11k|#ifndef CURL_DISABLE_FILE
 2355|  8.11k|  if(needle->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  215|  8.11k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (2355:6): [True: 0, False: 8.11k]
  ------------------
 2356|      0|    bool done;
 2357|       |    /* this is supposed to be the connect function so we better at least check
 2358|       |       that the file is present here! */
 2359|      0|    DEBUGASSERT(needle->scheme->run->connect_it);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2359:5): [True: 0, False: 0]
  |  Branch (2359:5): [True: 0, False: 0]
  ------------------
 2360|      0|    data->info.conn_scheme = needle->scheme->name;
 2361|       |    /* conn_protocol can only provide "old" protocols */
 2362|      0|    data->info.conn_protocol = (needle->scheme->protocol) & CURLPROTO_MASK;
  ------------------
  |  |   79|      0|#define CURLPROTO_MASK   0x3fffffff
  ------------------
 2363|      0|    result = needle->scheme->run->connect_it(data, &done);
 2364|      0|    if(result)
  ------------------
  |  Branch (2364:8): [True: 0, False: 0]
  ------------------
 2365|      0|      goto out;
 2366|       |
 2367|       |    /* Setup a "faked" transfer that will do nothing */
 2368|      0|    Curl_attach_connection(data, needle);
 2369|      0|    needle = NULL;
 2370|      0|    result = Curl_cpool_add(data, data->conn);
 2371|      0|    if(!result) {
  ------------------
  |  Branch (2371:8): [True: 0, False: 0]
  ------------------
 2372|       |      /* Setup whatever necessary for a resumed transfer */
 2373|      0|      result = setup_range(data);
 2374|      0|      if(!result) {
  ------------------
  |  Branch (2374:10): [True: 0, False: 0]
  ------------------
 2375|      0|        Curl_xfer_setup_nop(data);
 2376|      0|        result = Curl_init_do(data, data->conn);
 2377|      0|      }
 2378|      0|    }
 2379|       |
 2380|      0|    if(result) {
  ------------------
  |  Branch (2380:8): [True: 0, False: 0]
  ------------------
 2381|      0|      DEBUGASSERT(data->conn->scheme->run->done);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2381:7): [True: 0, False: 0]
  |  Branch (2381:7): [True: 0, False: 0]
  ------------------
 2382|       |      /* we ignore the return code for the protocol-specific DONE */
 2383|      0|      (void)data->conn->scheme->run->done(data, result, FALSE);
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 2384|      0|    }
 2385|      0|    goto out;
 2386|      0|  }
 2387|  8.11k|#endif
 2388|       |
 2389|       |  /* Complete the easy's SSL configuration for connection cache matching */
 2390|  8.11k|  result = Curl_ssl_easy_config_complete(data, needle->origin);
 2391|  8.11k|  if(result)
  ------------------
  |  Branch (2391:6): [True: 0, False: 8.11k]
  ------------------
 2392|      0|    goto out;
 2393|       |
 2394|       |  /* Get rid of any dead connections so limit are easier kept. */
 2395|  8.11k|  Curl_cpool_prune_dead(data);
 2396|       |
 2397|       |  /*************************************************************
 2398|       |   * Reuse of existing connection is not allowed when
 2399|       |   * - connect_only is set or
 2400|       |   * - reuse_fresh is set and this is not a follow-up request
 2401|       |   *   (like with HTTP followlocation)
 2402|       |   *************************************************************/
 2403|  8.11k|  if((!data->set.reuse_fresh || data->state.followlocation) &&
  ------------------
  |  Branch (2403:7): [True: 8.10k, False: 3]
  |  Branch (2403:33): [True: 0, False: 3]
  ------------------
 2404|  8.10k|     !data->set.connect_only) {
  ------------------
  |  Branch (2404:6): [True: 8.09k, False: 8]
  ------------------
 2405|       |    /* Ok, try to find and attach an existing one */
 2406|  8.09k|    url_attach_existing(data, needle, &waitpipe);
 2407|  8.09k|  }
 2408|       |
 2409|  8.11k|  if(data->conn) {
  ------------------
  |  Branch (2409:6): [True: 0, False: 8.11k]
  ------------------
 2410|       |    /* We attached an existing connection for this transfer. Copy
 2411|       |     * over transfer specific properties over from needle. */
 2412|      0|    struct connectdata *conn = data->conn;
 2413|      0|    VERBOSE(bool tls_upgraded = (!(needle->given->flags & PROTOPT_SSL) &&
  ------------------
  |  | 1623|      0|#define VERBOSE(x) x
  |  |  ------------------
  |  |  |  Branch (1623:20): [True: 0, False: 0]
  |  |  |  Branch (1623:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2414|      0|                                 Curl_conn_is_ssl(conn, FIRSTSOCKET)));
 2415|       |
 2416|      0|    conn->bits.reuse = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 2417|      0|    url_conn_reuse_adjust(data, needle);
 2418|       |
 2419|      0|#ifndef CURL_DISABLE_PROXY
 2420|      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]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2421|      0|          conn->given->name,
 2422|      0|          tls_upgraded ? " (upgraded to SSL)" : "",
 2423|      0|          (conn->socks_proxy.peer || conn->http_proxy.peer) ? "proxy" : "host",
 2424|      0|          conn->socks_proxy.peer ? conn->socks_proxy.peer->user_hostname :
 2425|      0|          conn->http_proxy.peer ? conn->http_proxy.peer->user_hostname :
 2426|      0|          conn->origin->hostname);
 2427|       |#else
 2428|       |    infof(data, "Reusing existing %s: connection%s with host %s",
 2429|       |          conn->given->name,
 2430|       |          tls_upgraded ? " (upgraded to SSL)" : "",
 2431|       |          conn->origin->hostname);
 2432|       |#endif
 2433|      0|  }
 2434|  8.11k|  else {
 2435|       |    /* We have decided that we want a new connection. We may not be able to do
 2436|       |       that if we have reached the limit of how many connections we are
 2437|       |       allowed to open. */
 2438|       |
 2439|  8.11k|    if(waitpipe) {
  ------------------
  |  Branch (2439:8): [True: 178, False: 7.93k]
  ------------------
 2440|       |      /* There is a connection that *might* become usable for multiplexing
 2441|       |         "soon", and we wait for that */
 2442|    178|      infof(data, "Waiting on connection to negotiate possible multiplexing.");
  ------------------
  |  |  143|    178|  do {                               \
  |  |  144|    178|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    178|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 178, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 178]
  |  |  |  |  ------------------
  |  |  |  |  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]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    178|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    178|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 178]
  |  |  ------------------
  ------------------
 2443|    178|      result = CURLE_NO_CONNECTION_AVAILABLE;
 2444|    178|      goto out;
 2445|    178|    }
 2446|  7.93k|    else {
 2447|  7.93k|      switch(Curl_cpool_check_limits(data, needle)) {
 2448|      0|      case CPOOL_LIMIT_DEST:
  ------------------
  |  |   91|      0|#define CPOOL_LIMIT_DEST   1
  ------------------
  |  Branch (2448:7): [True: 0, False: 7.93k]
  ------------------
 2449|      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]
  |  |  ------------------
  ------------------
 2450|      0|        result = CURLE_NO_CONNECTION_AVAILABLE;
 2451|      0|        goto out;
 2452|      0|      case CPOOL_LIMIT_TOTAL:
  ------------------
  |  |   92|      0|#define CPOOL_LIMIT_TOTAL  2
  ------------------
  |  Branch (2452:7): [True: 0, False: 7.93k]
  ------------------
 2453|      0|        if(data->master_mid != UINT32_MAX)
  ------------------
  |  Branch (2453:12): [True: 0, False: 0]
  ------------------
 2454|      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]
  |  |  ------------------
  ------------------
 2455|      0|                     "max connection limit");
 2456|      0|        else {
 2457|      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]
  |  |  ------------------
  ------------------
 2458|      0|                data->multi->max_total_connections);
 2459|      0|          result = CURLE_NO_CONNECTION_AVAILABLE;
 2460|      0|          goto out;
 2461|      0|        }
 2462|      0|        break;
 2463|  7.93k|      default:
  ------------------
  |  Branch (2463:7): [True: 7.93k, False: 0]
  ------------------
 2464|  7.93k|        break;
 2465|  7.93k|      }
 2466|  7.93k|    }
 2467|       |
 2468|       |    /* Convert needle into a full connection by filling in all the
 2469|       |     * remaining parts like the cloned SSL configuration. */
 2470|  7.93k|    result = Curl_ssl_conn_config_init(data, needle);
 2471|  7.93k|    if(result) {
  ------------------
  |  Branch (2471:8): [True: 0, False: 7.93k]
  ------------------
 2472|      0|      DEBUGF(curl_mfprintf(stderr, "Error: init connection SSL config\n"));
  ------------------
  |  | 1063|      0|#define DEBUGF(x) x
  ------------------
 2473|      0|      goto out;
 2474|      0|    }
 2475|       |    /* attach it and no longer own it */
 2476|  7.93k|    Curl_attach_connection(data, needle);
 2477|  7.93k|    needle = NULL;
 2478|       |
 2479|  7.93k|    result = Curl_cpool_add(data, data->conn);
 2480|  7.93k|    if(result)
  ------------------
  |  Branch (2480:8): [True: 0, False: 7.93k]
  ------------------
 2481|      0|      goto out;
 2482|       |
 2483|       |#ifdef USE_NTLM
 2484|       |    /* If NTLM is requested in a part of this connection, make sure we do not
 2485|       |       assume the state is fine as this is a fresh connection and NTLM is
 2486|       |       connection based. */
 2487|       |    if((data->state.authhost.picked & CURLAUTH_NTLM) &&
 2488|       |       data->state.authhost.done) {
 2489|       |      infof(data, "NTLM picked AND auth done set, clear picked");
 2490|       |      data->state.authhost.picked = CURLAUTH_NONE;
 2491|       |      data->state.authhost.done = FALSE;
 2492|       |    }
 2493|       |
 2494|       |    if((data->state.authproxy.picked & CURLAUTH_NTLM) &&
 2495|       |       data->state.authproxy.done) {
 2496|       |      infof(data, "NTLM-proxy picked AND auth done set, clear picked");
 2497|       |      data->state.authproxy.picked = CURLAUTH_NONE;
 2498|       |      data->state.authproxy.done = FALSE;
 2499|       |    }
 2500|       |#endif
 2501|  7.93k|  }
 2502|       |
 2503|       |  /* Setup and init stuff before DO starts, in preparing for the transfer. */
 2504|  7.93k|  result = Curl_init_do(data, data->conn);
 2505|  7.93k|  if(result)
  ------------------
  |  Branch (2505:6): [True: 0, False: 7.93k]
  ------------------
 2506|      0|    goto out;
 2507|       |
 2508|       |  /* Setup whatever necessary for a resumed transfer */
 2509|  7.93k|  result = setup_range(data);
 2510|  7.93k|  if(result)
  ------------------
  |  Branch (2510:6): [True: 0, False: 7.93k]
  ------------------
 2511|      0|    goto out;
 2512|       |
 2513|       |  /* persist the scheme and handler the transfer is using */
 2514|  7.93k|  data->info.conn_scheme = data->conn->scheme->name;
 2515|       |  /* conn_protocol can only provide "old" protocols */
 2516|  7.93k|  data->info.conn_protocol = (data->conn->scheme->protocol) & CURLPROTO_MASK;
  ------------------
  |  |   79|  7.93k|#define CURLPROTO_MASK   0x3fffffff
  ------------------
 2517|  7.93k|  data->info.used_proxy =
 2518|       |#ifdef CURL_DISABLE_PROXY
 2519|       |    0
 2520|       |#else
 2521|  7.93k|    (data->conn->socks_proxy.peer || data->conn->http_proxy.peer)
  ------------------
  |  Branch (2521:6): [True: 272, False: 7.66k]
  |  Branch (2521:38): [True: 1.90k, False: 5.75k]
  ------------------
 2522|  7.93k|#endif
 2523|  7.93k|    ;
 2524|       |
 2525|       |  /* Lastly, inform connection filters that a new transfer is attached */
 2526|  7.93k|  result = Curl_conn_ev_data_setup(data);
 2527|       |
 2528|  8.94k|out:
 2529|  8.94k|  if(needle)
  ------------------
  |  Branch (2529:6): [True: 178, False: 8.76k]
  ------------------
 2530|    178|    Curl_conn_free(data, needle);
 2531|  8.94k|  DEBUGASSERT(result || data->conn);
  ------------------
  |  | 1077|  8.94k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2531:3): [True: 8.94k, False: 0]
  |  Branch (2531:3): [True: 0, False: 0]
  |  Branch (2531:3): [True: 1.01k, False: 7.93k]
  |  Branch (2531:3): [True: 7.93k, False: 0]
  ------------------
 2532|  8.94k|  return result;
 2533|  8.94k|}
url.c:url_create_needle:
 2097|  8.94k|{
 2098|  8.94k|  struct connectdata *needle = NULL;
 2099|  8.94k|  CURLcode result = CURLE_OK;
 2100|  8.94k|  bool network_scheme = TRUE; /* almost all are */
  ------------------
  |  | 1051|  8.94k|#define TRUE true
  ------------------
 2101|       |
 2102|       |  /* First, split up the current URL in parts so that we can use the
 2103|       |     parts for checking against the already present connections. In order
 2104|       |     to not have to modify everything at once, we allocate a temporary
 2105|       |     connection data struct and fill in for comparison purposes. */
 2106|  8.94k|  needle = allocate_conn(data);
 2107|  8.94k|  if(!needle) {
  ------------------
  |  Branch (2107:6): [True: 0, False: 8.94k]
  ------------------
 2108|      0|    result = CURLE_OUT_OF_MEMORY;
 2109|      0|    goto out;
 2110|      0|  }
 2111|       |
 2112|       |  /* Do the unfailable inits first, before checks that may early return */
 2113|  8.94k|  Curl_hash_init(&needle->meta_hash, 23,
 2114|  8.94k|                 Curl_hash_str, curlx_str_key_compare, conn_meta_freeentry);
 2115|       |
 2116|       |  /*************************************************************
 2117|       |   * Determine `conn->origin` and populate `data->state.up` and
 2118|       |   * other URL related properties.
 2119|       |   *************************************************************/
 2120|  8.94k|  result = url_set_conn_origin_etc(data, needle);
 2121|  8.94k|  if(result)
  ------------------
  |  Branch (2121:6): [True: 669, False: 8.27k]
  ------------------
 2122|    669|    goto out;
 2123|       |
 2124|  8.27k|  DEBUGASSERT(needle->origin);
  ------------------
  |  | 1077|  8.27k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2124:3): [True: 0, False: 8.27k]
  |  Branch (2124:3): [True: 8.27k, False: 0]
  ------------------
 2125|  8.27k|  network_scheme = !(needle->origin->scheme->flags & PROTOPT_NONETWORK);
  ------------------
  |  |  215|  8.27k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
 2126|       |
 2127|  8.27k|#ifdef USE_UNIX_SOCKETS
 2128|       |  /*************************************************************
 2129|       |   * Set UDS first. It overrides "via_peer" and proxy settings.
 2130|       |   *************************************************************/
 2131|  8.27k|  if(network_scheme && data->set.str[STRING_UNIX_SOCKET_PATH]) {
  ------------------
  |  Branch (2131:6): [True: 8.27k, False: 0]
  |  Branch (2131:24): [True: 24, False: 8.25k]
  ------------------
 2132|     24|    result = Curl_peer_uds_create(needle->origin->scheme,
 2133|     24|                                  data->set.str[STRING_UNIX_SOCKET_PATH],
 2134|     24|                                  (bool)data->set.abstract_unix_socket,
 2135|     24|                                  &needle->via_peer);
 2136|     24|    if(result)
  ------------------
  |  Branch (2136:8): [True: 1, False: 23]
  ------------------
 2137|      1|      goto out;
 2138|     24|  }
 2139|  8.27k|#endif /* USE_UNIX_SOCKETS */
 2140|       |
 2141|  8.27k|  if(network_scheme && !needle->via_peer) {
  ------------------
  |  Branch (2141:6): [True: 8.27k, False: 0]
  |  Branch (2141:24): [True: 8.25k, False: 23]
  ------------------
 2142|       |    /*************************************************************
 2143|       |     * If the `via_peer` is not already set (via UDS above),
 2144|       |     * determine if we talk to `conn->origin` directly or use
 2145|       |     * `conn->via_peer` using "connect to" and "alt-svc" properties.
 2146|       |     *************************************************************/
 2147|  8.25k|    result = url_set_conn_peer(data, needle);
 2148|  8.25k|    if(result)
  ------------------
  |  Branch (2148:8): [True: 0, False: 8.25k]
  ------------------
 2149|      0|      goto out;
 2150|  8.25k|  }
 2151|       |
 2152|       |  /*************************************************************
 2153|       |   * Check whether the host and the "connect to host" are equal.
 2154|       |   * Do this after the hostnames have been IDN-converted and
 2155|       |   * before initializing the proxy.
 2156|       |   *************************************************************/
 2157|  8.27k|  if(Curl_peer_equal(needle->origin, needle->via_peer)) {
  ------------------
  |  Branch (2157:6): [True: 0, False: 8.27k]
  ------------------
 2158|      0|    Curl_peer_unlink(&needle->via_peer);
 2159|      0|  }
 2160|       |
 2161|  8.27k|#ifndef CURL_DISABLE_PROXY
 2162|       |  /* Going via a unix socket ignores any proxy settings */
 2163|  8.27k|  if(network_scheme &&
  ------------------
  |  Branch (2163:6): [True: 8.27k, False: 0]
  ------------------
 2164|  8.27k|     (!needle->via_peer || !needle->via_peer->unix_socket)) {
  ------------------
  |  Branch (2164:7): [True: 425, False: 7.85k]
  |  Branch (2164:28): [True: 7.82k, False: 23]
  ------------------
 2165|  8.25k|    result = Curl_proxy_init_conn(data, needle);
 2166|  8.25k|    if(result)
  ------------------
  |  Branch (2166:8): [True: 16, False: 8.23k]
  ------------------
 2167|     16|      goto out;
 2168|  8.25k|  }
 2169|  8.25k|#endif /* CURL_DISABLE_PROXY */
 2170|       |
 2171|  8.25k|  result = url_set_conn_login(data, needle); /* default credentials */
 2172|  8.25k|  if(result)
  ------------------
  |  Branch (2172:6): [True: 0, False: 8.25k]
  ------------------
 2173|      0|    goto out;
 2174|       |
 2175|       |  /*************************************************************
 2176|       |   * Setup internals depending on protocol. Needs to be done after
 2177|       |   * we figured out what/if proxy to use.
 2178|       |   *************************************************************/
 2179|  8.25k|  result = setup_connection_internals(data, needle);
 2180|  8.25k|  if(result)
  ------------------
  |  Branch (2180:6): [True: 149, False: 8.11k]
  ------------------
 2181|    149|    goto out;
 2182|       |
 2183|  8.11k|  if(needle->scheme->flags & PROTOPT_ALPN) {
  ------------------
  |  |  223|  8.11k|#define PROTOPT_ALPN (1 << 8) /* set ALPN for this */
  ------------------
  |  Branch (2183:6): [True: 415, False: 7.69k]
  ------------------
 2184|       |    /* The protocol wants it, so set the bits if enabled in the easy handle
 2185|       |       (default) */
 2186|    415|    if(data->set.ssl_enable_alpn)
  ------------------
  |  Branch (2186:8): [True: 415, False: 0]
  ------------------
 2187|    415|      needle->bits.tls_enable_alpn = TRUE;
  ------------------
  |  | 1051|    415|#define TRUE true
  ------------------
 2188|    415|  }
 2189|       |
 2190|  8.11k|  if(network_scheme) {
  ------------------
  |  Branch (2190:6): [True: 8.11k, False: 0]
  ------------------
 2191|       |    /* Setup callbacks for network connections */
 2192|  8.11k|    needle->recv[FIRSTSOCKET] = Curl_cf_recv;
  ------------------
  |  |  245|  8.11k|#define FIRSTSOCKET     0
  ------------------
 2193|  8.11k|    needle->send[FIRSTSOCKET] = Curl_cf_send;
  ------------------
  |  |  245|  8.11k|#define FIRSTSOCKET     0
  ------------------
 2194|  8.11k|    needle->recv[SECONDARYSOCKET] = Curl_cf_recv;
  ------------------
  |  |  246|  8.11k|#define SECONDARYSOCKET 1
  ------------------
 2195|  8.11k|    needle->send[SECONDARYSOCKET] = Curl_cf_send;
  ------------------
  |  |  246|  8.11k|#define SECONDARYSOCKET 1
  ------------------
 2196|  8.11k|    needle->bits.tcp_fastopen = data->set.tcp_fastopen;
 2197|  8.11k|#ifdef USE_UNIX_SOCKETS
 2198|  8.11k|    if(Curl_conn_get_first_peer(needle, FIRSTSOCKET)->unix_socket)
  ------------------
  |  |  245|  8.11k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2198:8): [True: 24, False: 8.08k]
  ------------------
 2199|     24|      needle->transport_wanted = TRNSPRT_UNIX;
  ------------------
  |  |  252|     24|#define TRNSPRT_UNIX 6
  ------------------
 2200|  8.11k|#endif
 2201|  8.11k|  }
 2202|       |
 2203|  8.94k|out:
 2204|  8.94k|  if(!result) {
  ------------------
  |  Branch (2204:6): [True: 8.11k, False: 835]
  ------------------
 2205|  8.11k|    DEBUGASSERT(needle);
  ------------------
  |  | 1077|  8.11k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2205:5): [True: 0, False: 8.11k]
  |  Branch (2205:5): [True: 8.11k, False: 0]
  ------------------
 2206|  8.11k|    DEBUGASSERT(needle->origin);
  ------------------
  |  | 1077|  8.11k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2206:5): [True: 0, False: 8.11k]
  |  Branch (2206:5): [True: 8.11k, False: 0]
  ------------------
 2207|  8.11k|    *pneedle = needle;
 2208|  8.11k|  }
 2209|    835|  else {
 2210|    835|    *pneedle = NULL;
 2211|    835|    if(needle)
  ------------------
  |  Branch (2211:8): [True: 835, False: 0]
  ------------------
 2212|    835|      Curl_conn_free(data, needle);
 2213|    835|  }
 2214|  8.94k|  return result;
 2215|  8.94k|}
url.c:allocate_conn:
 1275|  8.94k|{
 1276|  8.94k|  struct connectdata *conn = curlx_calloc(1, sizeof(struct connectdata));
  ------------------
  |  | 1485|  8.94k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1277|  8.94k|  if(!conn)
  ------------------
  |  Branch (1277:6): [True: 0, False: 8.94k]
  ------------------
 1278|      0|    return NULL;
 1279|       |
 1280|       |  /* and we setup a few fields in case we end up actually using this struct */
 1281|       |
 1282|  8.94k|  conn->sock[FIRSTSOCKET] = CURL_SOCKET_BAD;     /* no file descriptor */
  ------------------
  |  |  245|  8.94k|#define FIRSTSOCKET     0
  ------------------
                conn->sock[FIRSTSOCKET] = CURL_SOCKET_BAD;     /* no file descriptor */
  ------------------
  |  |  145|  8.94k|#define CURL_SOCKET_BAD (-1)
  ------------------
 1283|  8.94k|  conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD; /* no file descriptor */
  ------------------
  |  |  246|  8.94k|#define SECONDARYSOCKET 1
  ------------------
                conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD; /* no file descriptor */
  ------------------
  |  |  145|  8.94k|#define CURL_SOCKET_BAD (-1)
  ------------------
 1284|  8.94k|  conn->recv_idx = 0; /* default for receiving transfer data */
 1285|  8.94k|  conn->send_idx = 0; /* default for sending transfer data */
 1286|  8.94k|  conn->connection_id = -1;    /* no ID */
 1287|  8.94k|  conn->attached_xfers = 0;
 1288|       |
 1289|       |  /* Store creation time to help future close decision making */
 1290|  8.94k|  conn->created = *Curl_pgrs_now(data);
 1291|       |
 1292|       |  /* Store current time to give a baseline to keepalive connection times. */
 1293|  8.94k|  conn->keepalive = conn->created;
 1294|       |
 1295|  8.94k|#ifndef CURL_DISABLE_FTP
 1296|  8.94k|  conn->bits.ftp_use_epsv = data->set.ftp_use_epsv;
 1297|  8.94k|  conn->bits.ftp_use_eprt = data->set.ftp_use_eprt;
 1298|  8.94k|#endif
 1299|  8.94k|  conn->ip_version = data->set.ipver;
 1300|  8.94k|  conn->bits.connect_only = (bool)data->set.connect_only;
 1301|  8.94k|  conn->transport_wanted = TRNSPRT_TCP; /* most of them are TCP streams */
  ------------------
  |  |  249|  8.94k|#define TRNSPRT_TCP  3
  ------------------
 1302|       |
 1303|       |  /* Store the local bind parameters that will be used for this connection */
 1304|  8.94k|  if(data->set.str[STRING_DEVICE]) {
  ------------------
  |  Branch (1304:6): [True: 102, False: 8.84k]
  ------------------
 1305|    102|    conn->localdev = curlx_strdup(data->set.str[STRING_DEVICE]);
  ------------------
  |  | 1482|    102|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1306|    102|    if(!conn->localdev)
  ------------------
  |  Branch (1306:8): [True: 0, False: 102]
  ------------------
 1307|      0|      goto error;
 1308|    102|  }
 1309|  8.94k|#ifndef CURL_DISABLE_BINDLOCAL
 1310|  8.94k|  conn->localportrange = data->set.localportrange;
 1311|  8.94k|  conn->localport = data->set.localport;
 1312|  8.94k|#endif
 1313|       |
 1314|       |  /* the close socket stuff needs to be copied to the connection struct as
 1315|       |     it may live on without (this specific) Curl_easy */
 1316|  8.94k|  conn->fclosesocket = data->set.fclosesocket;
 1317|  8.94k|  conn->closesocket_client = data->set.closesocket_client;
 1318|  8.94k|  conn->lastused = conn->created;
 1319|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
 1320|       |  conn->gssapi_delegation = data->set.gssapi_delegation;
 1321|       |#endif
 1322|  8.94k|  return conn;
 1323|      0|error:
 1324|       |
 1325|      0|  curlx_free(conn->localdev);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1326|      0|  curlx_free(conn);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1327|       |  return NULL;
 1328|  8.94k|}
url.c:url_set_conn_origin_etc:
 1613|  8.94k|{
 1614|  8.94k|  CURLcode result = CURLE_OK;
 1615|       |
 1616|  8.94k|  Curl_peer_link(&conn->origin, data->state.origin);
 1617|       |
 1618|       |  /* set the connection scheme */
 1619|  8.94k|  result = url_set_conn_scheme(data, conn, conn->origin->scheme);
 1620|  8.94k|  if(result)
  ------------------
  |  Branch (1620:6): [True: 669, False: 8.27k]
  ------------------
 1621|    669|    goto out;
 1622|       |
 1623|       |  /* set the connection options */
 1624|  8.27k|  if(data->set.str[STRING_OPTIONS]) {
  ------------------
  |  Branch (1624:6): [True: 21, False: 8.25k]
  ------------------
 1625|     21|    conn->options = curlx_strdup(data->set.str[STRING_OPTIONS]);
  ------------------
  |  | 1482|     21|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1626|     21|    if(!conn->options) {
  ------------------
  |  Branch (1626:8): [True: 0, False: 21]
  ------------------
 1627|      0|      result = CURLE_OUT_OF_MEMORY;
 1628|      0|      goto out;
 1629|      0|    }
 1630|     21|  }
 1631|  8.25k|  else if(data->state.up.options) {
  ------------------
  |  Branch (1631:11): [True: 0, False: 8.25k]
  ------------------
 1632|      0|    conn->options = curlx_strdup(data->state.up.options);
  ------------------
  |  | 1482|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1633|      0|    if(!conn->options) {
  ------------------
  |  Branch (1633:8): [True: 0, False: 0]
  ------------------
 1634|      0|      result = CURLE_OUT_OF_MEMORY;
 1635|      0|      goto out;
 1636|      0|    }
 1637|      0|  }
 1638|       |
 1639|  8.27k|#ifdef USE_IPV6
 1640|  8.27k|  conn->scope_id = data->set.scope_id ?
  ------------------
  |  Branch (1640:20): [True: 81, False: 8.19k]
  ------------------
 1641|  8.19k|                   data->set.scope_id : data->state.origin->scopeid;
 1642|  8.27k|#endif
 1643|       |
 1644|  8.94k|out:
 1645|  8.94k|  return result;
 1646|  8.27k|}
url.c:url_set_conn_scheme:
 1333|  8.94k|{
 1334|       |  /* URL scheme is usable for connection when it is
 1335|       |   * - allowed
 1336|       |   * - not from a redirect or an allowed redirect protocol */
 1337|  8.94k|  if(scheme->run &&
  ------------------
  |  Branch (1337:6): [True: 8.94k, False: 1]
  ------------------
 1338|  8.94k|     (data->set.allowed_protocols & scheme->protocol) &&
  ------------------
  |  Branch (1338:6): [True: 8.27k, False: 668]
  ------------------
 1339|  8.27k|     (!data->state.this_is_a_follow ||
  ------------------
  |  Branch (1339:7): [True: 8.27k, False: 0]
  ------------------
 1340|  8.27k|       (data->set.redir_protocols & scheme->protocol))) {
  ------------------
  |  Branch (1340:8): [True: 0, False: 0]
  ------------------
 1341|  8.27k|    conn->scheme = conn->given = scheme;
 1342|  8.27k|    return CURLE_OK;
 1343|  8.27k|  }
 1344|    669|  if(scheme->flags & PROTOPT_NO_TRANSFER)
  ------------------
  |  |  239|    669|#define PROTOPT_NO_TRANSFER (1 << 17) /* this protocol is not for transfers */
  ------------------
  |  Branch (1344:6): [True: 0, False: 669]
  ------------------
 1345|      0|    failf(data, "Protocol \"%s\" is not for transfers", scheme->name);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1346|    669|  else
 1347|    669|    failf(data, "Protocol \"%s\" is disabled%s", scheme->name,
  ------------------
  |  |   62|    669|#define failf Curl_failf
  ------------------
 1348|    669|          data->state.this_is_a_follow ? " (in redirect)" : "");
  ------------------
  |  Branch (1348:11): [True: 0, False: 669]
  ------------------
 1349|    669|  return CURLE_UNSUPPORTED_PROTOCOL;
 1350|  8.94k|}
url.c:url_set_conn_peer:
 1912|  8.25k|{
 1913|  8.25k|  CURLcode result = CURLE_OK;
 1914|  8.25k|  struct Curl_peer *origin = conn->origin;
 1915|  8.25k|  struct Curl_peer *via_peer = NULL;
 1916|  8.25k|  struct curl_slist *conn_to_entry = data->set.connect_to;
 1917|       |
 1918|  8.25k|  DEBUGASSERT(!conn->via_peer);
  ------------------
  |  | 1077|  8.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1918:3): [True: 0, False: 8.25k]
  |  Branch (1918:3): [True: 8.25k, False: 0]
  ------------------
 1919|  8.25k|  Curl_peer_unlink(&conn->via_peer);
 1920|       |
 1921|  16.0k|  while(conn_to_entry && !via_peer) {
  ------------------
  |  Branch (1921:9): [True: 7.82k, False: 8.25k]
  |  Branch (1921:26): [True: 7.82k, False: 0]
  ------------------
 1922|  7.82k|    result = parse_connect_to_string(data, origin, conn_to_entry->data,
 1923|  7.82k|                                     &via_peer);
 1924|  7.82k|    if(result)
  ------------------
  |  Branch (1924:8): [True: 0, False: 7.82k]
  ------------------
 1925|      0|      return result;
 1926|  7.82k|    conn_to_entry = conn_to_entry->next;
 1927|  7.82k|  }
 1928|       |
 1929|  8.25k|#ifndef CURL_DISABLE_ALTSVC
 1930|  8.25k|  if(data->asi && !via_peer &&
  ------------------
  |  Branch (1930:6): [True: 7.82k, False: 425]
  |  Branch (1930:19): [True: 0, False: 7.82k]
  ------------------
 1931|      0|     ((conn->scheme->protocol == CURLPROTO_HTTPS) ||
  ------------------
  |  | 1079|      0|#define CURLPROTO_HTTPS   (1L << 1)
  ------------------
  |  Branch (1931:7): [True: 0, False: 0]
  ------------------
 1932|      0|#ifdef DEBUGBUILD
 1933|       |      /* allow debug builds to circumvent the HTTPS restriction */
 1934|      0|      getenv("CURL_ALTSVC_HTTP")
  ------------------
  |  Branch (1934:7): [True: 0, False: 0]
  ------------------
 1935|       |#else
 1936|       |      0
 1937|       |#endif
 1938|      0|       )) {
 1939|       |    /* no connect_to match, try alt-svc! */
 1940|      0|    enum alpnid srcalpnid = ALPN_none;
 1941|      0|    bool hit = FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1942|      0|    struct altsvc *as = NULL;
 1943|      0|    int allowed_alpns = ALPN_none;
 1944|      0|    struct http_negotiation *neg = &data->state.http_neg;
 1945|      0|    bool same_dest = FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1946|       |
 1947|      0|    DEBUGF(infof(data, "Alt-svc check wanted=%x, allowed=%x",
  ------------------
  |  | 1063|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1948|      0|                 neg->wanted, neg->allowed));
 1949|       |#ifdef USE_HTTP3
 1950|       |    if(neg->allowed & CURL_HTTP_V3x)
 1951|       |      allowed_alpns |= ALPN_h3;
 1952|       |#endif
 1953|      0|#ifdef USE_HTTP2
 1954|      0|    if(neg->allowed & CURL_HTTP_V2x)
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (1954:8): [True: 0, False: 0]
  ------------------
 1955|      0|      allowed_alpns |= ALPN_h2;
 1956|      0|#endif
 1957|      0|    if(neg->allowed & CURL_HTTP_V1x)
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (1957:8): [True: 0, False: 0]
  ------------------
 1958|      0|      allowed_alpns |= ALPN_h1;
 1959|      0|    allowed_alpns &= (int)data->asi->flags;
 1960|       |
 1961|      0|    DEBUGF(infof(data, "check Alt-Svc for host '%s'", origin->hostname));
  ------------------
  |  | 1063|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1962|       |#ifdef USE_HTTP3
 1963|       |    if(!hit && (neg->wanted & CURL_HTTP_V3x)) {
 1964|       |      srcalpnid = ALPN_h3;
 1965|       |      hit = Curl_altsvc_lookup(data->asi,
 1966|       |                               origin, ALPN_h3, /* from */
 1967|       |                               &as /* to */,
 1968|       |                               allowed_alpns, &same_dest);
 1969|       |    }
 1970|       |#endif
 1971|      0|#ifdef USE_HTTP2
 1972|      0|    if(!hit && (neg->wanted & CURL_HTTP_V2x) &&
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (1972:8): [True: 0, False: 0]
  |  Branch (1972:16): [True: 0, False: 0]
  ------------------
 1973|      0|       !neg->h2_prior_knowledge) {
  ------------------
  |  Branch (1973:8): [True: 0, False: 0]
  ------------------
 1974|      0|      srcalpnid = ALPN_h2;
 1975|      0|      hit = Curl_altsvc_lookup(data->asi,
 1976|      0|                               origin, ALPN_h2, /* from */
 1977|      0|                               &as /* to */,
 1978|      0|                               allowed_alpns, &same_dest);
 1979|      0|    }
 1980|      0|#endif
 1981|      0|    if(!hit && (neg->wanted & CURL_HTTP_V1x) &&
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (1981:8): [True: 0, False: 0]
  |  Branch (1981:16): [True: 0, False: 0]
  ------------------
 1982|      0|       !neg->only_10) {
  ------------------
  |  Branch (1982:8): [True: 0, False: 0]
  ------------------
 1983|      0|      srcalpnid = ALPN_h1;
 1984|      0|      hit = Curl_altsvc_lookup(data->asi,
 1985|      0|                               origin, ALPN_h1, /* from */
 1986|      0|                               &as /* to */,
 1987|      0|                               allowed_alpns, &same_dest);
 1988|      0|    }
 1989|       |
 1990|      0|    if(hit && same_dest) {
  ------------------
  |  Branch (1990:8): [True: 0, False: 0]
  |  Branch (1990:15): [True: 0, False: 0]
  ------------------
 1991|       |      /* same destination, but more HTTPS version options */
 1992|      0|      switch(as->dst.alpnid) {
 1993|      0|      case ALPN_h1:
  ------------------
  |  Branch (1993:7): [True: 0, False: 0]
  ------------------
 1994|      0|        neg->wanted |= CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 1995|      0|        neg->preferred = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 1996|      0|        break;
 1997|      0|      case ALPN_h2:
  ------------------
  |  Branch (1997:7): [True: 0, False: 0]
  ------------------
 1998|      0|        neg->wanted |= CURL_HTTP_V2x;
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
 1999|      0|        neg->preferred = CURL_HTTP_V2x;
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
 2000|      0|        break;
 2001|      0|      case ALPN_h3:
  ------------------
  |  Branch (2001:7): [True: 0, False: 0]
  ------------------
 2002|      0|        neg->wanted |= CURL_HTTP_V3x;
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
 2003|      0|        neg->preferred = CURL_HTTP_V3x;
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
 2004|      0|        break;
 2005|      0|      default: /* should not be possible */
  ------------------
  |  Branch (2005:7): [True: 0, False: 0]
  ------------------
 2006|      0|        break;
 2007|      0|      }
 2008|      0|    }
 2009|      0|    else if(hit) {
  ------------------
  |  Branch (2009:13): [True: 0, False: 0]
  ------------------
 2010|      0|      result = Curl_peer_create(data, conn->origin->scheme,
 2011|      0|                                as->dst.host, as->dst.port,
 2012|      0|                                &via_peer);
 2013|      0|      if(result)
  ------------------
  |  Branch (2013:10): [True: 0, False: 0]
  ------------------
 2014|      0|        return result;
 2015|      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]
  |  |  ------------------
  ------------------
 2016|      0|            Curl_alpnid2str(srcalpnid), origin->hostname, origin->port,
 2017|      0|            Curl_alpnid2str(as->dst.alpnid),
 2018|      0|            via_peer->hostname, via_peer->port);
 2019|      0|      conn->bits.altused = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 2020|      0|      if(srcalpnid != as->dst.alpnid) {
  ------------------
  |  Branch (2020:10): [True: 0, False: 0]
  ------------------
 2021|       |        /* protocol version switch */
 2022|      0|        switch(as->dst.alpnid) {
 2023|      0|        case ALPN_h1:
  ------------------
  |  Branch (2023:9): [True: 0, False: 0]
  ------------------
 2024|      0|          neg->wanted = neg->allowed = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 2025|      0|          neg->only_10 = FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 2026|      0|          break;
 2027|      0|        case ALPN_h2:
  ------------------
  |  Branch (2027:9): [True: 0, False: 0]
  ------------------
 2028|      0|          neg->wanted = neg->allowed = CURL_HTTP_V2x;
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
 2029|      0|          break;
 2030|      0|        case ALPN_h3:
  ------------------
  |  Branch (2030:9): [True: 0, False: 0]
  ------------------
 2031|      0|          conn->transport_wanted = TRNSPRT_QUIC;
  ------------------
  |  |  251|      0|#define TRNSPRT_QUIC 5
  ------------------
 2032|      0|          neg->wanted = neg->allowed = CURL_HTTP_V3x;
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
 2033|      0|          break;
 2034|      0|        default: /* should not be possible */
  ------------------
  |  Branch (2034:9): [True: 0, False: 0]
  ------------------
 2035|      0|          break;
 2036|      0|        }
 2037|      0|      }
 2038|      0|    }
 2039|      0|  }
 2040|  8.25k|#endif
 2041|       |
 2042|  8.25k|  if(via_peer)
  ------------------
  |  Branch (2042:6): [True: 7.82k, False: 425]
  ------------------
 2043|  7.82k|    conn->via_peer = via_peer;
 2044|       |
 2045|  8.25k|  return result;
 2046|  8.25k|}
url.c:parse_connect_to_string:
 1852|  7.82k|{
 1853|  7.82k|  CURLcode result = CURLE_OK;
 1854|  7.82k|  const char *ptr = conn_to_line;
 1855|  7.82k|  bool host_match = FALSE;
  ------------------
  |  | 1054|  7.82k|#define FALSE false
  ------------------
 1856|  7.82k|  bool port_match = FALSE;
  ------------------
  |  | 1054|  7.82k|#define FALSE false
  ------------------
 1857|       |
 1858|  7.82k|  *pvia_dest = NULL;
 1859|       |
 1860|  7.82k|  if(*ptr == ':') {
  ------------------
  |  Branch (1860:6): [True: 7.82k, False: 0]
  ------------------
 1861|       |    /* an empty hostname always matches */
 1862|  7.82k|    host_match = TRUE;
  ------------------
  |  | 1051|  7.82k|#define TRUE true
  ------------------
 1863|  7.82k|    ptr++;
 1864|  7.82k|  }
 1865|      0|  else {
 1866|       |    /* check whether the URL's hostname matches. Use the URL hostname
 1867|       |     * when it was an IPv6 address. Otherwise use the connection's hostname
 1868|       |     * that has IDN conversion. */
 1869|      0|    size_t hlen = strlen(dest->hostname);
 1870|      0|    host_match = curl_strnequal(ptr, dest->hostname, hlen);
 1871|      0|    if(!host_match && (dest->user_hostname != dest->hostname)) {
  ------------------
  |  Branch (1871:8): [True: 0, False: 0]
  |  Branch (1871:23): [True: 0, False: 0]
  ------------------
 1872|       |      /* hostname was normalized, could be IPv6 or IDN */
 1873|      0|      hlen = strlen(dest->user_hostname);
 1874|      0|      host_match = curl_strnequal(ptr, dest->user_hostname, hlen);
 1875|      0|    }
 1876|      0|    host_match = host_match && ptr[hlen] == ':';
  ------------------
  |  Branch (1876:18): [True: 0, False: 0]
  |  Branch (1876:32): [True: 0, False: 0]
  ------------------
 1877|      0|    if(host_match)
  ------------------
  |  Branch (1877:8): [True: 0, False: 0]
  ------------------
 1878|      0|      ptr += hlen + 1;
 1879|      0|  }
 1880|       |
 1881|  7.82k|  if(host_match) {
  ------------------
  |  Branch (1881:6): [True: 7.82k, False: 0]
  ------------------
 1882|  7.82k|    if(*ptr == ':') {
  ------------------
  |  Branch (1882:8): [True: 7.82k, False: 0]
  ------------------
 1883|       |      /* an empty port always matches */
 1884|  7.82k|      port_match = TRUE;
  ------------------
  |  | 1051|  7.82k|#define TRUE true
  ------------------
 1885|  7.82k|      ptr++;
 1886|  7.82k|    }
 1887|      0|    else {
 1888|       |      /* check whether the URL's port matches */
 1889|      0|      const char *ptr_next = strchr(ptr, ':');
 1890|      0|      if(ptr_next) {
  ------------------
  |  Branch (1890:10): [True: 0, False: 0]
  ------------------
 1891|      0|        curl_off_t port_to_match;
 1892|      0|        if(!curlx_str_number(&ptr, &port_to_match, 0xffff) &&
  ------------------
  |  Branch (1892:12): [True: 0, False: 0]
  ------------------
 1893|      0|           ((uint16_t)port_to_match == dest->port)) {
  ------------------
  |  Branch (1893:12): [True: 0, False: 0]
  ------------------
 1894|      0|          port_match = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 1895|      0|        }
 1896|      0|        ptr = ptr_next + 1;
 1897|      0|      }
 1898|      0|    }
 1899|  7.82k|  }
 1900|       |
 1901|  7.82k|  if(host_match && port_match && ptr && *ptr)
  ------------------
  |  Branch (1901:6): [True: 7.82k, False: 0]
  |  Branch (1901:20): [True: 7.82k, False: 0]
  |  Branch (1901:34): [True: 7.82k, False: 0]
  |  Branch (1901:41): [True: 7.82k, False: 0]
  ------------------
 1902|  7.82k|    result = Curl_peer_from_connect_to(data, dest, ptr, pvia_dest);
 1903|       |
 1904|  7.82k|  return result;
 1905|  7.82k|}
url.c:url_set_conn_login:
 1824|  8.25k|{
 1825|       |  /* If our protocol needs a password and we have none, use the defaults */
 1826|  8.25k|  if((conn->scheme->flags & PROTOPT_NEEDSPWD) && !conn->creds) {
  ------------------
  |  |  216|  8.25k|#define PROTOPT_NEEDSPWD (1 << 5)  /* needs a password, and if none is set it
  ------------------
  |  Branch (1826:6): [True: 0, False: 8.25k]
  |  Branch (1826:50): [True: 0, False: 0]
  ------------------
 1827|      0|    Curl_peer_link(&conn->creds_origin, data->state.origin);
 1828|      0|    if(data->state.creds)
  ------------------
  |  Branch (1828:8): [True: 0, False: 0]
  ------------------
 1829|      0|      Curl_creds_link(&conn->creds, data->state.creds);
 1830|      0|    else
 1831|      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"
  ------------------
 1832|      0|                               NULL, NULL, NULL, CREDS_NONE, &conn->creds);
  ------------------
  |  |   29|      0|#define CREDS_NONE   0 /* used for default username/passwd */
  ------------------
 1833|      0|  }
 1834|  8.25k|  else if(!(conn->scheme->flags & PROTOPT_CREDSPERREQUEST)) {
  ------------------
  |  |  220|  8.25k|#define PROTOPT_CREDSPERREQUEST (1 << 7) /* requires login credentials per
  ------------------
  |  Branch (1834:11): [True: 7.83k, False: 425]
  ------------------
 1835|       |    /* for protocols that do not handle credentials per request,
 1836|       |     * the connection credentials are set by the initial transfer. */
 1837|  7.83k|    Curl_peer_link(&conn->creds_origin, data->state.origin);
 1838|  7.83k|    Curl_creds_link(&conn->creds, data->state.creds);
 1839|  7.83k|  }
 1840|       |
 1841|  8.25k|  return CURLE_OK;
 1842|  8.25k|}
url.c:setup_connection_internals:
 1690|  8.25k|{
 1691|  8.25k|  struct Curl_peer *peer = NULL;
 1692|  8.25k|  CURLcode result;
 1693|       |
 1694|  8.25k|  if(conn->scheme->run->setup_connection) {
  ------------------
  |  Branch (1694:6): [True: 8.25k, False: 0]
  ------------------
 1695|  8.25k|    result = conn->scheme->run->setup_connection(data, conn);
 1696|  8.25k|    if(result)
  ------------------
  |  Branch (1696:8): [True: 149, False: 8.11k]
  ------------------
 1697|    149|      return result;
 1698|  8.25k|  }
 1699|       |
 1700|       |  /* Now create the destination name */
 1701|  8.11k|  peer = Curl_conn_get_destination(conn, FIRSTSOCKET);
  ------------------
  |  |  245|  8.11k|#define FIRSTSOCKET     0
  ------------------
 1702|  8.11k|  if(!peer)
  ------------------
  |  Branch (1702:6): [True: 0, False: 8.11k]
  ------------------
 1703|      0|    return CURLE_FAILED_INIT;
 1704|       |
 1705|       |  /* IPv6 addresses with a scope_id (0 is default == global) have a
 1706|       |   * printable representation with a '%<scope_id>' suffix. */
 1707|  8.11k|  if(peer->ipv6)
  ------------------
  |  Branch (1707:6): [True: 29, False: 8.08k]
  ------------------
 1708|     29|    if(peer->scopeid)
  ------------------
  |  Branch (1708:8): [True: 4, False: 25]
  ------------------
 1709|      4|      conn->destination = curl_maprintf("[%s%%%u]:%u",
 1710|      4|        peer->hostname, peer->scopeid, peer->port);
 1711|     25|    else
 1712|     25|      conn->destination = curl_maprintf("[%s]:%u",
 1713|     25|        peer->hostname, peer->port);
 1714|  8.08k|  else
 1715|  8.08k|    conn->destination = curl_maprintf("%s:%u", peer->hostname, peer->port);
 1716|  8.11k|  if(!conn->destination)
  ------------------
  |  Branch (1716:6): [True: 0, False: 8.11k]
  ------------------
 1717|      0|    return CURLE_OUT_OF_MEMORY;
 1718|       |
 1719|  8.11k|  Curl_strntolower(conn->destination, conn->destination,
 1720|  8.11k|                   strlen(conn->destination));
 1721|       |
 1722|  8.11k|  return CURLE_OK;
 1723|  8.11k|}
url.c:setup_range:
 1653|  7.93k|{
 1654|  7.93k|  struct UrlState *s = &data->state;
 1655|  7.93k|  s->resume_from = data->set.set_resume_from;
 1656|  7.93k|  if(s->resume_from || data->set.str[STRING_SET_RANGE]) {
  ------------------
  |  Branch (1656:6): [True: 95, False: 7.83k]
  |  Branch (1656:24): [True: 3, False: 7.83k]
  ------------------
 1657|     98|    if(s->rangestringalloc)
  ------------------
  |  Branch (1657:8): [True: 0, False: 98]
  ------------------
 1658|      0|      curlx_free(s->range);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1659|       |
 1660|     98|    if(s->resume_from)
  ------------------
  |  Branch (1660:8): [True: 95, False: 3]
  ------------------
 1661|     95|      s->range = curl_maprintf("%" FMT_OFF_T "-", s->resume_from);
 1662|      3|    else
 1663|      3|      s->range = curlx_strdup(data->set.str[STRING_SET_RANGE]);
  ------------------
  |  | 1482|      3|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1664|       |
 1665|     98|    if(!s->range)
  ------------------
  |  Branch (1665:8): [True: 0, False: 98]
  ------------------
 1666|      0|      return CURLE_OUT_OF_MEMORY;
 1667|       |
 1668|     98|    s->rangestringalloc = TRUE;
  ------------------
  |  | 1051|     98|#define TRUE true
  ------------------
 1669|       |
 1670|       |    /* tell ourselves to fetch this range */
 1671|     98|    s->use_range = TRUE;        /* enable range download */
  ------------------
  |  | 1051|     98|#define TRUE true
  ------------------
 1672|     98|  }
 1673|  7.83k|  else
 1674|  7.83k|    s->use_range = FALSE; /* disable range download */
  ------------------
  |  | 1054|  7.83k|#define FALSE false
  ------------------
 1675|       |
 1676|  7.93k|  return CURLE_OK;
 1677|  7.93k|}
url.c:url_attach_existing:
 1223|  8.09k|{
 1224|  8.09k|  struct url_conn_match match;
 1225|  8.09k|  bool success;
 1226|       |
 1227|  8.09k|  DEBUGASSERT(!data->conn);
  ------------------
  |  | 1077|  8.09k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1227:3): [True: 0, False: 8.09k]
  |  Branch (1227:3): [True: 8.09k, False: 0]
  ------------------
 1228|  8.09k|  memset(&match, 0, sizeof(match));
 1229|  8.09k|  match.data = data;
 1230|  8.09k|  match.needle = needle;
 1231|  8.09k|  match.now = *Curl_pgrs_now(data);
 1232|  8.09k|  match.may_multiplex = xfer_may_multiplex(data, needle);
 1233|       |
 1234|       |#ifdef USE_NTLM
 1235|       |  match.want_ntlm_http =
 1236|       |    (data->state.authhost.want & CURLAUTH_NTLM) &&
 1237|       |    (needle->scheme->protocol & PROTO_FAMILY_HTTP);
 1238|       |#ifndef CURL_DISABLE_PROXY
 1239|       |  match.want_proxy_ntlm_http =
 1240|       |    needle->http_proxy.creds &&
 1241|       |    (data->state.authproxy.want & CURLAUTH_NTLM) &&
 1242|       |    (needle->scheme->protocol & PROTO_FAMILY_HTTP);
 1243|       |#endif
 1244|       |#endif
 1245|       |
 1246|       |#if !defined(CURL_DISABLE_HTTP) && defined(USE_SPNEGO)
 1247|       |  match.want_nego_http =
 1248|       |    (data->state.authhost.want & CURLAUTH_NEGOTIATE) &&
 1249|       |    (needle->scheme->protocol & PROTO_FAMILY_HTTP);
 1250|       |#ifndef CURL_DISABLE_PROXY
 1251|       |  match.want_proxy_nego_http =
 1252|       |    needle->http_proxy.creds &&
 1253|       |    (data->state.authproxy.want & CURLAUTH_NEGOTIATE) &&
 1254|       |    (needle->scheme->protocol & PROTO_FAMILY_HTTP);
 1255|       |#endif
 1256|       |#endif
 1257|  8.09k|  match.require_tls = data->set.use_ssl >= CURLUSESSL_CONTROL;
  ------------------
  |  |  926|  8.09k|#define CURLUSESSL_CONTROL 2L /* SSL for the control connection or fail */
  ------------------
 1258|  8.09k|  match.may_tls = data->set.use_ssl > CURLUSESSL_NONE;
  ------------------
  |  |  924|  8.09k|#define CURLUSESSL_NONE    0L /* do not attempt to use SSL */
  ------------------
 1259|       |
 1260|       |  /* Find a connection in the pool that matches what "data + needle"
 1261|       |   * requires. If a suitable candidate is found, it is attached to "data". */
 1262|  8.09k|  success = Curl_cpool_find(data, needle->destination,
 1263|  8.09k|                            url_match_conn, url_match_result, &match);
 1264|       |
 1265|       |  /* wait_pipe is TRUE if we encounter a bundle that is undecided. There
 1266|       |   * is no matching connection then, yet. */
 1267|  8.09k|  *waitpipe = (bool)match.wait_pipe;
 1268|  8.09k|  return success;
 1269|  8.09k|}
url.c:xfer_may_multiplex:
  536|  8.09k|{
  537|  8.09k|#ifndef CURL_DISABLE_HTTP
  538|       |  /* If an HTTP protocol and multiplexing is enabled */
  539|  8.09k|  if((conn->scheme->protocol & PROTO_FAMILY_HTTP) &&
  ------------------
  |  |   84|  8.09k|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1078|  8.09k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1079|  8.09k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|  8.09k|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|  8.09k|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|  8.09k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
  |  Branch (539:6): [True: 425, False: 7.67k]
  ------------------
  540|    425|     (!conn->bits.protoconnstart || !conn->bits.close)) {
  ------------------
  |  Branch (540:7): [True: 425, False: 0]
  |  Branch (540:37): [True: 0, False: 0]
  ------------------
  541|       |
  542|    425|    if(Curl_multiplex_wanted(data->multi) &&
  ------------------
  |  Branch (542:8): [True: 425, False: 0]
  ------------------
  543|    425|       (data->state.http_neg.allowed & (CURL_HTTP_V2x | CURL_HTTP_V3x)))
  ------------------
  |  |   41|    425|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
                     (data->state.http_neg.allowed & (CURL_HTTP_V2x | CURL_HTTP_V3x)))
  ------------------
  |  |   42|    425|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  |  Branch (543:8): [True: 425, False: 0]
  ------------------
  544|       |      /* allows HTTP/2 or newer */
  545|    425|      return TRUE;
  ------------------
  |  | 1051|    425|#define TRUE true
  ------------------
  546|    425|  }
  547|       |#else
  548|       |  (void)data;
  549|       |  (void)conn;
  550|       |#endif
  551|  7.67k|  return FALSE;
  ------------------
  |  | 1054|  7.67k|#define FALSE false
  ------------------
  552|  8.09k|}
url.c:url_match_conn:
 1125|    178|{
 1126|    178|  struct url_conn_match *m = userdata;
 1127|       |  /* Check if `conn` can be used for transfer `m->data` */
 1128|       |
 1129|       |  /* general connect config setting match? */
 1130|    178|  if(!url_match_connect_config(conn, m))
  ------------------
  |  Branch (1130:6): [True: 0, False: 178]
  ------------------
 1131|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1132|       |
 1133|       |  /* match for destination and protocol? */
 1134|    178|  if(!url_match_destination(conn, m))
  ------------------
  |  Branch (1134:6): [True: 0, False: 178]
  ------------------
 1135|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1136|       |
 1137|    178|  if(!url_match_fully_connected(conn, m))
  ------------------
  |  Branch (1137:6): [True: 178, False: 0]
  ------------------
 1138|    178|    return FALSE;
  ------------------
  |  | 1054|    178|#define FALSE false
  ------------------
 1139|       |
 1140|      0|  if(!url_match_multiplex_needs(conn, m))
  ------------------
  |  Branch (1140:6): [True: 0, False: 0]
  ------------------
 1141|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1142|       |
 1143|      0|  if(!url_match_ssl_use(conn, m))
  ------------------
  |  Branch (1143:6): [True: 0, False: 0]
  ------------------
 1144|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1145|       |
 1146|      0|  if(!url_match_proxy_use(conn, m))
  ------------------
  |  Branch (1146:6): [True: 0, False: 0]
  ------------------
 1147|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1148|      0|  if(!url_match_ssl_config(conn, m))
  ------------------
  |  Branch (1148:6): [True: 0, False: 0]
  ------------------
 1149|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1150|       |
 1151|      0|  if(!url_match_http_multiplex(conn, m))
  ------------------
  |  Branch (1151:6): [True: 0, False: 0]
  ------------------
 1152|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1153|      0|  else if(m->wait_pipe)
  ------------------
  |  Branch (1153:11): [True: 0, False: 0]
  ------------------
 1154|       |    /* we decided to wait on PIPELINING */
 1155|      0|    return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 1156|       |
 1157|      0|  if(!url_match_auth(conn, m))
  ------------------
  |  Branch (1157:6): [True: 0, False: 0]
  ------------------
 1158|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1159|       |
 1160|      0|  if(!url_match_proto_config(conn, m))
  ------------------
  |  Branch (1160:6): [True: 0, False: 0]
  ------------------
 1161|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1162|       |
 1163|      0|  if(!url_match_auth_ntlm(conn, m))
  ------------------
  |  | 1066|      0|#define url_match_auth_ntlm(c, m) ((void)(c), (void)(m), TRUE)
  |  |  ------------------
  |  |  |  | 1051|      0|#define TRUE true
  |  |  ------------------
  ------------------
  |  Branch (1163:6): [True: 0, False: 0]
  ------------------
 1164|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1165|      0|  else if(m->force_reuse)
  ------------------
  |  Branch (1165:11): [True: 0, False: 0]
  ------------------
 1166|      0|    return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 1167|       |
 1168|      0|  if(!url_match_auth_nego(conn, m))
  ------------------
  |  | 1121|      0|#define url_match_auth_nego(c, m) ((void)(c), (void)(m), TRUE)
  |  |  ------------------
  |  |  |  | 1051|      0|#define TRUE true
  |  |  ------------------
  ------------------
  |  Branch (1168:6): [True: 0, False: 0]
  ------------------
 1169|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1170|      0|  else if(m->force_reuse)
  ------------------
  |  Branch (1170:11): [True: 0, False: 0]
  ------------------
 1171|      0|    return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 1172|       |
 1173|      0|  if(!url_match_multiplex_limits(conn, m))
  ------------------
  |  Branch (1173:6): [True: 0, False: 0]
  ------------------
 1174|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1175|       |
 1176|      0|  if(!CONN_INUSE(conn) && Curl_conn_seems_dead(conn, m->data, &m->now)) {
  ------------------
  |  |  284|      0|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  ------------------
  |  Branch (1176:6): [True: 0, False: 0]
  |  Branch (1176:27): [True: 0, False: 0]
  ------------------
 1177|       |    /* remove and disconnect. */
 1178|      0|    Curl_conn_terminate(m->data, conn, FALSE);
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1179|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1180|      0|  }
 1181|       |
 1182|       |  /* conn matches our needs. */
 1183|      0|  m->found = conn;
 1184|       |  return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 1185|      0|}
url.c:url_match_connect_config:
  713|    178|{
  714|       |  /* connect-only or to-be-closed connections will not be reused */
  715|    178|  if(conn->bits.connect_only || conn->bits.close || conn->bits.no_reuse)
  ------------------
  |  Branch (715:6): [True: 0, False: 178]
  |  Branch (715:33): [True: 0, False: 178]
  |  Branch (715:53): [True: 0, False: 178]
  ------------------
  716|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  717|       |
  718|       |  /* ip_version must match */
  719|    178|  if(m->data->set.ipver != CURL_IPRESOLVE_WHATEVER &&
  ------------------
  |  | 2309|    356|#define CURL_IPRESOLVE_WHATEVER 0L /* default, uses addresses to all IP
  ------------------
  |  Branch (719:6): [True: 0, False: 178]
  ------------------
  720|      0|     m->data->set.ipver != conn->ip_version)
  ------------------
  |  Branch (720:6): [True: 0, False: 0]
  ------------------
  721|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  722|       |
  723|    178|  if(m->needle->localdev || m->needle->localport) {
  ------------------
  |  Branch (723:6): [True: 0, False: 178]
  |  Branch (723:29): [True: 0, False: 178]
  ------------------
  724|       |    /* If we are bound to a specific local end (IP+port), we must not reuse a
  725|       |       random other one, although if we did not ask for a particular one we
  726|       |       can reuse one that was bound.
  727|       |
  728|       |       This comparison is a bit rough and too strict. Since the input
  729|       |       parameters can be specified in numerous ways and still end up the same
  730|       |       it would take a lot of processing to make it really accurate. Instead,
  731|       |       this matching will assume that reuses of bound connections will most
  732|       |       likely also reuse the exact same binding parameters and missing out a
  733|       |       few edge cases should not hurt anyone much.
  734|       |    */
  735|      0|    if((conn->localport != m->needle->localport) ||
  ------------------
  |  Branch (735:8): [True: 0, False: 0]
  ------------------
  736|      0|       (conn->localportrange != m->needle->localportrange) ||
  ------------------
  |  Branch (736:8): [True: 0, False: 0]
  ------------------
  737|      0|       (m->needle->localdev &&
  ------------------
  |  Branch (737:9): [True: 0, False: 0]
  ------------------
  738|      0|        (!conn->localdev || strcmp(conn->localdev, m->needle->localdev))))
  ------------------
  |  Branch (738:10): [True: 0, False: 0]
  |  Branch (738:29): [True: 0, False: 0]
  ------------------
  739|      0|      return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  740|      0|  }
  741|       |
  742|    178|  if(!m->needle->via_peer != !conn->via_peer)
  ------------------
  |  Branch (742:6): [True: 0, False: 178]
  ------------------
  743|       |    /* do not mix connections that use the "connect to host" feature and
  744|       |     * connections that do not use this feature */
  745|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  746|       |
  747|    178|  return TRUE;
  ------------------
  |  | 1051|    178|#define TRUE true
  ------------------
  748|    178|}
url.c:url_match_destination:
  973|    178|{
  974|       |  /* Different connect-to peers never match */
  975|    178|  if(!Curl_peer_same_destination(m->needle->via_peer, conn->via_peer))
  ------------------
  |  Branch (975:6): [True: 0, False: 178]
  ------------------
  976|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  977|       |
  978|    178|  if(m->needle->origin->scheme != conn->origin->scheme) {
  ------------------
  |  Branch (978:6): [True: 0, False: 178]
  ------------------
  979|       |    /* `needle` and `conn` not having the same scheme.
  980|       |     * This is allowed for the same family *if* conn is using TLS.
  981|       |     * - IMAP+STARTTLS works for IMAPS.
  982|       |     * - IMAPS works for IMAP. */
  983|      0|    if(get_protocol_family(conn->origin->scheme) !=
  ------------------
  |  Branch (983:8): [True: 0, False: 0]
  ------------------
  984|      0|       m->needle->scheme->protocol) {
  985|      0|      return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  986|      0|    }
  987|      0|  }
  988|       |  /* Scheme mismatch is acceptable, compare hostname/port */
  989|    178|  return Curl_peer_same_destination(m->needle->origin, conn->origin);
  990|    178|}
url.c:url_match_fully_connected:
  752|    178|{
  753|    178|  if(!Curl_conn_is_connected(conn, FIRSTSOCKET) ||
  ------------------
  |  |  245|    178|#define FIRSTSOCKET     0
  ------------------
  |  Branch (753:6): [True: 178, False: 0]
  ------------------
  754|    178|     conn->bits.upgrade_in_progress) {
  ------------------
  |  Branch (754:6): [True: 0, False: 0]
  ------------------
  755|       |    /* Not yet connected, or a protocol upgrade is in progress. The later
  756|       |     * happens for HTTP/2 Upgrade: requests that need a response. */
  757|    178|    if(m->may_multiplex) {
  ------------------
  |  Branch (757:8): [True: 178, False: 0]
  ------------------
  758|    178|      m->seen_pending_conn = TRUE;
  ------------------
  |  | 1051|    178|#define TRUE true
  ------------------
  759|       |      /* Do not pick a connection that has not connected yet */
  760|    178|      infof(m->data, "Connection #%" FMT_OFF_T
  ------------------
  |  |  143|    178|  do {                               \
  |  |  144|    178|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    178|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 178, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 178]
  |  |  |  |  ------------------
  |  |  |  |  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]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    178|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    178|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 178]
  |  |  ------------------
  ------------------
  761|    178|            " is not open enough, cannot reuse", conn->connection_id);
  762|    178|    }
  763|       |    /* Do not pick a connection that has not connected yet */
  764|    178|    return FALSE;
  ------------------
  |  | 1054|    178|#define FALSE false
  ------------------
  765|    178|  }
  766|      0|  return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  767|    178|}
url.c:url_match_result:
 1188|  8.09k|{
 1189|  8.09k|  struct url_conn_match *match = userdata;
 1190|  8.09k|  if(match->found) {
  ------------------
  |  Branch (1190:6): [True: 0, False: 8.09k]
  ------------------
 1191|       |    /* Attach it now while still under lock, so the connection does
 1192|       |     * no longer appear idle and can be reaped. */
 1193|      0|    Curl_attach_connection(match->data, match->found);
 1194|      0|    return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 1195|      0|  }
 1196|  8.09k|  else if(match->seen_single_use_conn && !match->seen_multiplex_conn) {
  ------------------
  |  Branch (1196:11): [True: 0, False: 8.09k]
  |  Branch (1196:42): [True: 0, False: 0]
  ------------------
 1197|       |    /* We have seen a single-use, existing connection to the destination and
 1198|       |     * no multiplexed one. It seems safe to assume that the server does
 1199|       |     * not support multiplexing. */
 1200|      0|    match->wait_pipe = FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1201|      0|  }
 1202|  8.09k|  else if(match->seen_pending_conn && match->data->set.pipewait) {
  ------------------
  |  Branch (1202:11): [True: 178, False: 7.92k]
  |  Branch (1202:39): [True: 178, False: 0]
  ------------------
 1203|    178|    infof(match->data,
  ------------------
  |  |  143|    178|  do {                               \
  |  |  144|    178|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    178|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 178, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 178]
  |  |  |  |  ------------------
  |  |  |  |  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]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    178|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    178|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 178]
  |  |  ------------------
  ------------------
 1204|    178|          "Found pending candidate for reuse and CURLOPT_PIPEWAIT is set");
 1205|    178|    match->wait_pipe = TRUE;
  ------------------
  |  | 1051|    178|#define TRUE true
  ------------------
 1206|    178|  }
 1207|  8.09k|  match->force_reuse = FALSE;
  ------------------
  |  | 1054|  8.09k|#define FALSE false
  ------------------
 1208|       |  return FALSE;
  ------------------
  |  | 1054|  8.09k|#define FALSE false
  ------------------
 1209|  8.09k|}

urlencode_str:
  132|  8.96k|{
  133|       |  /* we must add this with whitespace-replacing */
  134|  8.96k|  const unsigned char *iptr;
  135|  8.96k|  const unsigned char *host_sep = (const unsigned char *)url;
  136|  8.96k|  CURLcode result = CURLE_OK;
  137|       |
  138|  8.96k|  DEBUGASSERT((query >= QUERY_NO) && (query <= QUERY_YES));
  ------------------
  |  | 1077|  8.96k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (138:3): [True: 0, False: 8.96k]
  |  Branch (138:3): [True: 0, False: 0]
  |  Branch (138:3): [True: 8.96k, False: 0]
  |  Branch (138:3): [True: 8.96k, False: 0]
  ------------------
  139|       |
  140|  8.96k|  if(!relative) {
  ------------------
  |  Branch (140:6): [True: 0, False: 8.96k]
  ------------------
  141|      0|    size_t n;
  142|      0|    host_sep = (const unsigned char *)find_host_sep(url);
  143|       |
  144|       |    /* output the first piece as-is */
  145|      0|    n = (const char *)host_sep - url;
  146|      0|    result = curlx_dyn_addn(o, url, n);
  147|      0|    len -= n;
  148|      0|  }
  149|       |
  150|  16.0M|  for(iptr = host_sep; len && !result; iptr++, len--) {
  ------------------
  |  Branch (150:24): [True: 16.0M, False: 8.96k]
  |  Branch (150:31): [True: 16.0M, False: 0]
  ------------------
  151|  16.0M|    if(*iptr == ' ') {
  ------------------
  |  Branch (151:8): [True: 0, False: 16.0M]
  ------------------
  152|      0|      if(query != QUERY_YES)
  ------------------
  |  |   54|      0|#define QUERY_YES     4
  ------------------
  |  Branch (152:10): [True: 0, False: 0]
  ------------------
  153|      0|        result = curlx_dyn_addn(o, "%20", 3);
  154|      0|      else
  155|      0|        result = curlx_dyn_addn(o, "+", 1);
  156|      0|    }
  157|  16.0M|    else if((*iptr < ' ') || (*iptr >= 0x7f)) {
  ------------------
  |  Branch (157:13): [True: 0, False: 16.0M]
  |  Branch (157:30): [True: 6.66M, False: 9.37M]
  ------------------
  158|  6.66M|      unsigned char out[3] = { '%' };
  159|  6.66M|      Curl_hexbyte(&out[1], *iptr);
  160|  6.66M|      result = curlx_dyn_addn(o, out, 3);
  161|  6.66M|    }
  162|  9.37M|    else if(*iptr == '%' && (len >= 3) &&
  ------------------
  |  Branch (162:13): [True: 3.41M, False: 5.95M]
  |  Branch (162:29): [True: 3.41M, False: 93]
  ------------------
  163|  3.41M|            ISXDIGIT(iptr[1]) && ISXDIGIT(iptr[2]) &&
  ------------------
  |  |   39|  12.7M|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  6.82M|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 72.7k, False: 3.34M]
  |  |  |  |  |  Branch (44:38): [True: 12.1k, False: 60.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  6.81M|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 39.8k, False: 3.36M]
  |  |  |  |  |  Branch (27:43): [True: 9.09k, False: 30.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  3.39M|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 49.7k, False: 3.34M]
  |  |  |  |  |  Branch (28:43): [True: 14.4k, False: 35.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          ISXDIGIT(iptr[1]) && ISXDIGIT(iptr[2]) &&
  ------------------
  |  |   39|  9.40M|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  71.3k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 22.9k, False: 12.7k]
  |  |  |  |  |  Branch (44:38): [True: 4.74k, False: 18.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  66.6k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 9.93k, False: 21.0k]
  |  |  |  |  |  Branch (27:43): [True: 2.32k, False: 7.61k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  28.6k|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 15.1k, False: 13.4k]
  |  |  |  |  |  Branch (28:43): [True: 6.02k, False: 9.17k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  164|  13.0k|            (ISLOWER(iptr[1]) || ISLOWER(iptr[2]))) {
  ------------------
  |  |   43|  26.1k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 2.92k, False: 10.1k]
  |  |  |  Branch (43:38): [True: 2.92k, False: 0]
  |  |  ------------------
  ------------------
                          (ISLOWER(iptr[1]) || ISLOWER(iptr[2]))) {
  ------------------
  |  |   43|  10.1k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 881, False: 9.28k]
  |  |  |  Branch (43:38): [True: 881, False: 0]
  |  |  ------------------
  ------------------
  165|       |      /* uppercase it */
  166|  3.80k|      unsigned char hex = (unsigned char)((curlx_hexval(iptr[1]) << 4) |
  ------------------
  |  |  112|  3.80k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  167|  3.80k|                                          curlx_hexval(iptr[2]));
  ------------------
  |  |  112|  3.80k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  168|  3.80k|      unsigned char out[3] = { '%' };
  169|  3.80k|      Curl_hexbyte(&out[1], hex);
  170|  3.80k|      result = curlx_dyn_addn(o, out, 3);
  171|  3.80k|      iptr += 2;
  172|  3.80k|      len -= 2;
  173|  3.80k|    }
  174|  9.36M|    else {
  175|  9.36M|      result = curlx_dyn_addn(o, iptr, 1);
  176|  9.36M|      if(*iptr == '?' && (query == QUERY_NOT_YET))
  ------------------
  |  |   53|      0|#define QUERY_NOT_YET 3 /* allow to change to query */
  ------------------
  |  Branch (176:10): [True: 0, False: 9.36M]
  |  Branch (176:26): [True: 0, False: 0]
  ------------------
  177|      0|        query = QUERY_YES;
  ------------------
  |  |   54|      0|#define QUERY_YES     4
  ------------------
  178|  9.36M|    }
  179|  16.0M|  }
  180|       |
  181|  8.96k|  if(result)
  ------------------
  |  Branch (181:6): [True: 0, False: 8.96k]
  ------------------
  182|      0|    return cc2cu(result);
  ------------------
  |  |  107|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (107:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  183|  8.96k|  return CURLUE_OK;
  184|  8.96k|}
Curl_is_absolute_url:
  196|  24.2k|{
  197|  24.2k|  size_t i = 0;
  198|  24.2k|  DEBUGASSERT(!buf || (buflen > MAX_SCHEME_LEN));
  ------------------
  |  | 1077|  24.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (198:3): [True: 24.2k, False: 0]
  |  Branch (198:3): [True: 0, False: 0]
  |  Branch (198:3): [True: 12.4k, False: 11.7k]
  |  Branch (198:3): [True: 11.7k, False: 0]
  ------------------
  199|  24.2k|  (void)buflen; /* only used in debug-builds */
  200|  24.2k|  if(buf)
  ------------------
  |  Branch (200:6): [True: 11.7k, False: 12.4k]
  ------------------
  201|  11.7k|    buf[0] = 0; /* always leave a defined value in buf */
  202|       |#ifdef _WIN32
  203|       |  if(guess_scheme && STARTS_WITH_DRIVE_PREFIX(url))
  204|       |    return 0;
  205|       |#endif
  206|  24.2k|  if(ISALPHA(url[0]))
  ------------------
  |  |   38|  24.2k|#define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|  48.4k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 16.9k, False: 7.25k]
  |  |  |  |  |  Branch (43:38): [True: 16.8k, False: 77]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|  7.33k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 3.54k, False: 3.79k]
  |  |  |  |  |  Branch (42:38): [True: 3.21k, False: 326]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  207|  90.9k|    for(i = 1; i < MAX_SCHEME_LEN; ++i) {
  ------------------
  |  |   55|  90.9k|#define MAX_SCHEME_LEN 40
  ------------------
  |  Branch (207:16): [True: 90.9k, False: 36]
  ------------------
  208|  90.9k|      char s = url[i];
  209|  90.9k|      if(s && (ISALNUM(s) || (s == '+') || (s == '-') || (s == '.'))) {
  ------------------
  |  |   41|   178k|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   44|   178k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 84.0k, False: 5.25k]
  |  |  |  |  |  Branch (44:38): [True: 1.20k, False: 82.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|   177k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 61.1k, False: 27.0k]
  |  |  |  |  |  Branch (43:38): [True: 61.0k, False: 75]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|  27.0k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 4.54k, False: 22.5k]
  |  |  |  |  |  Branch (42:38): [True: 4.44k, False: 103]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (209:10): [True: 89.3k, False: 1.60k]
  |  Branch (209:30): [True: 243, False: 22.4k]
  |  Branch (209:44): [True: 681, False: 21.7k]
  |  Branch (209:58): [True: 3.24k, False: 18.4k]
  ------------------
  210|       |        /* RFC 3986 3.1 explains:
  211|       |           scheme      = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
  212|       |        */
  213|  70.8k|      }
  214|  20.0k|      else {
  215|  20.0k|        break;
  216|  20.0k|      }
  217|  90.9k|    }
  218|  24.2k|  if(i && (url[i] == ':') && ((url[i + 1] == '/') || !guess_scheme)) {
  ------------------
  |  Branch (218:6): [True: 20.1k, False: 4.11k]
  |  Branch (218:11): [True: 16.4k, False: 3.67k]
  |  Branch (218:31): [True: 16.2k, False: 230]
  |  Branch (218:54): [True: 0, False: 230]
  ------------------
  219|       |    /* If this does not guess scheme, the scheme always ends with the colon so
  220|       |       that this also detects data: URLs etc. In guessing mode, data: could
  221|       |       be the hostname "data" with a specified port number. */
  222|       |
  223|       |    /* the length of the scheme is the name part only */
  224|  16.2k|    size_t len = i;
  225|  16.2k|    if(buf) {
  ------------------
  |  Branch (225:8): [True: 8.05k, False: 8.15k]
  ------------------
  226|  8.05k|      Curl_strntolower(buf, url, i);
  227|  8.05k|      buf[i] = 0;
  228|  8.05k|    }
  229|  16.2k|    return len;
  230|  16.2k|  }
  231|  8.02k|  return 0;
  232|  24.2k|}
Curl_junkscan:
  236|  11.7k|{
  237|  11.7k|  size_t n = strlen(url);
  238|  11.7k|  size_t i;
  239|  11.7k|  unsigned char control;
  240|  11.7k|  const unsigned char *p = (const unsigned char *)url;
  241|  11.7k|  if(n > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|  11.7k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (241:6): [True: 0, False: 11.7k]
  ------------------
  242|      0|    return CURLUE_MALFORMED_INPUT;
  243|       |
  244|  11.7k|  control = allowspace ? 0x1f : 0x20;
  ------------------
  |  Branch (244:13): [True: 0, False: 11.7k]
  ------------------
  245|  27.5M|  for(i = 0; i < n; i++) {
  ------------------
  |  Branch (245:14): [True: 27.5M, False: 11.7k]
  ------------------
  246|  27.5M|    if(p[i] <= control || p[i] == 127)
  ------------------
  |  Branch (246:8): [True: 41, False: 27.5M]
  |  Branch (246:27): [True: 3, False: 27.5M]
  ------------------
  247|     44|      return CURLUE_MALFORMED_INPUT;
  248|  27.5M|  }
  249|  11.7k|  *urllen = n;
  250|  11.7k|  return CURLUE_OK;
  251|  11.7k|}
parse_hostname_login:
  271|  11.5k|{
  272|  11.5k|  CURLUcode ures = CURLUE_OK;
  273|  11.5k|  CURLcode result;
  274|  11.5k|  char *userp = NULL;
  275|  11.5k|  char *passwdp = NULL;
  276|  11.5k|  char *optionsp = NULL;
  277|  11.5k|  const struct Curl_scheme *h = NULL;
  278|       |
  279|       |  /* At this point, we assume all the other special cases have been taken
  280|       |   * care of, so the host is at most
  281|       |   *
  282|       |   *   [user[:password][;options]]@]hostname
  283|       |   *
  284|       |   * We need somewhere to put the embedded details, so do that first.
  285|       |   */
  286|  11.5k|  const char *ptr;
  287|       |
  288|  11.5k|  DEBUGASSERT(login);
  ------------------
  |  | 1077|  11.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (288:3): [True: 0, False: 11.5k]
  |  Branch (288:3): [True: 11.5k, False: 0]
  ------------------
  289|       |
  290|  11.5k|  *hostname_offset = 0;
  291|  11.5k|  ptr = memchr(login, '@', len);
  292|  11.5k|  if(!ptr)
  ------------------
  |  Branch (292:6): [True: 9.81k, False: 1.74k]
  ------------------
  293|  9.81k|    goto out;
  294|       |
  295|       |  /* We will now try to extract the
  296|       |   * possible login information in a string like:
  297|       |   * ftp://user:password@ftp.site.example:8021/README */
  298|  1.74k|  ptr++;
  299|       |
  300|       |  /* if this is a known scheme, get some details */
  301|  1.74k|  if(u->scheme)
  ------------------
  |  Branch (301:6): [True: 547, False: 1.19k]
  ------------------
  302|    547|    h = Curl_get_scheme(u->scheme);
  303|       |
  304|       |  /* We could use the login information in the URL so extract it. Only parse
  305|       |     options if the handler says we should. Note that 'h' might be NULL! */
  306|  1.74k|  result = Curl_parse_login_details(login, ptr - login - 1,
  307|  1.74k|                                    &userp, &passwdp,
  308|  1.74k|                                    (h && (h->flags & PROTOPT_URLOPTIONS)) ?
  ------------------
  |  |  225|    530|#define PROTOPT_URLOPTIONS (1 << 10) /* allow options part in the userinfo
  ------------------
  |  Branch (308:38): [True: 530, False: 1.21k]
  |  Branch (308:43): [True: 3, False: 527]
  ------------------
  309|  1.74k|                                    &optionsp : NULL);
  310|  1.74k|  if(result) {
  ------------------
  |  Branch (310:6): [True: 0, False: 1.74k]
  ------------------
  311|       |    /* the only possible error from Curl_parse_login_details is out of
  312|       |       memory: */
  313|      0|    ures = CURLUE_OUT_OF_MEMORY;
  314|      0|    goto out;
  315|      0|  }
  316|       |
  317|  1.74k|  if(userp) {
  ------------------
  |  Branch (317:6): [True: 1.74k, False: 0]
  ------------------
  318|  1.74k|    if(flags & CURLU_DISALLOW_USER) {
  ------------------
  |  |   92|  1.74k|#define CURLU_DISALLOW_USER (1 << 5)      /* no user+password allowed */
  ------------------
  |  Branch (318:8): [True: 1, False: 1.74k]
  ------------------
  319|       |      /* Option DISALLOW_USER is set and URL contains username. */
  320|      1|      ures = CURLUE_USER_NOT_ALLOWED;
  321|      1|      goto out;
  322|      1|    }
  323|  1.74k|    curlx_free(u->user);
  ------------------
  |  | 1488|  1.74k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  324|  1.74k|    u->user = userp;
  325|  1.74k|  }
  326|       |
  327|  1.74k|  if(passwdp) {
  ------------------
  |  Branch (327:6): [True: 342, False: 1.39k]
  ------------------
  328|    342|    curlx_free(u->password);
  ------------------
  |  | 1488|    342|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  329|    342|    u->password = passwdp;
  330|    342|  }
  331|       |
  332|  1.74k|  if(optionsp) {
  ------------------
  |  Branch (332:6): [True: 1, False: 1.74k]
  ------------------
  333|      1|    curlx_free(u->options);
  ------------------
  |  | 1488|      1|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  334|      1|    u->options = optionsp;
  335|      1|  }
  336|       |
  337|       |  /* the hostname starts at this offset */
  338|  1.74k|  *hostname_offset = ptr - login;
  339|  1.74k|  return CURLUE_OK;
  340|       |
  341|  9.81k|out:
  342|       |
  343|  9.81k|  curlx_free(userp);
  ------------------
  |  | 1488|  9.81k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  344|  9.81k|  curlx_free(passwdp);
  ------------------
  |  | 1488|  9.81k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  345|  9.81k|  curlx_free(optionsp);
  ------------------
  |  | 1488|  9.81k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  346|  9.81k|  curlx_safefree(u->user);
  ------------------
  |  | 1332|  9.81k|  do {                      \
  |  | 1333|  9.81k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  9.81k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  9.81k|    (ptr) = NULL;           \
  |  | 1335|  9.81k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 9.81k]
  |  |  ------------------
  ------------------
  347|  9.81k|  curlx_safefree(u->password);
  ------------------
  |  | 1332|  9.81k|  do {                      \
  |  | 1333|  9.81k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  9.81k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  9.81k|    (ptr) = NULL;           \
  |  | 1335|  9.81k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 9.81k]
  |  |  ------------------
  ------------------
  348|  9.81k|  curlx_safefree(u->options);
  ------------------
  |  | 1332|  9.81k|  do {                      \
  |  | 1333|  9.81k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  9.81k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  9.81k|    (ptr) = NULL;           \
  |  | 1335|  9.81k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 9.81k]
  |  |  ------------------
  ------------------
  349|       |
  350|  9.81k|  return ures;
  351|  1.74k|}
parse_port:
  358|  11.5k|{
  359|  11.5k|  const char *portptr;
  360|  11.5k|  const char *hostname = curlx_dyn_ptr(host);
  361|       |  /*
  362|       |   * Find the end of an IPv6 address on the ']' ending bracket.
  363|       |   */
  364|  11.5k|  u->portnum = 0;
  365|  11.5k|  u->port_present = FALSE;
  ------------------
  |  | 1054|  11.5k|#define FALSE false
  ------------------
  366|  11.5k|  if(hostname[0] == '[') {
  ------------------
  |  Branch (366:6): [True: 243, False: 11.3k]
  ------------------
  367|    243|    portptr = strchr(hostname, ']');
  368|    243|    if(!portptr)
  ------------------
  |  Branch (368:8): [True: 4, False: 239]
  ------------------
  369|      4|      return CURLUE_BAD_IPV6;
  370|    239|    portptr++;
  371|       |    /* this is a RFC2732-style specified IP-address */
  372|    239|    if(*portptr) {
  ------------------
  |  Branch (372:8): [True: 21, False: 218]
  ------------------
  373|     21|      if(*portptr != ':')
  ------------------
  |  Branch (373:10): [True: 5, False: 16]
  ------------------
  374|      5|        return CURLUE_BAD_PORT_NUMBER;
  375|     21|    }
  376|    218|    else
  377|    218|      portptr = NULL;
  378|    239|  }
  379|  11.3k|  else
  380|  11.3k|    portptr = strchr(hostname, ':');
  381|       |
  382|  11.5k|  if(portptr) {
  ------------------
  |  Branch (382:6): [True: 490, False: 11.0k]
  ------------------
  383|    490|    curl_off_t port;
  384|    490|    size_t keep = portptr - hostname;
  385|       |
  386|       |    /* Browser behavior adaptation. If there is a colon with no digits after,
  387|       |       cut off the name there which makes us ignore the colon and use the
  388|       |       default port. Firefox, Chrome and Safari all do that.
  389|       |
  390|       |       Do not do it if the URL has no scheme, to make something that looks like
  391|       |       a scheme not work!
  392|       |    */
  393|    490|    curlx_dyn_setlen(host, keep);
  394|    490|    portptr++;
  395|    490|    if(!*portptr)
  ------------------
  |  Branch (395:8): [True: 208, False: 282]
  ------------------
  396|    208|      return has_scheme ? CURLUE_OK : CURLUE_BAD_PORT_NUMBER;
  ------------------
  |  Branch (396:14): [True: 158, False: 50]
  ------------------
  397|       |
  398|    282|    if(curlx_str_number(&portptr, &port, 0xffff) || *portptr)
  ------------------
  |  Branch (398:8): [True: 18, False: 264]
  |  Branch (398:53): [True: 6, False: 258]
  ------------------
  399|     24|      return CURLUE_BAD_PORT_NUMBER;
  400|       |
  401|    258|    u->portnum = (uint16_t)port;
  402|    258|    u->port_present = TRUE;
  ------------------
  |  | 1051|    258|#define TRUE true
  ------------------
  403|    258|  }
  404|       |
  405|  11.3k|  return CURLUE_OK;
  406|  11.5k|}
ipv6_parse:
  417|    265|{
  418|    265|  size_t len;
  419|    265|  DEBUGASSERT(*hostname == '[');
  ------------------
  |  | 1077|    265|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (419:3): [True: 0, False: 265]
  |  Branch (419:3): [True: 265, False: 0]
  ------------------
  420|    265|  if(hlen < 4) /* '[::]' is the shortest possible valid string */
  ------------------
  |  Branch (420:6): [True: 4, False: 261]
  ------------------
  421|      4|    return CURLUE_BAD_IPV6;
  422|    261|  hostname++;
  423|    261|  hlen -= 2;
  424|       |
  425|       |  /* only valid IPv6 letters are ok */
  426|    261|  len = strspn(hostname, "0123456789abcdefABCDEF:.");
  427|       |
  428|    261|  if(hlen != len) {
  ------------------
  |  Branch (428:6): [True: 72, False: 189]
  ------------------
  429|     72|    hlen = len;
  430|     72|    if(hostname[len] == '%') {
  ------------------
  |  Branch (430:8): [True: 65, False: 7]
  ------------------
  431|       |      /* this could now be '%[zone id]' */
  432|     65|      char zoneid[MAX_ZONEID_LEN];
  433|     65|      int i = 0;
  434|     65|      char *h = &hostname[len + 1];
  435|       |      /* pass '25' if present and is a URL encoded percent sign */
  436|     65|      if(!strncmp(h, "25", 2) && h[2] && (h[2] != ']'))
  ------------------
  |  Branch (436:10): [True: 7, False: 58]
  |  Branch (436:34): [True: 4, False: 3]
  |  Branch (436:42): [True: 3, False: 1]
  ------------------
  437|      3|        h += 2;
  438|    333|      while(*h && (*h != ']') && (i < (MAX_ZONEID_LEN - 1)))
  ------------------
  |  |   56|    276|#define MAX_ZONEID_LEN 16
  ------------------
  |  Branch (438:13): [True: 318, False: 15]
  |  Branch (438:19): [True: 276, False: 42]
  |  Branch (438:34): [True: 268, False: 8]
  ------------------
  439|    268|        zoneid[i++] = *h++;
  440|     65|      if(!i || (']' != *h))
  ------------------
  |  Branch (440:10): [True: 4, False: 61]
  |  Branch (440:16): [True: 23, False: 38]
  ------------------
  441|     27|        return CURLUE_BAD_IPV6;
  442|     38|      zoneid[i] = 0;
  443|     38|      u->zoneid = curlx_strdup(zoneid);
  ------------------
  |  | 1482|     38|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  444|     38|      if(!u->zoneid)
  ------------------
  |  Branch (444:10): [True: 0, False: 38]
  ------------------
  445|      0|        return CURLUE_OUT_OF_MEMORY;
  446|     38|      hostname[len] = ']'; /* insert end bracket */
  447|     38|      hostname[len + 1] = 0; /* terminate the hostname */
  448|     38|    }
  449|      7|    else
  450|      7|      return CURLUE_BAD_IPV6;
  451|       |    /* hostname is fine */
  452|     72|  }
  453|       |
  454|       |  /* Normalize the IPv6 address */
  455|    227|  {
  456|    227|    char dest[16]; /* fits a binary IPv6 address */
  457|    227|    hostname[hlen] = 0; /* end the address there */
  458|    227|    if(curlx_inet_pton(AF_INET6, hostname, dest) != 1)
  ------------------
  |  Branch (458:8): [True: 26, False: 201]
  ------------------
  459|     26|      return CURLUE_BAD_IPV6;
  460|    201|    if(curlx_inet_ntop(AF_INET6, dest, hostname, hlen + 1)) {
  ------------------
  |  Branch (460:8): [True: 170, False: 31]
  ------------------
  461|    170|      hlen = strlen(hostname); /* might be shorter now */
  462|    170|      hostname[hlen + 1] = 0;
  463|    170|    }
  464|    201|    hostname[hlen] = ']'; /* restore ending bracket */
  465|    201|  }
  466|      0|  return CURLUE_OK;
  467|    227|}
ipv4_normalize:
  515|  11.4k|{
  516|  11.4k|  bool done = FALSE;
  ------------------
  |  | 1054|  11.4k|#define FALSE false
  ------------------
  517|  11.4k|  int n = 0;
  518|  11.4k|  const char *c = curlx_dyn_ptr(host);
  519|  11.4k|  unsigned int parts[4] = { 0, 0, 0, 0 };
  520|  11.4k|  CURLcode result = CURLE_OK;
  521|       |
  522|  11.4k|  if(*c == '[')
  ------------------
  |  Branch (522:6): [True: 265, False: 11.1k]
  ------------------
  523|    265|    return HOST_IPV6;
  ------------------
  |  |   50|    265|#define HOST_IPV6    3
  ------------------
  524|       |
  525|  16.2k|  while(!done) {
  ------------------
  |  Branch (525:9): [True: 12.2k, False: 3.97k]
  ------------------
  526|  12.2k|    int rc;
  527|  12.2k|    curl_off_t l;
  528|  12.2k|    if(*c == '0') {
  ------------------
  |  Branch (528:8): [True: 1.42k, False: 10.8k]
  ------------------
  529|  1.42k|      if(Curl_raw_tolower(c[1]) == 'x') {
  ------------------
  |  Branch (529:10): [True: 69, False: 1.35k]
  ------------------
  530|     69|        c += 2; /* skip the prefix */
  531|     69|        rc = curlx_str_hex(&c, &l, UINT_MAX);
  532|     69|        if(rc)
  ------------------
  |  Branch (532:12): [True: 10, False: 59]
  ------------------
  533|     10|          return HOST_NAME;
  ------------------
  |  |   48|     10|#define HOST_NAME    1
  ------------------
  534|     69|      }
  535|  1.35k|      else
  536|  1.35k|        rc = curlx_str_octal(&c, &l, UINT_MAX);
  537|  1.42k|    }
  538|  10.8k|    else
  539|  10.8k|      rc = curlx_str_number(&c, &l, UINT_MAX);
  540|       |
  541|  12.2k|    if(rc) {
  ------------------
  |  Branch (541:8): [True: 6.93k, False: 5.30k]
  ------------------
  542|  6.93k|      if(!n || (rc != STRE_NO_NUM) || *c)
  ------------------
  |  |   36|    100|#define STRE_NO_NUM   8
  ------------------
  |  Branch (542:10): [True: 6.83k, False: 100]
  |  Branch (542:16): [True: 8, False: 92]
  |  Branch (542:39): [True: 36, False: 56]
  ------------------
  543|  6.87k|        return HOST_NAME;
  ------------------
  |  |   48|  6.87k|#define HOST_NAME    1
  ------------------
  544|     56|      n--;
  545|     56|    }
  546|  5.30k|    else
  547|  5.30k|      parts[n] = (unsigned int)l;
  548|       |
  549|  5.35k|    switch(*c) {
  550|  1.07k|    case '.':
  ------------------
  |  Branch (550:5): [True: 1.07k, False: 4.28k]
  ------------------
  551|  1.07k|      if(n == 3) {
  ------------------
  |  Branch (551:10): [True: 25, False: 1.04k]
  ------------------
  552|     25|        if(c[1])
  ------------------
  |  Branch (552:12): [True: 16, False: 9]
  ------------------
  553|       |          /* something follows this dot */
  554|     16|          return HOST_NAME;
  ------------------
  |  |   48|     16|#define HOST_NAME    1
  ------------------
  555|      9|        done = TRUE;
  ------------------
  |  | 1051|      9|#define TRUE true
  ------------------
  556|      9|      }
  557|  1.04k|      else {
  558|  1.04k|        n++;
  559|  1.04k|        c++;
  560|  1.04k|      }
  561|  1.05k|      break;
  562|       |
  563|  3.96k|    case '\0':
  ------------------
  |  Branch (563:5): [True: 3.96k, False: 1.39k]
  ------------------
  564|  3.96k|      done = TRUE;
  ------------------
  |  | 1051|  3.96k|#define TRUE true
  ------------------
  565|  3.96k|      break;
  566|       |
  567|    321|    default:
  ------------------
  |  Branch (567:5): [True: 321, False: 5.03k]
  ------------------
  568|    321|      return HOST_NAME;
  ------------------
  |  |   48|    321|#define HOST_NAME    1
  ------------------
  569|  5.35k|    }
  570|  5.35k|  }
  571|       |
  572|  3.97k|  switch(n) {
  ------------------
  |  Branch (572:10): [True: 3.97k, False: 0]
  ------------------
  573|  3.56k|  case 0: /* a -- 32 bits */
  ------------------
  |  Branch (573:3): [True: 3.56k, False: 413]
  ------------------
  574|  3.56k|    curlx_dyn_reset(host);
  575|       |
  576|  3.56k|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  577|  3.56k|                            (parts[0] >> 24),
  578|  3.56k|                            ((parts[0] >> 16) & 0xff),
  579|  3.56k|                            ((parts[0] >> 8) & 0xff),
  580|  3.56k|                            (parts[0] & 0xff));
  581|  3.56k|    break;
  582|    117|  case 1: /* a.b -- 8.24 bits */
  ------------------
  |  Branch (582:3): [True: 117, False: 3.85k]
  ------------------
  583|    117|    if((parts[0] > 0xff) || (parts[1] > 0xffffff))
  ------------------
  |  Branch (583:8): [True: 45, False: 72]
  |  Branch (583:29): [True: 20, False: 52]
  ------------------
  584|     65|      return HOST_NAME;
  ------------------
  |  |   48|     65|#define HOST_NAME    1
  ------------------
  585|     52|    curlx_dyn_reset(host);
  586|     52|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  587|     52|                            parts[0],
  588|     52|                            ((parts[1] >> 16) & 0xff),
  589|     52|                            ((parts[1] >> 8) & 0xff),
  590|     52|                            (parts[1] & 0xff));
  591|     52|    break;
  592|    124|  case 2: /* a.b.c -- 8.8.16 bits */
  ------------------
  |  Branch (592:3): [True: 124, False: 3.84k]
  ------------------
  593|    124|    if((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xffff))
  ------------------
  |  Branch (593:8): [True: 32, False: 92]
  |  Branch (593:29): [True: 38, False: 54]
  |  Branch (593:50): [True: 31, False: 23]
  ------------------
  594|    101|      return HOST_NAME;
  ------------------
  |  |   48|    101|#define HOST_NAME    1
  ------------------
  595|     23|    curlx_dyn_reset(host);
  596|     23|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  597|     23|                            parts[0],
  598|     23|                            parts[1],
  599|     23|                            ((parts[2] >> 8) & 0xff),
  600|     23|                            (parts[2] & 0xff));
  601|     23|    break;
  602|    172|  case 3: /* a.b.c.d -- 8.8.8.8 bits */
  ------------------
  |  Branch (602:3): [True: 172, False: 3.80k]
  ------------------
  603|    172|    if((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xff) ||
  ------------------
  |  Branch (603:8): [True: 29, False: 143]
  |  Branch (603:29): [True: 36, False: 107]
  |  Branch (603:50): [True: 38, False: 69]
  ------------------
  604|     69|       (parts[3] > 0xff))
  ------------------
  |  Branch (604:8): [True: 46, False: 23]
  ------------------
  605|    149|      return HOST_NAME;
  ------------------
  |  |   48|    149|#define HOST_NAME    1
  ------------------
  606|     23|    curlx_dyn_reset(host);
  607|     23|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  608|     23|                            parts[0],
  609|     23|                            parts[1],
  610|     23|                            parts[2],
  611|     23|                            parts[3]);
  612|     23|    break;
  613|  3.97k|  }
  614|  3.65k|  if(result)
  ------------------
  |  Branch (614:6): [True: 0, False: 3.65k]
  ------------------
  615|      0|    return HOST_ERROR;
  ------------------
  |  |   47|      0|#define HOST_ERROR   (-1) /* out of memory */
  ------------------
  616|  3.65k|  return HOST_IPV4;
  ------------------
  |  |   49|  3.65k|#define HOST_IPV4    2
  ------------------
  617|  3.65k|}
dedotdotify:
  761|  1.85k|{
  762|  1.85k|  struct dynbuf out;
  763|  1.85k|  CURLcode result = CURLE_OK;
  764|       |
  765|       |  /* variables for leading dot checks */
  766|  1.85k|  const char *dinput = input;
  767|  1.85k|  size_t dlen = clen;
  768|       |
  769|  1.85k|  *outp = NULL;
  770|       |  /* a single byte path cannot be cleaned up */
  771|  1.85k|  if(clen < 2)
  ------------------
  |  Branch (771:6): [True: 8, False: 1.84k]
  ------------------
  772|      8|    return 0;
  773|       |
  774|  1.84k|  curlx_dyn_init(&out, clen + 1);
  775|       |
  776|       |  /* if the input buffer begins with a prefix of "../" or "./", then remove
  777|       |     that prefix from the input buffer; otherwise, */
  778|  1.84k|  if(is_dot(&dinput, &dlen)) {
  ------------------
  |  Branch (778:6): [True: 0, False: 1.84k]
  ------------------
  779|      0|    if(ISSLASH(*dinput)) {
  ------------------
  |  |  742|      0|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (742:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  780|       |      /* one dot followed by a slash */
  781|      0|      input = dinput + 1;
  782|      0|      clen = dlen - 1;
  783|      0|    }
  784|       |
  785|       |    /* if the input buffer consists only of "." or "..", then remove
  786|       |       that from the input buffer; otherwise, */
  787|      0|    else if(is_dot(&dinput, &dlen)) {
  ------------------
  |  Branch (787:13): [True: 0, False: 0]
  ------------------
  788|      0|      if(!dlen)
  ------------------
  |  Branch (788:10): [True: 0, False: 0]
  ------------------
  789|       |        /* .. [end] */
  790|      0|        goto end;
  791|      0|      else if(ISSLASH(*dinput)) {
  ------------------
  |  |  742|      0|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (742:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  792|       |        /* ../ */
  793|      0|        input = dinput + 1;
  794|      0|        clen = dlen - 1;
  795|      0|      }
  796|      0|    }
  797|      0|  }
  798|       |
  799|  18.3M|  while(clen && !result) { /* until end of path content */
  ------------------
  |  Branch (799:9): [True: 18.3M, False: 1.79k]
  |  Branch (799:17): [True: 18.3M, False: 0]
  ------------------
  800|  18.3M|    if(ISSLASH(*input)) {
  ------------------
  |  |  742|  18.3M|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (742:20): [True: 4.51M, False: 13.7M]
  |  |  ------------------
  ------------------
  801|  4.51M|      const char *p = &input[1];
  802|  4.51M|      size_t blen = clen - 1;
  803|       |      /* if the input buffer begins with a prefix of "/./" or "/.", where "."
  804|       |         is a complete path segment, then replace that prefix with "/" in the
  805|       |         input buffer; otherwise, */
  806|  4.51M|      if(is_dot(&p, &blen)) {
  ------------------
  |  Branch (806:10): [True: 109k, False: 4.40M]
  ------------------
  807|   109k|        if(!blen) { /* /. */
  ------------------
  |  Branch (807:12): [True: 27, False: 109k]
  ------------------
  808|     27|          result = curlx_dyn_addn(&out, "/", 1);
  809|     27|          break;
  810|     27|        }
  811|   109k|        else if(ISSLASH(*p)) { /* /./ */
  ------------------
  |  |  742|   109k|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (742:20): [True: 8.37k, False: 100k]
  |  |  ------------------
  ------------------
  812|  8.37k|          input = p;
  813|  8.37k|          clen = blen;
  814|  8.37k|          continue;
  815|  8.37k|        }
  816|       |
  817|       |        /* if the input buffer begins with a prefix of "/../" or "/..", where
  818|       |           ".." is a complete path segment, then replace that prefix with "/"
  819|       |           in the input buffer and remove the last segment and its preceding
  820|       |           "/" (if any) from the output buffer; otherwise, */
  821|   100k|        else if(is_dot(&p, &blen) && (ISSLASH(*p) || !blen)) {
  ------------------
  |  |  742|   157k|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (742:20): [True: 61.1k, False: 17.6k]
  |  |  ------------------
  ------------------
  |  Branch (821:17): [True: 78.7k, False: 22.1k]
  |  Branch (821:54): [True: 26, False: 17.5k]
  ------------------
  822|       |          /* remove the last segment from the output buffer */
  823|  61.1k|          size_t len = curlx_dyn_len(&out);
  824|  61.1k|          if(len) {
  ------------------
  |  Branch (824:14): [True: 60.1k, False: 939]
  ------------------
  825|  60.1k|            const char *ptr = curlx_dyn_ptr(&out);
  826|  60.1k|            const char *last = memrchr(ptr, '/', len);
  827|  60.1k|            if(last)
  ------------------
  |  Branch (827:16): [True: 60.1k, False: 0]
  ------------------
  828|       |              /* trim the output at the slash */
  829|  60.1k|              curlx_dyn_setlen(&out, last - ptr);
  830|  60.1k|          }
  831|       |
  832|  61.1k|          if(blen) { /* /../ */
  ------------------
  |  Branch (832:14): [True: 61.1k, False: 26]
  ------------------
  833|  61.1k|            input = p;
  834|  61.1k|            clen = blen;
  835|  61.1k|            continue;
  836|  61.1k|          }
  837|     26|          result = curlx_dyn_addn(&out, "/", 1);
  838|     26|          break;
  839|  61.1k|        }
  840|   109k|      }
  841|  4.51M|    }
  842|       |
  843|       |    /* move the first path segment in the input buffer to the end of the
  844|       |       output buffer, including the initial "/" character (if any) and any
  845|       |       subsequent characters up to, but not including, the next "/" character
  846|       |       or the end of the input buffer. */
  847|       |
  848|  18.2M|    result = curlx_dyn_addn(&out, input, 1);
  849|  18.2M|    input++;
  850|  18.2M|    clen--;
  851|  18.2M|  }
  852|  1.84k|end:
  853|  1.84k|  if(!result) {
  ------------------
  |  Branch (853:6): [True: 1.84k, False: 0]
  ------------------
  854|  1.84k|    if(curlx_dyn_len(&out))
  ------------------
  |  Branch (854:8): [True: 1.84k, False: 0]
  ------------------
  855|  1.84k|      *outp = curlx_dyn_ptr(&out);
  856|      0|    else {
  857|      0|      *outp = curlx_strdup("");
  ------------------
  |  | 1482|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  858|      0|      if(!*outp)
  ------------------
  |  Branch (858:10): [True: 0, False: 0]
  ------------------
  859|      0|        return 1;
  860|      0|    }
  861|  1.84k|  }
  862|  1.84k|  return result ? 1 : 0; /* success */
  ------------------
  |  Branch (862:10): [True: 0, False: 1.84k]
  ------------------
  863|  1.84k|}
parse_file:
  872|    107|{
  873|    107|  const char *path;
  874|    107|  size_t pathlen;
  875|       |
  876|    107|  *pathp = NULL;
  877|    107|  *pathlenp = 0;
  878|    107|  if(urllen <= 6)
  ------------------
  |  Branch (878:6): [True: 4, False: 103]
  ------------------
  879|       |    /* file:/ is not enough to actually be a complete file: URL */
  880|      4|    return CURLUE_BAD_FILE_URL;
  881|       |
  882|       |  /* path has been allocated large enough to hold this */
  883|    103|  path = &url[5];
  884|    103|  pathlen = urllen - 5;
  885|       |
  886|       |  /* RFC 8089: file-hier-part = ( "//" auth-path ) / local-path, where
  887|       |     local-path also starts with a "/". So reject anything that does not
  888|       |     start with at least one "/" */
  889|    103|  if(path[0] != '/')
  ------------------
  |  Branch (889:6): [True: 0, False: 103]
  ------------------
  890|      0|    return CURLUE_BAD_FILE_URL;
  891|       |
  892|       |  /* Extra handling URLs with an authority component (i.e. that start with
  893|       |   * "file://")
  894|       |   *
  895|       |   * We allow omitted hostname (e.g. file:/<path>) -- valid according to
  896|       |   * RFC 8089, but not the (current) WHAT-WG URL spec.
  897|       |   */
  898|    103|  if(path[1] == '/') {
  ------------------
  |  Branch (898:6): [True: 39, False: 64]
  ------------------
  899|       |    /* swallow the two slashes */
  900|     39|    const char *ptr = &path[2];
  901|       |
  902|       |    /*
  903|       |     * According to RFC 8089, a file: URL can be reliably dereferenced if:
  904|       |     *
  905|       |     *  o it has no/blank hostname, or
  906|       |     *
  907|       |     *  o the hostname matches "localhost" (case-insensitively), or
  908|       |     *
  909|       |     *  o the hostname is a FQDN that resolves to this machine, or
  910|       |     *
  911|       |     * For brevity, we only consider URLs with empty, "localhost", or
  912|       |     * "127.0.0.1" hostnames as local, otherwise as an UNC String.
  913|       |     *
  914|       |     * Additionally, there is an exception for URLs with a Windows drive
  915|       |     * letter in the authority (which was accidentally omitted from RFC 8089
  916|       |     * Appendix E, but believe me, it was meant to be there. --MK)
  917|       |     */
  918|     39|    if(ptr[0] != '/' && !STARTS_WITH_URL_DRIVE_PREFIX(ptr)) {
  ------------------
  |  |   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: 17, False: 6]
  |  |  |  Branch (50:25): [True: 14, False: 3]
  |  |  ------------------
  |  |   51|     36|   ((str)[1] == ':' || (str)[1] == '|') &&                 \
  |  |  ------------------
  |  |  |  Branch (51:5): [True: 12, False: 15]
  |  |  |  Branch (51:24): [True: 3, False: 12]
  |  |  ------------------
  |  |   52|     36|   ((str)[2] == '/' || (str)[2] == '\\' || (str)[2] == 0))
  |  |  ------------------
  |  |  |  Branch (52:5): [True: 3, False: 12]
  |  |  |  Branch (52:24): [True: 3, False: 9]
  |  |  |  Branch (52:44): [True: 4, False: 5]
  |  |  ------------------
  ------------------
  |  Branch (918:8): [True: 36, False: 3]
  ------------------
  919|       |      /* the URL includes a hostname, it must match "localhost" or
  920|       |         "127.0.0.1" to be valid */
  921|     26|      if(checkprefix("localhost/", ptr) ||
  ------------------
  |  |   33|     52|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|     26|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 25]
  |  |  ------------------
  ------------------
  922|     25|         checkprefix("127.0.0.1/", ptr)) {
  ------------------
  |  |   33|     25|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|     25|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 24]
  |  |  ------------------
  ------------------
  923|      2|        ptr += 9; /* now points to the slash after the host */
  924|      2|      }
  925|     24|      else
  926|       |        /* Invalid file://hostname/, expected localhost or 127.0.0.1 or
  927|       |           none */
  928|     24|        return CURLUE_BAD_FILE_URL;
  929|     26|    }
  930|       |
  931|     15|    path = ptr;
  932|     15|    pathlen = urllen - (ptr - url);
  933|     15|  }
  934|       |
  935|     79|#if !defined(_WIN32) && !defined(MSDOS) && !defined(__CYGWIN__)
  936|       |  /* Do not allow Windows drive letters when not in Windows.
  937|       |   * This catches both "file:/c:" and "file:c:" */
  938|     79|  if(('/' == path[0] && STARTS_WITH_URL_DRIVE_PREFIX(&path[1])) ||
  ------------------
  |  |   49|     69|  ((('a' <= (str)[0] && (str)[0] <= 'z') ||                \
  |  |  ------------------
  |  |  |  Branch (49:6): [True: 14, False: 55]
  |  |  |  Branch (49:25): [True: 11, False: 3]
  |  |  ------------------
  |  |   50|     69|    ('A' <= (str)[0] && (str)[0] <= 'Z')) &&               \
  |  |  ------------------
  |  |  |  Branch (50:6): [True: 14, False: 44]
  |  |  |  Branch (50:25): [True: 10, False: 4]
  |  |  ------------------
  |  |   51|     69|   ((str)[1] == ':' || (str)[1] == '|') &&                 \
  |  |  ------------------
  |  |  |  Branch (51:5): [True: 9, False: 12]
  |  |  |  Branch (51:24): [True: 4, False: 8]
  |  |  ------------------
  |  |   52|     69|   ((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: 4, False: 3]
  |  |  ------------------
  ------------------
  |  Branch (938:7): [True: 69, False: 10]
  ------------------
  939|     69|     STARTS_WITH_URL_DRIVE_PREFIX(path)) {
  ------------------
  |  |   49|     69|  ((('a' <= (str)[0] && (str)[0] <= 'z') ||                \
  |  |  ------------------
  |  |  |  Branch (49:6): [True: 4, False: 65]
  |  |  |  Branch (49:25): [True: 4, False: 0]
  |  |  ------------------
  |  |   50|     69|    ('A' <= (str)[0] && (str)[0] <= 'Z')) &&               \
  |  |  ------------------
  |  |  |  Branch (50:6): [True: 6, False: 59]
  |  |  |  Branch (50:25): [True: 6, False: 0]
  |  |  ------------------
  |  |   51|     69|   ((str)[1] == ':' || (str)[1] == '|') &&                 \
  |  |  ------------------
  |  |  |  Branch (51:5): [True: 7, False: 3]
  |  |  |  Branch (51:24): [True: 3, False: 0]
  |  |  ------------------
  |  |   52|     69|   ((str)[2] == '/' || (str)[2] == '\\' || (str)[2] == 0))
  |  |  ------------------
  |  |  |  Branch (52:5): [True: 3, False: 7]
  |  |  |  Branch (52:24): [True: 3, False: 4]
  |  |  |  Branch (52:44): [True: 4, False: 0]
  |  |  ------------------
  ------------------
  940|       |    /* File drive letters are only accepted in MS-DOS/Windows */
  941|     20|    return CURLUE_BAD_FILE_URL;
  942|     20|  }
  943|       |#else
  944|       |  /* If the path starts with a slash and a drive letter, ditch the slash */
  945|       |  if('/' == path[0] && STARTS_WITH_URL_DRIVE_PREFIX(&path[1])) {
  946|       |    /* This cannot be done with strcpy, as the memory chunks overlap! */
  947|       |    path++;
  948|       |    pathlen--;
  949|       |  }
  950|       |#endif
  951|     59|  u->scheme = curlx_strdup("file");
  ------------------
  |  | 1482|     59|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  952|     59|  if(!u->scheme)
  ------------------
  |  Branch (952:6): [True: 0, False: 59]
  ------------------
  953|      0|    return CURLUE_OUT_OF_MEMORY;
  954|       |
  955|     59|  *pathp = path;
  956|     59|  *pathlenp = pathlen;
  957|     59|  return CURLUE_OK;
  958|     59|}
curl_url:
 1318|  12.0k|{
 1319|  12.0k|  return curlx_calloc(1, sizeof(struct Curl_URL));
  ------------------
  |  | 1485|  12.0k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1320|  12.0k|}
curl_url_cleanup:
 1323|  40.3k|{
 1324|  40.3k|  if(u) {
  ------------------
  |  Branch (1324:6): [True: 12.0k, False: 28.3k]
  ------------------
 1325|  12.0k|    free_urlhandle(u);
 1326|  12.0k|    curlx_free(u);
  ------------------
  |  | 1488|  12.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1327|  12.0k|  }
 1328|  40.3k|}
curl_url_get:
 1585|   100k|{
 1586|   100k|  const char *ptr;
 1587|   100k|  CURLUcode ifmissing = CURLUE_UNKNOWN_PART;
 1588|   100k|  char portbuf[7];
 1589|   100k|  bool plusdecode = FALSE;
  ------------------
  |  | 1054|   100k|#define FALSE false
  ------------------
 1590|   100k|  if(!u)
  ------------------
  |  Branch (1590:6): [True: 0, False: 100k]
  ------------------
 1591|      0|    return CURLUE_BAD_HANDLE;
 1592|   100k|  if(!part)
  ------------------
  |  Branch (1592:6): [True: 0, False: 100k]
  ------------------
 1593|      0|    return CURLUE_BAD_PARTPOINTER;
 1594|   100k|  *part = NULL;
 1595|       |
 1596|   100k|  switch(what) {
 1597|  13.5k|  case CURLUPART_SCHEME:
  ------------------
  |  Branch (1597:3): [True: 13.5k, False: 86.6k]
  ------------------
 1598|  13.5k|    ptr = u->scheme;
 1599|  13.5k|    ifmissing = CURLUE_NO_SCHEME;
 1600|  13.5k|    flags &= ~U_CURLU_URLDECODE; /* never for schemes */
  ------------------
  |  |   63|  13.5k|#define U_CURLU_URLDECODE  (unsigned int)CURLU_URLDECODE
  |  |  ------------------
  |  |  |  |   93|  13.5k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  |  |  ------------------
  ------------------
 1601|  13.5k|    if((flags & CURLU_NO_GUESS_SCHEME) && u->guessed_scheme)
  ------------------
  |  |  105|  13.5k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
  |  Branch (1601:8): [True: 4.45k, False: 9.12k]
  |  Branch (1601:43): [True: 3.57k, False: 884]
  ------------------
 1602|  3.57k|      return CURLUE_NO_SCHEME;
 1603|  10.0k|    break;
 1604|  11.0k|  case CURLUPART_USER:
  ------------------
  |  Branch (1604:3): [True: 11.0k, False: 89.2k]
  ------------------
 1605|  11.0k|    ptr = u->user;
 1606|  11.0k|    ifmissing = CURLUE_NO_USER;
 1607|  11.0k|    break;
 1608|  11.0k|  case CURLUPART_PASSWORD:
  ------------------
  |  Branch (1608:3): [True: 11.0k, False: 89.2k]
  ------------------
 1609|  11.0k|    ptr = u->password;
 1610|  11.0k|    ifmissing = CURLUE_NO_PASSWORD;
 1611|  11.0k|    break;
 1612|  8.96k|  case CURLUPART_OPTIONS:
  ------------------
  |  Branch (1612:3): [True: 8.96k, False: 91.2k]
  ------------------
 1613|  8.96k|    ptr = u->options;
 1614|  8.96k|    ifmissing = CURLUE_NO_OPTIONS;
 1615|  8.96k|    break;
 1616|  11.3k|  case CURLUPART_HOST:
  ------------------
  |  Branch (1616:3): [True: 11.3k, False: 88.9k]
  ------------------
 1617|  11.3k|    ptr = u->host;
 1618|  11.3k|    ifmissing = CURLUE_NO_HOST;
 1619|  11.3k|    break;
 1620|  11.0k|  case CURLUPART_ZONEID:
  ------------------
  |  Branch (1620:3): [True: 11.0k, False: 89.1k]
  ------------------
 1621|  11.0k|    ptr = u->zoneid;
 1622|  11.0k|    ifmissing = CURLUE_NO_ZONEID;
 1623|  11.0k|    break;
 1624|  2.22k|  case CURLUPART_PORT:
  ------------------
  |  Branch (1624:3): [True: 2.22k, False: 97.9k]
  ------------------
 1625|  2.22k|    ptr = NULL;
 1626|  2.22k|    ifmissing = CURLUE_NO_PORT;
 1627|  2.22k|    flags &= ~U_CURLU_URLDECODE; /* never for port */
  ------------------
  |  |   63|  2.22k|#define U_CURLU_URLDECODE  (unsigned int)CURLU_URLDECODE
  |  |  ------------------
  |  |  |  |   93|  2.22k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  |  |  ------------------
  ------------------
 1628|  2.22k|    if(u->port_present) {
  ------------------
  |  Branch (1628:8): [True: 29, False: 2.19k]
  ------------------
 1629|     29|      const struct Curl_scheme *h = u->scheme ?
  ------------------
  |  Branch (1629:37): [True: 29, False: 0]
  ------------------
 1630|     29|                                    Curl_get_scheme(u->scheme) : NULL;
 1631|       |      /* there is a stored port number, but ask to inhibit if
 1632|       |         it matches the default one for the scheme */
 1633|     29|      if(h && (h->defport == u->portnum) &&
  ------------------
  |  Branch (1633:10): [True: 29, False: 0]
  |  Branch (1633:15): [True: 1, False: 28]
  ------------------
 1634|      1|         (flags & CURLU_NO_DEFAULT_PORT)) {
  ------------------
  |  |   85|      1|#define CURLU_NO_DEFAULT_PORT (1 << 1)    /* act as if no port number was set,
  ------------------
  |  Branch (1634:10): [True: 1, False: 0]
  ------------------
 1635|      1|        ptr = NULL;
 1636|      1|      }
 1637|     28|      else {
 1638|     28|        curl_msnprintf(portbuf, sizeof(portbuf), "%u", u->portnum);
 1639|     28|        ptr = portbuf;
 1640|     28|      }
 1641|     29|    }
 1642|  2.19k|    else if((flags & CURLU_DEFAULT_PORT) && u->scheme) {
  ------------------
  |  |   84|  2.19k|#define CURLU_DEFAULT_PORT (1 << 0)       /* return default port number */
  ------------------
  |  Branch (1642:13): [True: 0, False: 2.19k]
  |  Branch (1642:45): [True: 0, False: 0]
  ------------------
 1643|       |      /* there is no stored port number, but asked to deliver
 1644|       |         a default one for the scheme */
 1645|      0|      const struct Curl_scheme *h = Curl_get_scheme(u->scheme);
 1646|      0|      if(h) {
  ------------------
  |  Branch (1646:10): [True: 0, False: 0]
  ------------------
 1647|      0|        curl_msnprintf(portbuf, sizeof(portbuf), "%u", h->defport);
 1648|      0|        ptr = portbuf;
 1649|      0|      }
 1650|      0|    }
 1651|  2.22k|    break;
 1652|  8.96k|  case CURLUPART_PATH:
  ------------------
  |  Branch (1652:3): [True: 8.96k, False: 91.2k]
  ------------------
 1653|  8.96k|    ptr = u->path;
 1654|  8.96k|    if(!ptr)
  ------------------
  |  Branch (1654:8): [True: 7.26k, False: 1.70k]
  ------------------
 1655|  7.26k|      ptr = "/";
 1656|  8.96k|    break;
 1657|  8.96k|  case CURLUPART_QUERY:
  ------------------
  |  Branch (1657:3): [True: 8.96k, False: 91.2k]
  ------------------
 1658|  8.96k|    ptr = u->query;
 1659|  8.96k|    ifmissing = CURLUE_NO_QUERY;
 1660|  8.96k|    plusdecode = flags & CURLU_URLDECODE;
  ------------------
  |  |   93|  8.96k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
 1661|  8.96k|    if(ptr && !ptr[0] && !(flags & CURLU_GET_EMPTY))
  ------------------
  |  |  102|    257|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1661:8): [True: 2.19k, False: 6.76k]
  |  Branch (1661:15): [True: 257, False: 1.94k]
  |  Branch (1661:26): [True: 0, False: 257]
  ------------------
 1662|       |      /* there was a blank query and the user do not ask for it */
 1663|      0|      ptr = NULL;
 1664|  8.96k|    break;
 1665|      0|  case CURLUPART_FRAGMENT:
  ------------------
  |  Branch (1665:3): [True: 0, False: 100k]
  ------------------
 1666|      0|    ptr = u->fragment;
 1667|      0|    ifmissing = CURLUE_NO_FRAGMENT;
 1668|      0|    if(!ptr && u->fragment_present && flags & CURLU_GET_EMPTY)
  ------------------
  |  |  102|      0|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1668:8): [True: 0, False: 0]
  |  Branch (1668:16): [True: 0, False: 0]
  |  Branch (1668:39): [True: 0, False: 0]
  ------------------
 1669|       |      /* there was a blank fragment and the user asks for it */
 1670|      0|      ptr = "";
 1671|      0|    break;
 1672|  13.0k|  case CURLUPART_URL:
  ------------------
  |  Branch (1672:3): [True: 13.0k, False: 87.1k]
  ------------------
 1673|  13.0k|    return urlget_url(u, part, flags);
 1674|      0|  default:
  ------------------
  |  Branch (1674:3): [True: 0, False: 100k]
  ------------------
 1675|      0|    ptr = NULL;
 1676|      0|    break;
 1677|   100k|  }
 1678|  83.5k|  if(ptr)
  ------------------
  |  Branch (1678:6): [True: 34.5k, False: 49.0k]
  ------------------
 1679|  34.5k|    return urlget_format(u, what, ptr, part, plusdecode, flags);
 1680|       |
 1681|  49.0k|  return ifmissing;
 1682|  83.5k|}
curl_url_set:
 1975|  12.0k|{
 1976|  12.0k|  char **storep = NULL;
 1977|  12.0k|  bool urlencode = (flags & CURLU_URLENCODE) ? 1 : 0;
  ------------------
  |  |   94|  12.0k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1977:20): [True: 0, False: 12.0k]
  ------------------
 1978|  12.0k|  bool plusencode = FALSE;
  ------------------
  |  | 1054|  12.0k|#define FALSE false
  ------------------
 1979|  12.0k|  bool pathmode = FALSE;
  ------------------
  |  | 1054|  12.0k|#define FALSE false
  ------------------
 1980|  12.0k|  bool leadingslash = FALSE;
  ------------------
  |  | 1054|  12.0k|#define FALSE false
  ------------------
 1981|  12.0k|  bool appendquery = FALSE;
  ------------------
  |  | 1054|  12.0k|#define FALSE false
  ------------------
 1982|  12.0k|  bool equalsencode = FALSE;
  ------------------
  |  | 1054|  12.0k|#define FALSE false
  ------------------
 1983|  12.0k|  size_t nalloc;
 1984|       |
 1985|  12.0k|  if(!u)
  ------------------
  |  Branch (1985:6): [True: 0, False: 12.0k]
  ------------------
 1986|      0|    return CURLUE_BAD_HANDLE;
 1987|  12.0k|  if(!part)
  ------------------
  |  Branch (1987:6): [True: 0, False: 12.0k]
  ------------------
 1988|       |    /* setting a part to NULL clears it */
 1989|      0|    return urlset_clear(u, what);
 1990|       |
 1991|  12.0k|  nalloc = strlen(part);
 1992|  12.0k|  if(nalloc > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|  12.0k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (1992:6): [True: 0, False: 12.0k]
  ------------------
 1993|       |    /* excessive input length */
 1994|      0|    return CURLUE_MALFORMED_INPUT;
 1995|       |
 1996|  12.0k|  switch(what) {
 1997|      0|  case CURLUPART_SCHEME: {
  ------------------
  |  Branch (1997:3): [True: 0, False: 12.0k]
  ------------------
 1998|      0|    CURLUcode status = set_url_scheme(u, part, flags);
 1999|      0|    if(status)
  ------------------
  |  Branch (1999:8): [True: 0, False: 0]
  ------------------
 2000|      0|      return status;
 2001|      0|    storep = &u->scheme;
 2002|      0|    urlencode = FALSE; /* never */
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 2003|      0|    break;
 2004|      0|  }
 2005|      0|  case CURLUPART_USER:
  ------------------
  |  Branch (2005:3): [True: 0, False: 12.0k]
  ------------------
 2006|      0|    storep = &u->user;
 2007|      0|    break;
 2008|      0|  case CURLUPART_PASSWORD:
  ------------------
  |  Branch (2008:3): [True: 0, False: 12.0k]
  ------------------
 2009|      0|    storep = &u->password;
 2010|      0|    break;
 2011|      0|  case CURLUPART_OPTIONS:
  ------------------
  |  Branch (2011:3): [True: 0, False: 12.0k]
  ------------------
 2012|      0|    storep = &u->options;
 2013|      0|    break;
 2014|      0|  case CURLUPART_HOST:
  ------------------
  |  Branch (2014:3): [True: 0, False: 12.0k]
  ------------------
 2015|      0|    storep = &u->host;
 2016|      0|    curlx_safefree(u->zoneid);
  ------------------
  |  | 1332|      0|  do {                      \
  |  | 1333|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|      0|    (ptr) = NULL;           \
  |  | 1335|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2017|      0|    break;
 2018|      0|  case CURLUPART_ZONEID:
  ------------------
  |  Branch (2018:3): [True: 0, False: 12.0k]
  ------------------
 2019|      0|    storep = &u->zoneid;
 2020|      0|    break;
 2021|     15|  case CURLUPART_PORT:
  ------------------
  |  Branch (2021:3): [True: 15, False: 12.0k]
  ------------------
 2022|     15|    return set_url_port(u, part);
 2023|      0|  case CURLUPART_PATH:
  ------------------
  |  Branch (2023:3): [True: 0, False: 12.0k]
  ------------------
 2024|      0|    pathmode = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 2025|      0|    leadingslash = TRUE; /* enforce */
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 2026|      0|    storep = &u->path;
 2027|      0|    break;
 2028|      0|  case CURLUPART_QUERY:
  ------------------
  |  Branch (2028:3): [True: 0, False: 12.0k]
  ------------------
 2029|      0|    plusencode = urlencode;
 2030|      0|    appendquery = (flags & CURLU_APPENDQUERY) ? 1 : 0;
  ------------------
  |  |   95|      0|#define CURLU_APPENDQUERY (1 << 8)        /* append a form style part */
  ------------------
  |  Branch (2030:19): [True: 0, False: 0]
  ------------------
 2031|      0|    equalsencode = appendquery;
 2032|      0|    storep = &u->query;
 2033|      0|    u->query_present = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 2034|      0|    break;
 2035|      0|  case CURLUPART_FRAGMENT:
  ------------------
  |  Branch (2035:3): [True: 0, False: 12.0k]
  ------------------
 2036|      0|    storep = &u->fragment;
 2037|      0|    u->fragment_present = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 2038|      0|    break;
 2039|  12.0k|  case CURLUPART_URL:
  ------------------
  |  Branch (2039:3): [True: 12.0k, False: 15]
  ------------------
 2040|  12.0k|    return set_url(u, part, nalloc, flags);
 2041|      0|  default:
  ------------------
  |  Branch (2041:3): [True: 0, False: 12.0k]
  ------------------
 2042|      0|    return CURLUE_UNKNOWN_PART;
 2043|  12.0k|  }
 2044|      0|  DEBUGASSERT(storep);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2044:3): [True: 0, False: 0]
  |  Branch (2044:3): [True: 0, False: 0]
  ------------------
 2045|      0|  {
 2046|      0|    const char *newp = NULL;
 2047|      0|    struct dynbuf enc;
 2048|      0|    CURLUcode status;
 2049|      0|    curlx_dyn_init(&enc, (nalloc * 3) + 1 + leadingslash);
 2050|       |
 2051|      0|    if(leadingslash && (part[0] != '/')) {
  ------------------
  |  Branch (2051:8): [True: 0, False: 0]
  |  Branch (2051:24): [True: 0, False: 0]
  ------------------
 2052|      0|      CURLcode result = curlx_dyn_addn(&enc, "/", 1);
 2053|      0|      if(result)
  ------------------
  |  Branch (2053:10): [True: 0, False: 0]
  ------------------
 2054|      0|        return cc2cu(result);
  ------------------
  |  |  107|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (107:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2055|      0|    }
 2056|      0|    if(urlencode)
  ------------------
  |  Branch (2056:8): [True: 0, False: 0]
  ------------------
 2057|      0|      status = url_encode_part(&enc, part, plusencode, pathmode, equalsencode);
 2058|      0|    else
 2059|      0|      status = url_uppercasehex_part(&enc, part);
 2060|      0|    if(!status) {
  ------------------
  |  Branch (2060:8): [True: 0, False: 0]
  ------------------
 2061|      0|      newp = curlx_dyn_ptr(&enc);
 2062|       |
 2063|      0|      if(appendquery && newp)
  ------------------
  |  Branch (2063:10): [True: 0, False: 0]
  |  Branch (2063:25): [True: 0, False: 0]
  ------------------
 2064|      0|        return url_append_query(u, &enc);
 2065|      0|      else if(what == CURLUPART_HOST)
  ------------------
  |  Branch (2065:15): [True: 0, False: 0]
  ------------------
 2066|      0|        status = url_sethost(u, &enc, urlencode, flags);
 2067|      0|    }
 2068|      0|    if(status)
  ------------------
  |  Branch (2068:8): [True: 0, False: 0]
  ------------------
 2069|      0|      return status;
 2070|       |
 2071|      0|    curlx_free(*storep);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2072|      0|    *storep = (char *)CURL_UNCONST(newp);
  ------------------
  |  |  862|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 2073|      0|  }
 2074|      0|  return CURLUE_OK;
 2075|      0|}
Curl_url_get_port:
 2113|  8.94k|{
 2114|  8.94k|  if(u->port_present) {
  ------------------
  |  Branch (2114:6): [True: 224, False: 8.72k]
  ------------------
 2115|    224|    *pport = u->portnum;
 2116|    224|    return CURLUE_OK;
 2117|    224|  }
 2118|  8.72k|  else if(u->scheme) {
  ------------------
  |  Branch (2118:11): [True: 8.72k, False: 0]
  ------------------
 2119|  8.72k|    const struct Curl_scheme *s = Curl_get_scheme(u->scheme);
 2120|  8.72k|    if(s && s->defport) {
  ------------------
  |  Branch (2120:8): [True: 8.72k, False: 0]
  |  Branch (2120:13): [True: 8.66k, False: 56]
  ------------------
 2121|  8.66k|      *pport = s->defport;
 2122|  8.66k|      return CURLUE_OK;
 2123|  8.66k|    }
 2124|  8.72k|  }
 2125|     56|  *pport = 0;
 2126|     56|  return CURLUE_NO_PORT;
 2127|  8.94k|}
urlapi.c:parse_authority:
  651|  11.5k|{
  652|  11.5k|  size_t offset;
  653|  11.5k|  CURLUcode uc;
  654|  11.5k|  CURLcode result;
  655|       |
  656|       |  /*
  657|       |   * Parse the login details and strip them out of the hostname.
  658|       |   */
  659|  11.5k|  uc = parse_hostname_login(u, auth, authlen, flags, &offset);
  660|  11.5k|  if(uc)
  ------------------
  |  Branch (660:6): [True: 1, False: 11.5k]
  ------------------
  661|      1|    return uc;
  662|       |
  663|  11.5k|  result = curlx_dyn_addn(host, auth + offset, authlen - offset);
  664|  11.5k|  if(result) {
  ------------------
  |  Branch (664:6): [True: 0, False: 11.5k]
  ------------------
  665|      0|    uc = cc2cu(result);
  ------------------
  |  |  107|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (107:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  666|      0|    return uc;
  667|      0|  }
  668|       |
  669|  11.5k|  uc = parse_port(u, host, has_scheme);
  670|  11.5k|  if(uc)
  ------------------
  |  Branch (670:6): [True: 83, False: 11.4k]
  ------------------
  671|     83|    return uc;
  672|       |
  673|  11.4k|  if(!curlx_dyn_len(host))
  ------------------
  |  Branch (673:6): [True: 11, False: 11.4k]
  ------------------
  674|     11|    uc = CURLUE_NO_HOST;
  675|  11.4k|  else
  676|  11.4k|    uc = urldecode_host(host);
  677|  11.4k|  if(uc)
  ------------------
  |  Branch (677:6): [True: 16, False: 11.4k]
  ------------------
  678|     16|    return uc;
  679|       |
  680|  11.4k|  switch(ipv4_normalize(host)) {
  681|  3.65k|  case HOST_IPV4:
  ------------------
  |  |   49|  3.65k|#define HOST_IPV4    2
  ------------------
  |  Branch (681:3): [True: 3.65k, False: 7.80k]
  ------------------
  682|  3.65k|    break;
  683|    265|  case HOST_IPV6:
  ------------------
  |  |   50|    265|#define HOST_IPV6    3
  ------------------
  |  Branch (683:3): [True: 265, False: 11.1k]
  ------------------
  684|    265|    uc = ipv6_parse(u, curlx_dyn_ptr(host), curlx_dyn_len(host));
  685|    265|    break;
  686|  7.53k|  case HOST_NAME:
  ------------------
  |  |   48|  7.53k|#define HOST_NAME    1
  ------------------
  |  Branch (686:3): [True: 7.53k, False: 3.92k]
  ------------------
  687|  7.53k|    uc = hostname_check(u, curlx_dyn_ptr(host), curlx_dyn_len(host));
  688|  7.53k|    break;
  689|      0|  case HOST_ERROR:
  ------------------
  |  |   47|      0|#define HOST_ERROR   (-1) /* out of memory */
  ------------------
  |  Branch (689:3): [True: 0, False: 11.4k]
  ------------------
  690|      0|    uc = CURLUE_OUT_OF_MEMORY;
  691|      0|    break;
  692|      0|  default:
  ------------------
  |  Branch (692:3): [True: 0, False: 11.4k]
  ------------------
  693|      0|    uc = CURLUE_BAD_HOSTNAME; /* Bad IPv4 address even */
  694|      0|    break;
  695|  11.4k|  }
  696|       |
  697|  11.4k|  return uc;
  698|  11.4k|}
urlapi.c:urldecode_host:
  621|  11.4k|{
  622|  11.4k|  const char *per;
  623|  11.4k|  const char *hostname = curlx_dyn_ptr(host);
  624|  11.4k|  per = strchr(hostname, '%');
  625|  11.4k|  if(!per)
  ------------------
  |  Branch (625:6): [True: 11.2k, False: 173]
  ------------------
  626|       |    /* nothing to decode */
  627|  11.2k|    return CURLUE_OK;
  628|    173|  else {
  629|       |    /* encoded */
  630|    173|    size_t dlen;
  631|    173|    char *decoded;
  632|    173|    CURLcode result = Curl_urldecode(hostname, 0, &decoded, &dlen,
  633|    173|                                     REJECT_CTRL);
  634|    173|    if(result)
  ------------------
  |  Branch (634:8): [True: 5, False: 168]
  ------------------
  635|      5|      return CURLUE_BAD_HOSTNAME;
  636|    168|    curlx_dyn_reset(host);
  637|    168|    result = curlx_dyn_addn(host, decoded, dlen);
  638|    168|    curlx_free(decoded);
  ------------------
  |  | 1488|    168|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  639|    168|    if(result)
  ------------------
  |  Branch (639:8): [True: 0, False: 168]
  ------------------
  640|      0|      return cc2cu(result);
  ------------------
  |  |  107|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (107:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  641|    168|  }
  642|       |
  643|    168|  return CURLUE_OK;
  644|  11.4k|}
urlapi.c:hostname_check:
  471|  7.53k|{
  472|  7.53k|  size_t len;
  473|  7.53k|  DEBUGASSERT(hostname);
  ------------------
  |  | 1077|  7.53k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (473:3): [True: 0, False: 7.53k]
  |  Branch (473:3): [True: 7.53k, False: 0]
  ------------------
  474|       |
  475|  7.53k|  if(!hlen)
  ------------------
  |  Branch (475:6): [True: 0, False: 7.53k]
  ------------------
  476|      0|    return CURLUE_NO_HOST;
  477|  7.53k|  else if(hostname[0] == '[')
  ------------------
  |  Branch (477:11): [True: 0, False: 7.53k]
  ------------------
  478|      0|    return ipv6_parse(u, hostname, hlen);
  479|  7.53k|  else {
  480|       |    /* letters from the second string are not ok */
  481|  7.53k|    len = strcspn(hostname, HOSTNAME_INVALID_CHARS);
  ------------------
  |  |   59|  7.53k|#define HOSTNAME_INVALID_CHARS " \r\n\t/:#?!@{}[]\\$\'\"^`*<>=;,+&()%|"
  ------------------
  482|  7.53k|    if(hlen != len)
  ------------------
  |  Branch (482:8): [True: 92, False: 7.44k]
  ------------------
  483|       |      /* hostname with bad content */
  484|     92|      return CURLUE_BAD_HOSTNAME;
  485|  7.44k|    else if((hlen >= 2) &&
  ------------------
  |  Branch (485:13): [True: 4.91k, False: 2.53k]
  ------------------
  486|  4.91k|            (hostname[hlen - 1] == '.') && (hostname[hlen - 2] == '.'))
  ------------------
  |  Branch (486:13): [True: 1.11k, False: 3.79k]
  |  Branch (486:44): [True: 6, False: 1.10k]
  ------------------
  487|       |      /* more than one trailing dot is not allowed */
  488|      6|      return CURLUE_BAD_HOSTNAME;
  489|  7.43k|    else if((hlen == 1) && (hostname[0] == '.'))
  ------------------
  |  Branch (489:13): [True: 2.53k, False: 4.90k]
  |  Branch (489:28): [True: 3, False: 2.53k]
  ------------------
  490|       |      /* a single dot alone is not allowed */
  491|      3|      return CURLUE_BAD_HOSTNAME;
  492|  7.53k|  }
  493|  7.43k|  return CURLUE_OK;
  494|  7.53k|}
urlapi.c:is_dot:
  726|  4.61M|{
  727|  4.61M|  const char *p = *str;
  728|  4.61M|  if(*p == '.') {
  ------------------
  |  Branch (728:6): [True: 186k, False: 4.43M]
  ------------------
  729|   186k|    (*str)++;
  730|   186k|    (*clen)--;
  731|   186k|    return TRUE;
  ------------------
  |  | 1051|   186k|#define TRUE true
  ------------------
  732|   186k|  }
  733|  4.43M|  else if((*clen >= 3) &&
  ------------------
  |  Branch (733:11): [True: 4.42M, False: 1.35k]
  ------------------
  734|  4.42M|          (p[0] == '%') && (p[1] == '2') && ((p[2] | 0x20) == 'e')) {
  ------------------
  |  Branch (734:11): [True: 8.14k, False: 4.42M]
  |  Branch (734:28): [True: 3.63k, False: 4.51k]
  |  Branch (734:45): [True: 1.58k, False: 2.04k]
  ------------------
  735|  1.58k|    *str += 3;
  736|  1.58k|    *clen -= 3;
  737|  1.58k|    return TRUE;
  ------------------
  |  | 1051|  1.58k|#define TRUE true
  ------------------
  738|  1.58k|  }
  739|  4.42M|  return FALSE;
  ------------------
  |  | 1054|  4.42M|#define FALSE false
  ------------------
  740|  4.61M|}
urlapi.c:free_urlhandle:
   73|  23.8k|{
   74|  23.8k|  curlx_free(u->scheme);
  ------------------
  |  | 1488|  23.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   75|  23.8k|  curlx_free(u->user);
  ------------------
  |  | 1488|  23.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   76|  23.8k|  curlx_free(u->password);
  ------------------
  |  | 1488|  23.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   77|  23.8k|  curlx_free(u->options);
  ------------------
  |  | 1488|  23.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   78|  23.8k|  curlx_free(u->host);
  ------------------
  |  | 1488|  23.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   79|  23.8k|  curlx_free(u->zoneid);
  ------------------
  |  | 1488|  23.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   80|  23.8k|  curlx_free(u->path);
  ------------------
  |  | 1488|  23.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   81|  23.8k|  curlx_free(u->query);
  ------------------
  |  | 1488|  23.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   82|  23.8k|  curlx_free(u->fragment);
  ------------------
  |  | 1488|  23.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   83|  23.8k|}
urlapi.c:urlget_url:
 1471|  13.0k|{
 1472|  13.0k|  char *url;
 1473|  13.0k|  char *allochost = NULL;
 1474|  13.0k|  const char *fragmentsep =
 1475|  13.0k|    (u->fragment || (u->fragment_present && flags & CURLU_GET_EMPTY)) ?
  ------------------
  |  |  102|     76|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1475:6): [True: 108, False: 12.9k]
  |  Branch (1475:22): [True: 76, False: 12.8k]
  |  Branch (1475:45): [True: 76, False: 0]
  ------------------
 1476|  12.8k|    "#" : "";
 1477|  13.0k|  const char *querysep = ((u->query && u->query[0]) ||
  ------------------
  |  Branch (1477:28): [True: 2.20k, False: 10.8k]
  |  Branch (1477:40): [True: 1.94k, False: 261]
  ------------------
 1478|  11.1k|                          (u->query_present && flags & CURLU_GET_EMPTY)) ?
  ------------------
  |  |  102|    261|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1478:28): [True: 261, False: 10.8k]
  |  Branch (1478:48): [True: 261, False: 0]
  ------------------
 1479|  10.8k|    "?" : "";
 1480|  13.0k|  char portbuf[7];
 1481|  13.0k|  if(curl_strequal("file", u->scheme))
  ------------------
  |  Branch (1481:6): [True: 59, False: 13.0k]
  ------------------
 1482|     59|    return file_url(u, part, fragmentsep, querysep);
 1483|  13.0k|  else if(!u->host)
  ------------------
  |  Branch (1483:11): [True: 3.95k, False: 9.06k]
  ------------------
 1484|  3.95k|    return CURLUE_NO_HOST;
 1485|  9.06k|  else {
 1486|  9.06k|    const char *scheme;
 1487|  9.06k|    char *options = u->options;
 1488|  9.06k|    char *port = NULL;
 1489|  9.06k|    const struct Curl_scheme *h = NULL;
 1490|  9.06k|    char schemebuf[MAX_SCHEME_LEN + 5];
 1491|  9.06k|    if(u->scheme)
  ------------------
  |  Branch (1491:8): [True: 9.06k, False: 0]
  ------------------
 1492|  9.06k|      scheme = u->scheme;
 1493|      0|    else if(flags & CURLU_DEFAULT_SCHEME)
  ------------------
  |  |   88|      0|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
  |  Branch (1493:13): [True: 0, False: 0]
  ------------------
 1494|      0|      scheme = DEFAULT_SCHEME;
  ------------------
  |  |   70|      0|#define DEFAULT_SCHEME "https"
  ------------------
 1495|      0|    else
 1496|      0|      return CURLUE_NO_SCHEME;
 1497|       |
 1498|  9.06k|    if(u->port_present) {
  ------------------
  |  Branch (1498:8): [True: 228, False: 8.83k]
  ------------------
 1499|    228|      curl_msnprintf(portbuf, sizeof(portbuf), "%u", u->portnum);
 1500|    228|      port = portbuf;
 1501|    228|    }
 1502|       |
 1503|  9.06k|    h = Curl_get_scheme(scheme);
 1504|  9.06k|    if(h) {
  ------------------
  |  Branch (1504:8): [True: 9.03k, False: 32]
  ------------------
 1505|  9.03k|      if(!u->port_present && (flags & CURLU_DEFAULT_PORT)) {
  ------------------
  |  |   84|  8.80k|#define CURLU_DEFAULT_PORT (1 << 0)       /* return default port number */
  ------------------
  |  Branch (1505:10): [True: 8.80k, False: 228]
  |  Branch (1505:30): [True: 0, False: 8.80k]
  ------------------
 1506|       |        /* there is no stored port number, but asked to deliver a default one
 1507|       |           for the scheme */
 1508|      0|        curl_msnprintf(portbuf, sizeof(portbuf), "%u", h->defport);
 1509|      0|        port = portbuf;
 1510|      0|      }
 1511|  9.03k|      else if(u->port_present && (h->defport == u->portnum) &&
  ------------------
  |  Branch (1511:15): [True: 228, False: 8.80k]
  |  Branch (1511:34): [True: 5, False: 223]
  ------------------
 1512|      5|              (flags & CURLU_NO_DEFAULT_PORT)) {
  ------------------
  |  |   85|      5|#define CURLU_NO_DEFAULT_PORT (1 << 1)    /* act as if no port number was set,
  ------------------
  |  Branch (1512:15): [True: 0, False: 5]
  ------------------
 1513|       |        /* there is a stored port number, but asked to inhibit if it matches
 1514|       |           the default port for the scheme */
 1515|      0|        port = NULL;
 1516|      0|      }
 1517|       |
 1518|  9.03k|      if(!(h->flags & PROTOPT_URLOPTIONS))
  ------------------
  |  |  225|  9.03k|#define PROTOPT_URLOPTIONS (1 << 10) /* allow options part in the userinfo
  ------------------
  |  Branch (1518:10): [True: 9.02k, False: 10]
  ------------------
 1519|  9.02k|        options = NULL;
 1520|  9.03k|    }
 1521|       |
 1522|  9.06k|    if(u->host[0] == '[') {
  ------------------
  |  Branch (1522:8): [True: 170, False: 8.89k]
  ------------------
 1523|    170|      if(u->zoneid) {
  ------------------
  |  Branch (1523:10): [True: 23, False: 147]
  ------------------
 1524|       |        /* make it '[ host %25 zoneid ]' */
 1525|     23|        struct dynbuf enc;
 1526|     23|        size_t hostlen = strlen(u->host);
 1527|     23|        curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|     23|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1528|     23|        if(curlx_dyn_addf(&enc, "%.*s%%25%s]", (int)hostlen - 1, u->host,
  ------------------
  |  Branch (1528:12): [True: 0, False: 23]
  ------------------
 1529|     23|                          u->zoneid))
 1530|      0|          return CURLUE_OUT_OF_MEMORY;
 1531|     23|        allochost = curlx_dyn_ptr(&enc);
 1532|     23|      }
 1533|    170|    }
 1534|  8.89k|    else if(flags & CURLU_URLENCODE) {
  ------------------
  |  |   94|  8.89k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1534:13): [True: 0, False: 8.89k]
  ------------------
 1535|      0|      allochost = curl_easy_escape(NULL, u->host, 0);
 1536|      0|      if(!allochost)
  ------------------
  |  Branch (1536:10): [True: 0, False: 0]
  ------------------
 1537|      0|        return CURLUE_OUT_OF_MEMORY;
 1538|      0|    }
 1539|  8.89k|    else if(flags & CURLU_PUNYCODE) {
  ------------------
  |  |  100|  8.89k|#define CURLU_PUNYCODE (1 << 12)          /* get the hostname in punycode */
  ------------------
  |  Branch (1539:13): [True: 0, False: 8.89k]
  ------------------
 1540|      0|      if(!Curl_is_ASCII_name(u->host)) {
  ------------------
  |  Branch (1540:10): [True: 0, False: 0]
  ------------------
 1541|      0|        CURLUcode ret = host_decode(u->host, &allochost);
 1542|      0|        if(ret)
  ------------------
  |  Branch (1542:12): [True: 0, False: 0]
  ------------------
 1543|      0|          return ret;
 1544|      0|      }
 1545|      0|    }
 1546|  8.89k|    else if(flags & CURLU_PUNY2IDN) {
  ------------------
  |  |  101|  8.89k|#define CURLU_PUNY2IDN (1 << 13)          /* punycode => IDN conversion */
  ------------------
  |  Branch (1546:13): [True: 0, False: 8.89k]
  ------------------
 1547|      0|      if(Curl_is_ASCII_name(u->host)) {
  ------------------
  |  Branch (1547:10): [True: 0, False: 0]
  ------------------
 1548|      0|        CURLUcode ret = host_encode(u->host, &allochost);
 1549|      0|        if(ret)
  ------------------
  |  Branch (1549:12): [True: 0, False: 0]
  ------------------
 1550|      0|          return ret;
 1551|      0|      }
 1552|      0|    }
 1553|       |
 1554|  9.06k|    if(!(flags & CURLU_NO_GUESS_SCHEME) || !u->guessed_scheme)
  ------------------
  |  |  105|  9.06k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
  |  Branch (1554:8): [True: 9.06k, False: 0]
  |  Branch (1554:44): [True: 0, False: 0]
  ------------------
 1555|  9.06k|      curl_msnprintf(schemebuf, sizeof(schemebuf), "%s://", scheme);
 1556|      0|    else
 1557|      0|      schemebuf[0] = 0;
 1558|       |
 1559|  9.06k|    url = curl_maprintf("%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
 1560|  9.06k|                        schemebuf,
 1561|  9.06k|                        u->user ? u->user : "",
  ------------------
  |  Branch (1561:25): [True: 140, False: 8.92k]
  ------------------
 1562|  9.06k|                        u->password ? ":" : "",
  ------------------
  |  Branch (1562:25): [True: 44, False: 9.02k]
  ------------------
 1563|  9.06k|                        u->password ? u->password : "",
  ------------------
  |  Branch (1563:25): [True: 44, False: 9.02k]
  ------------------
 1564|  9.06k|                        options ? ";" : "",
  ------------------
  |  Branch (1564:25): [True: 1, False: 9.06k]
  ------------------
 1565|  9.06k|                        options ? options : "",
  ------------------
  |  Branch (1565:25): [True: 1, False: 9.06k]
  ------------------
 1566|  9.06k|                        (u->user || u->password || options) ? "@" : "",
  ------------------
  |  Branch (1566:26): [True: 140, False: 8.92k]
  |  Branch (1566:37): [True: 0, False: 8.92k]
  |  Branch (1566:52): [True: 0, False: 8.92k]
  ------------------
 1567|  9.06k|                        allochost ? allochost : u->host,
  ------------------
  |  Branch (1567:25): [True: 23, False: 9.04k]
  ------------------
 1568|  9.06k|                        port ? ":" : "",
  ------------------
  |  Branch (1568:25): [True: 228, False: 8.83k]
  ------------------
 1569|  9.06k|                        port ? port : "",
  ------------------
  |  Branch (1569:25): [True: 228, False: 8.83k]
  ------------------
 1570|  9.06k|                        u->path ? u->path : "/",
  ------------------
  |  Branch (1570:25): [True: 1.69k, False: 7.36k]
  ------------------
 1571|  9.06k|                        querysep,
 1572|  9.06k|                        u->query ? u->query : "",
  ------------------
  |  Branch (1572:25): [True: 2.19k, False: 6.87k]
  ------------------
 1573|  9.06k|                        fragmentsep,
 1574|  9.06k|                        u->fragment ? u->fragment : "");
  ------------------
  |  Branch (1574:25): [True: 104, False: 8.96k]
  ------------------
 1575|  9.06k|    curlx_free(allochost);
  ------------------
  |  | 1488|  9.06k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1576|  9.06k|  }
 1577|  9.06k|  if(!url)
  ------------------
  |  Branch (1577:6): [True: 0, False: 9.06k]
  ------------------
 1578|      0|    return CURLUE_OUT_OF_MEMORY;
 1579|  9.06k|  *part = url;
 1580|  9.06k|  return CURLUE_OK;
 1581|  9.06k|}
urlapi.c:file_url:
 1459|     59|{
 1460|     59|  char *url = curl_maprintf("file://%s%s%s%s%s",
 1461|     59|                            u->path, querysep, u->query ? u->query : "",
  ------------------
  |  Branch (1461:48): [True: 12, False: 47]
  ------------------
 1462|     59|                            fragmentsep, u->fragment ? u->fragment : "");
  ------------------
  |  Branch (1462:42): [True: 4, False: 55]
  ------------------
 1463|     59|  if(!url)
  ------------------
  |  Branch (1463:6): [True: 0, False: 59]
  ------------------
 1464|      0|    return CURLUE_OUT_OF_MEMORY;
 1465|       |
 1466|     59|  *part = url;
 1467|     59|  return CURLUE_OK;
 1468|     59|}
urlapi.c:urlget_format:
 1389|  34.5k|{
 1390|  34.5k|  CURLUcode uc = CURLUE_OK;
 1391|  34.5k|  size_t partlen = strlen(ptr);
 1392|  34.5k|  bool urldecode = (flags & CURLU_URLDECODE) ? 1 : 0;
  ------------------
  |  |   93|  34.5k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
  |  Branch (1392:20): [True: 4.10k, False: 30.4k]
  ------------------
 1393|  34.5k|  bool urlencode = (flags & CURLU_URLENCODE) ? 1 : 0;
  ------------------
  |  |   94|  34.5k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1393:20): [True: 8.96k, False: 25.5k]
  ------------------
 1394|  34.5k|  bool punycode = (flags & CURLU_PUNYCODE) && (what == CURLUPART_HOST);
  ------------------
  |  |  100|  34.5k|#define CURLU_PUNYCODE (1 << 12)          /* get the hostname in punycode */
  ------------------
  |  Branch (1394:19): [True: 0, False: 34.5k]
  |  Branch (1394:47): [True: 0, False: 0]
  ------------------
 1395|  34.5k|  bool depunyfy = (flags & CURLU_PUNY2IDN) && (what == CURLUPART_HOST);
  ------------------
  |  |  101|  34.5k|#define CURLU_PUNY2IDN (1 << 13)          /* punycode => IDN conversion */
  ------------------
  |  Branch (1395:19): [True: 0, False: 34.5k]
  |  Branch (1395:47): [True: 0, False: 0]
  ------------------
 1396|  34.5k|  char *part = curlx_memdup0(ptr, partlen);
 1397|  34.5k|  *partp = NULL;
 1398|  34.5k|  if(!part)
  ------------------
  |  Branch (1398:6): [True: 0, False: 34.5k]
  ------------------
 1399|      0|    return CURLUE_OUT_OF_MEMORY;
 1400|  34.5k|  if(plusdecode) {
  ------------------
  |  Branch (1400:6): [True: 0, False: 34.5k]
  ------------------
 1401|       |    /* convert + to space */
 1402|      0|    char *plus = part;
 1403|      0|    size_t i = 0;
 1404|      0|    for(i = 0; i < partlen; ++plus, i++) {
  ------------------
  |  Branch (1404:16): [True: 0, False: 0]
  ------------------
 1405|      0|      if(*plus == '+')
  ------------------
  |  Branch (1405:10): [True: 0, False: 0]
  ------------------
 1406|      0|        *plus = ' ';
 1407|      0|    }
 1408|      0|  }
 1409|  34.5k|  if(urldecode) {
  ------------------
  |  Branch (1409:6): [True: 4.10k, False: 30.4k]
  ------------------
 1410|  4.10k|    char *decoded;
 1411|  4.10k|    size_t dlen;
 1412|       |    /* this unconditional rejection of control bytes is documented API
 1413|       |       behavior */
 1414|  4.10k|    CURLcode result = Curl_urldecode(part, partlen, &decoded, &dlen,
 1415|  4.10k|                                     REJECT_CTRL);
 1416|  4.10k|    curlx_free(part);
  ------------------
  |  | 1488|  4.10k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1417|  4.10k|    if(result)
  ------------------
  |  Branch (1417:8): [True: 3, False: 4.10k]
  ------------------
 1418|      3|      return CURLUE_URLDECODE;
 1419|  4.10k|    part = decoded;
 1420|  4.10k|    partlen = dlen;
 1421|  4.10k|  }
 1422|  34.5k|  if(urlencode) {
  ------------------
  |  Branch (1422:6): [True: 8.96k, False: 25.5k]
  ------------------
 1423|  8.96k|    struct dynbuf enc;
 1424|  8.96k|    curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|  8.96k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1425|  8.96k|    uc = urlencode_str(&enc, part, partlen, TRUE, what == CURLUPART_QUERY ?
  ------------------
  |  | 1051|  8.96k|#define TRUE true
  ------------------
  |  Branch (1425:51): [True: 0, False: 8.96k]
  ------------------
 1426|  8.96k|                       QUERY_YES : QUERY_NO);
  ------------------
  |  |   54|      0|#define QUERY_YES     4
  ------------------
                                     QUERY_YES : QUERY_NO);
  ------------------
  |  |   52|  17.9k|#define QUERY_NO      2
  ------------------
 1427|  8.96k|    curlx_free(part);
  ------------------
  |  | 1488|  8.96k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1428|  8.96k|    if(uc)
  ------------------
  |  Branch (1428:8): [True: 0, False: 8.96k]
  ------------------
 1429|      0|      return uc;
 1430|  8.96k|    part = curlx_dyn_ptr(&enc);
 1431|  8.96k|  }
 1432|  25.5k|  else if(punycode) {
  ------------------
  |  Branch (1432:11): [True: 0, False: 25.5k]
  ------------------
 1433|      0|    if(!Curl_is_ASCII_name(u->host)) {
  ------------------
  |  Branch (1433:8): [True: 0, False: 0]
  ------------------
 1434|      0|      char *punyversion = NULL;
 1435|      0|      uc = host_decode(part, &punyversion);
 1436|      0|      curlx_free(part);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1437|      0|      if(uc)
  ------------------
  |  Branch (1437:10): [True: 0, False: 0]
  ------------------
 1438|      0|        return uc;
 1439|      0|      part = punyversion;
 1440|      0|    }
 1441|      0|  }
 1442|  25.5k|  else if(depunyfy) {
  ------------------
  |  Branch (1442:11): [True: 0, False: 25.5k]
  ------------------
 1443|      0|    if(Curl_is_ASCII_name(u->host)) {
  ------------------
  |  Branch (1443:8): [True: 0, False: 0]
  ------------------
 1444|      0|      char *unpunified = NULL;
 1445|      0|      uc = host_encode(part, &unpunified);
 1446|      0|      curlx_free(part);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1447|      0|      if(uc)
  ------------------
  |  Branch (1447:10): [True: 0, False: 0]
  ------------------
 1448|      0|        return uc;
 1449|      0|      part = unpunified;
 1450|      0|    }
 1451|      0|  }
 1452|  34.5k|  *partp = part;
 1453|  34.5k|  return CURLUE_OK;
 1454|  34.5k|}
urlapi.c:set_url_port:
 1716|     15|{
 1717|     15|  curl_off_t port;
 1718|     15|  if(!ISDIGIT(provided_port[0]))
  ------------------
  |  |   44|     15|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 15, False: 0]
  |  |  |  Branch (44:38): [True: 15, False: 0]
  |  |  ------------------
  ------------------
 1719|       |    /* not a number */
 1720|      0|    return CURLUE_BAD_PORT_NUMBER;
 1721|     15|  if(curlx_str_number(&provided_port, &port, 0xffff) || *provided_port)
  ------------------
  |  Branch (1721:6): [True: 0, False: 15]
  |  Branch (1721:57): [True: 0, False: 15]
  ------------------
 1722|       |    /* weirdly provided number, not good! */
 1723|      0|    return CURLUE_BAD_PORT_NUMBER;
 1724|     15|  u->portnum = (uint16_t)port;
 1725|       |  u->port_present = TRUE;
  ------------------
  |  | 1051|     15|#define TRUE true
  ------------------
 1726|     15|  return CURLUE_OK;
 1727|     15|}
urlapi.c:set_url:
 1731|  12.0k|{
 1732|       |  /*
 1733|       |   * Allow a new URL to replace the existing (if any) contents.
 1734|       |   *
 1735|       |   * If the existing contents is enough for a URL, allow a relative URL to
 1736|       |   * replace it.
 1737|       |   */
 1738|  12.0k|  CURLUcode uc;
 1739|  12.0k|  char *oldurl = NULL;
 1740|       |
 1741|  12.0k|  if(!part_size) {
  ------------------
  |  Branch (1741:6): [True: 233, False: 11.7k]
  ------------------
 1742|       |    /* a blank URL is not a valid URL unless we already have a complete one
 1743|       |       and this is a redirect */
 1744|    233|    uc = curl_url_get(u, CURLUPART_URL, &oldurl, flags);
 1745|    233|    if(!uc) {
  ------------------
  |  Branch (1745:8): [True: 0, False: 233]
  ------------------
 1746|       |      /* success, meaning the "" is a fine relative URL, and the new URL
 1747|       |         inherits scheme/authority/path/query, but not fragment, from the
 1748|       |         existing URL (RFC 3986 section 5.2.2) */
 1749|      0|      curlx_safefree(u->fragment);
  ------------------
  |  | 1332|      0|  do {                      \
  |  | 1333|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|      0|    (ptr) = NULL;           \
  |  | 1335|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1750|      0|      u->fragment_present = FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1751|      0|      curlx_free(oldurl);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1752|      0|      return CURLUE_OK;
 1753|      0|    }
 1754|    233|    if(uc == CURLUE_OUT_OF_MEMORY)
  ------------------
  |  Branch (1754:8): [True: 0, False: 233]
  ------------------
 1755|      0|      return uc;
 1756|    233|    return CURLUE_MALFORMED_INPUT;
 1757|    233|  }
 1758|       |
 1759|       |  /* if the new URL is absolute replace the existing with the new. */
 1760|  11.7k|  if(Curl_is_absolute_url(url, NULL, 0,
  ------------------
  |  Branch (1760:6): [True: 8.06k, False: 3.72k]
  ------------------
 1761|  11.7k|                          flags & (CURLU_GUESS_SCHEME | CURLU_DEFAULT_SCHEME)))
  ------------------
  |  |   96|  11.7k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
                                        flags & (CURLU_GUESS_SCHEME | CURLU_DEFAULT_SCHEME)))
  ------------------
  |  |   88|  11.7k|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
 1762|  8.06k|    return parseurl_and_replace(url, u, flags);
 1763|       |
 1764|       |  /* if the old URL is incomplete (we cannot get an absolute URL in
 1765|       |     'oldurl'), replace the existing with the new.
 1766|       |     Always include "scheme://" to make the URL "complete" */
 1767|  3.72k|  uc = curl_url_get(u, CURLUPART_URL, &oldurl, flags & ~CURLU_NO_GUESS_SCHEME);
  ------------------
  |  |  105|  3.72k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
 1768|  3.72k|  if(uc == CURLUE_OUT_OF_MEMORY)
  ------------------
  |  Branch (1768:6): [True: 0, False: 3.72k]
  ------------------
 1769|      0|    return uc;
 1770|  3.72k|  else if(uc)
  ------------------
  |  Branch (1770:11): [True: 3.72k, False: 0]
  ------------------
 1771|  3.72k|    return parseurl_and_replace(url, u, flags);
 1772|       |
 1773|      0|  DEBUGASSERT(oldurl); /* it is set here */
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1773:3): [True: 0, False: 0]
  |  Branch (1773:3): [True: 0, False: 0]
  ------------------
 1774|       |  /* apply the relative part to create a new URL */
 1775|      0|  uc = redirect_url(oldurl, url, u, flags);
 1776|      0|  curlx_free(oldurl);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1777|      0|  return uc;
 1778|      0|}
urlapi.c:parseurl_and_replace:
 1224|  11.7k|{
 1225|  11.7k|  CURLUcode ures;
 1226|  11.7k|  CURLU tmpurl;
 1227|  11.7k|  memset(&tmpurl, 0, sizeof(tmpurl));
 1228|  11.7k|  ures = parseurl(url, &tmpurl, flags);
 1229|  11.7k|  if(!ures) {
  ------------------
  |  Branch (1229:6): [True: 11.3k, False: 431]
  ------------------
 1230|  11.3k|    free_urlhandle(u);
 1231|  11.3k|    *u = tmpurl;
 1232|  11.3k|  }
 1233|  11.7k|  return ures;
 1234|  11.7k|}
urlapi.c:parseurl:
 1134|  11.7k|{
 1135|  11.7k|  const char *path;
 1136|  11.7k|  size_t pathlen;
 1137|  11.7k|  char schemebuf[MAX_SCHEME_LEN + 1];
 1138|  11.7k|  size_t schemelen = 0;
 1139|  11.7k|  size_t urllen;
 1140|  11.7k|  CURLUcode ures = CURLUE_OK;
 1141|  11.7k|  struct dynbuf host;
 1142|  11.7k|  bool is_file = FALSE;
  ------------------
  |  | 1054|  11.7k|#define FALSE false
  ------------------
 1143|       |
 1144|  11.7k|  DEBUGASSERT(url);
  ------------------
  |  | 1077|  11.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1144:3): [True: 0, False: 11.7k]
  |  Branch (1144:3): [True: 11.7k, False: 0]
  ------------------
 1145|       |
 1146|  11.7k|  curlx_dyn_init(&host, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|  11.7k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1147|       |
 1148|  11.7k|  ures = Curl_junkscan(url, &urllen, !!(flags & CURLU_ALLOW_SPACE));
  ------------------
  |  |   99|  11.7k|#define CURLU_ALLOW_SPACE (1 << 11)       /* Allow spaces in the URL */
  ------------------
 1149|  11.7k|  if(ures)
  ------------------
  |  Branch (1149:6): [True: 44, False: 11.7k]
  ------------------
 1150|     44|    goto fail;
 1151|       |
 1152|  11.7k|  schemelen = Curl_is_absolute_url(url, schemebuf, sizeof(schemebuf),
 1153|  11.7k|                                   flags & (CURLU_GUESS_SCHEME |
  ------------------
  |  |   96|  11.7k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
 1154|  11.7k|                                            CURLU_DEFAULT_SCHEME));
  ------------------
  |  |   88|  11.7k|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
 1155|       |
 1156|       |  /* handle the file: scheme */
 1157|  11.7k|  if(schemelen && !strcmp(schemebuf, "file")) {
  ------------------
  |  Branch (1157:6): [True: 8.05k, False: 3.68k]
  |  Branch (1157:19): [True: 107, False: 7.94k]
  ------------------
 1158|    107|    is_file = TRUE;
  ------------------
  |  | 1051|    107|#define TRUE true
  ------------------
 1159|    107|    ures = parse_file(url, urllen, u, &path, &pathlen);
 1160|    107|  }
 1161|  11.6k|  else {
 1162|  11.6k|    const char *hostp = NULL;
 1163|  11.6k|    size_t hostlen;
 1164|  11.6k|    ures = parse_scheme(url, u, schemebuf, schemelen, flags, &hostp);
 1165|  11.6k|    if(ures)
  ------------------
  |  Branch (1165:8): [True: 3, False: 11.6k]
  ------------------
 1166|      3|      goto fail;
 1167|       |
 1168|       |    /* find the end of the hostname + port number */
 1169|  11.6k|    hostlen = strcspn(hostp, "/?#");
 1170|  11.6k|    path = &hostp[hostlen];
 1171|       |
 1172|       |    /* this pathlen also contains the query and the fragment */
 1173|  11.6k|    pathlen = urllen - (path - url);
 1174|  11.6k|    if(hostlen) {
  ------------------
  |  Branch (1174:8): [True: 11.5k, False: 71]
  ------------------
 1175|  11.5k|      ures = parse_authority(u, hostp, hostlen, flags, &host, !!u->scheme);
 1176|  11.5k|      if(!ures && (flags & CURLU_GUESS_SCHEME) && !u->scheme)
  ------------------
  |  |   96|  11.2k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
  |  Branch (1176:10): [True: 11.2k, False: 265]
  |  Branch (1176:19): [True: 11.2k, False: 0]
  |  Branch (1176:51): [True: 3.51k, False: 7.78k]
  ------------------
 1177|  3.51k|        ures = guess_scheme(u, &host);
 1178|  11.5k|    }
 1179|     71|    else if(flags & CURLU_NO_AUTHORITY) {
  ------------------
  |  |   97|     71|#define CURLU_NO_AUTHORITY (1 << 10)      /* Allow empty authority when the
  ------------------
  |  Branch (1179:13): [True: 0, False: 71]
  ------------------
 1180|       |      /* allowed to be empty. */
 1181|      0|      if(curlx_dyn_add(&host, ""))
  ------------------
  |  Branch (1181:10): [True: 0, False: 0]
  ------------------
 1182|      0|        ures = CURLUE_OUT_OF_MEMORY;
 1183|      0|    }
 1184|     71|    else
 1185|     71|      ures = CURLUE_NO_HOST;
 1186|  11.6k|  }
 1187|  11.7k|  if(!ures) {
  ------------------
  |  Branch (1187:6): [True: 11.3k, False: 384]
  ------------------
 1188|       |    /* The path might at this point contain a fragment and/or a query to
 1189|       |       handle */
 1190|  11.3k|    const char *fragment = strchr(path, '#');
 1191|  11.3k|    if(fragment) {
  ------------------
  |  Branch (1191:8): [True: 336, False: 11.0k]
  ------------------
 1192|    336|      size_t fraglen = pathlen - (fragment - path);
 1193|    336|      ures = handle_fragment(u, fragment, fraglen, flags);
 1194|       |      /* after this, pathlen still contains the query */
 1195|    336|      pathlen -= fraglen;
 1196|    336|    }
 1197|  11.3k|  }
 1198|  11.7k|  if(!ures) {
  ------------------
  |  Branch (1198:6): [True: 11.3k, False: 384]
  ------------------
 1199|  11.3k|    const char *query = memchr(path, '?', pathlen);
 1200|  11.3k|    if(query) {
  ------------------
  |  Branch (1200:8): [True: 2.26k, False: 9.08k]
  ------------------
 1201|  2.26k|      size_t qlen = pathlen - (query - path);
 1202|  2.26k|      ures = handle_query(u, query, qlen, flags);
 1203|  2.26k|      pathlen -= qlen;
 1204|  2.26k|    }
 1205|  11.3k|  }
 1206|  11.7k|  if(!ures)
  ------------------
  |  Branch (1206:6): [True: 11.3k, False: 384]
  ------------------
 1207|       |    /* the fragment and query parts are trimmed off from the path */
 1208|  11.3k|    ures = handle_path(u, path, pathlen, flags, is_file);
 1209|  11.7k|  if(!ures) {
  ------------------
  |  Branch (1209:6): [True: 11.3k, False: 384]
  ------------------
 1210|  11.3k|    u->host = curlx_dyn_ptr(&host);
 1211|  11.3k|    return CURLUE_OK;
 1212|  11.3k|  }
 1213|    431|fail:
 1214|    431|  curlx_dyn_free(&host);
 1215|    431|  free_urlhandle(u);
 1216|    431|  return ures;
 1217|  11.7k|}
urlapi.c:parse_scheme:
  963|  11.6k|{
  964|       |  /* clear path */
  965|  11.6k|  const char *schemep = NULL;
  966|       |
  967|  11.6k|  if(schemelen) {
  ------------------
  |  Branch (967:6): [True: 7.94k, False: 3.68k]
  ------------------
  968|  7.94k|    int i = 0;
  969|  7.94k|    const char *p = &url[schemelen + 1];
  970|  18.1k|    while((*p == '/') && (i < 4)) {
  ------------------
  |  Branch (970:11): [True: 10.2k, False: 7.94k]
  |  Branch (970:26): [True: 10.2k, False: 0]
  ------------------
  971|  10.2k|      p++;
  972|  10.2k|      i++;
  973|  10.2k|    }
  974|       |
  975|  7.94k|    schemep = schemebuf;
  976|  7.94k|    if(!Curl_get_scheme(schemep) &&
  ------------------
  |  Branch (976:8): [True: 59, False: 7.88k]
  ------------------
  977|     59|       !(flags & CURLU_NON_SUPPORT_SCHEME))
  ------------------
  |  |   90|     59|#define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
  ------------------
  |  Branch (977:8): [True: 0, False: 59]
  ------------------
  978|      0|      return CURLUE_UNSUPPORTED_SCHEME;
  979|       |
  980|  7.94k|    if((i < 1) || (i > 3))
  ------------------
  |  Branch (980:8): [True: 0, False: 7.94k]
  |  Branch (980:19): [True: 3, False: 7.94k]
  ------------------
  981|       |      /* less than one or more than three slashes */
  982|      3|      return CURLUE_BAD_SLASHES;
  983|       |
  984|  7.94k|    *hostpp = p; /* hostname starts here */
  985|  7.94k|  }
  986|  3.68k|  else {
  987|       |    /* no scheme! */
  988|       |
  989|  3.68k|    if(!(flags & (CURLU_DEFAULT_SCHEME | CURLU_GUESS_SCHEME)))
  ------------------
  |  |   88|  3.68k|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
                  if(!(flags & (CURLU_DEFAULT_SCHEME | CURLU_GUESS_SCHEME)))
  ------------------
  |  |   96|  3.68k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
  |  Branch (989:8): [True: 0, False: 3.68k]
  ------------------
  990|      0|      return CURLUE_BAD_SCHEME;
  991|       |
  992|  3.68k|    if(flags & CURLU_DEFAULT_SCHEME)
  ------------------
  |  |   88|  3.68k|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
  |  Branch (992:8): [True: 0, False: 3.68k]
  ------------------
  993|      0|      schemep = DEFAULT_SCHEME;
  ------------------
  |  |   70|      0|#define DEFAULT_SCHEME "https"
  ------------------
  994|       |
  995|       |    /*
  996|       |     * The URL was badly formatted, let's try without scheme specified.
  997|       |     */
  998|  3.68k|    *hostpp = url;
  999|  3.68k|  }
 1000|       |
 1001|  11.6k|  if(schemep) {
  ------------------
  |  Branch (1001:6): [True: 7.94k, False: 3.68k]
  ------------------
 1002|  7.94k|    u->scheme = curlx_strdup(schemep);
  ------------------
  |  | 1482|  7.94k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1003|  7.94k|    if(!u->scheme)
  ------------------
  |  Branch (1003:8): [True: 0, False: 7.94k]
  ------------------
 1004|      0|      return CURLUE_OUT_OF_MEMORY;
 1005|  7.94k|  }
 1006|  11.6k|  return CURLUE_OK;
 1007|  11.6k|}
urlapi.c:guess_scheme:
 1010|  3.51k|{
 1011|  3.51k|  const char *hostname = curlx_dyn_ptr(host);
 1012|  3.51k|  const char *schemep = NULL;
 1013|       |  /* legacy curl-style guess based on hostname */
 1014|  3.51k|  if(checkprefix("ftp.", hostname))
  ------------------
  |  |   33|  3.51k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|  3.51k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 3.50k]
  |  |  ------------------
  ------------------
 1015|      1|    schemep = "ftp";
 1016|  3.50k|  else if(checkprefix("dict.", hostname))
  ------------------
  |  |   33|  3.50k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|  3.50k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 5, False: 3.50k]
  |  |  ------------------
  ------------------
 1017|      5|    schemep = "dict";
 1018|  3.50k|  else if(checkprefix("ldap.", hostname))
  ------------------
  |  |   33|  3.50k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|  3.50k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1.04k, False: 2.46k]
  |  |  ------------------
  ------------------
 1019|  1.04k|    schemep = "ldap";
 1020|  2.46k|  else if(checkprefix("imap.", hostname))
  ------------------
  |  |   33|  2.46k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|  2.46k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 2.46k]
  |  |  ------------------
  ------------------
 1021|      1|    schemep = "imap";
 1022|  2.46k|  else if(checkprefix("smtp.", hostname))
  ------------------
  |  |   33|  2.46k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|  2.46k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 5, False: 2.45k]
  |  |  ------------------
  ------------------
 1023|      5|    schemep = "smtp";
 1024|  2.45k|  else if(checkprefix("pop3.", hostname))
  ------------------
  |  |   33|  2.45k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|  2.45k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 2.45k]
  |  |  ------------------
  ------------------
 1025|      1|    schemep = "pop3";
 1026|  2.45k|  else
 1027|  2.45k|    schemep = "http";
 1028|       |
 1029|  3.51k|  u->scheme = curlx_strdup(schemep);
  ------------------
  |  | 1482|  3.51k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1030|  3.51k|  if(!u->scheme)
  ------------------
  |  Branch (1030:6): [True: 0, False: 3.51k]
  ------------------
 1031|      0|    return CURLUE_OUT_OF_MEMORY;
 1032|       |
 1033|  3.51k|  u->guessed_scheme = TRUE;
  ------------------
  |  | 1051|  3.51k|#define TRUE true
  ------------------
 1034|  3.51k|  return CURLUE_OK;
 1035|  3.51k|}
urlapi.c:handle_fragment:
 1039|    336|{
 1040|    336|  CURLUcode ures;
 1041|    336|  u->fragment_present = TRUE;
  ------------------
  |  | 1051|    336|#define TRUE true
  ------------------
 1042|    336|  if(fraglen > 1) {
  ------------------
  |  Branch (1042:6): [True: 238, False: 98]
  ------------------
 1043|       |    /* skip the leading '#' in the copy but include the null-terminator */
 1044|    238|    if(flags & CURLU_URLENCODE) {
  ------------------
  |  |   94|    238|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1044:8): [True: 0, False: 238]
  ------------------
 1045|      0|      struct dynbuf enc;
 1046|      0|      curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|      0|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1047|      0|      ures = urlencode_str(&enc, fragment + 1, fraglen - 1, TRUE, QUERY_NO);
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
                    ures = urlencode_str(&enc, fragment + 1, fraglen - 1, TRUE, QUERY_NO);
  ------------------
  |  |   52|      0|#define QUERY_NO      2
  ------------------
 1048|      0|      if(ures)
  ------------------
  |  Branch (1048:10): [True: 0, False: 0]
  ------------------
 1049|      0|        return ures;
 1050|      0|      u->fragment = curlx_dyn_ptr(&enc);
 1051|      0|    }
 1052|    238|    else {
 1053|    238|      u->fragment = curlx_memdup0(fragment + 1, fraglen - 1);
 1054|    238|      if(!u->fragment)
  ------------------
  |  Branch (1054:10): [True: 0, False: 238]
  ------------------
 1055|      0|        return CURLUE_OUT_OF_MEMORY;
 1056|    238|    }
 1057|    238|  }
 1058|    336|  return CURLUE_OK;
 1059|    336|}
urlapi.c:handle_query:
 1063|  2.26k|{
 1064|  2.26k|  u->query_present = TRUE;
  ------------------
  |  | 1051|  2.26k|#define TRUE true
  ------------------
 1065|  2.26k|  if(qlen > 1) {
  ------------------
  |  Branch (1065:6): [True: 1.98k, False: 284]
  ------------------
 1066|  1.98k|    if(flags & CURLU_URLENCODE) {
  ------------------
  |  |   94|  1.98k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1066:8): [True: 0, False: 1.98k]
  ------------------
 1067|      0|      struct dynbuf enc;
 1068|      0|      CURLUcode ures;
 1069|      0|      curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|      0|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1070|       |      /* skip the leading question mark */
 1071|      0|      ures = urlencode_str(&enc, query + 1, qlen - 1, TRUE, QUERY_YES);
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
                    ures = urlencode_str(&enc, query + 1, qlen - 1, TRUE, QUERY_YES);
  ------------------
  |  |   54|      0|#define QUERY_YES     4
  ------------------
 1072|      0|      if(ures)
  ------------------
  |  Branch (1072:10): [True: 0, False: 0]
  ------------------
 1073|      0|        return ures;
 1074|      0|      u->query = curlx_dyn_ptr(&enc);
 1075|      0|    }
 1076|  1.98k|    else {
 1077|  1.98k|      u->query = curlx_memdup0(query + 1, qlen - 1);
 1078|  1.98k|      if(!u->query)
  ------------------
  |  Branch (1078:10): [True: 0, False: 1.98k]
  ------------------
 1079|      0|        return CURLUE_OUT_OF_MEMORY;
 1080|  1.98k|    }
 1081|  1.98k|  }
 1082|    284|  else {
 1083|       |    /* single byte query */
 1084|    284|    u->query = curlx_strdup("");
  ------------------
  |  | 1482|    284|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1085|    284|    if(!u->query)
  ------------------
  |  Branch (1085:8): [True: 0, False: 284]
  ------------------
 1086|      0|      return CURLUE_OUT_OF_MEMORY;
 1087|    284|  }
 1088|  2.26k|  return CURLUE_OK;
 1089|  2.26k|}
urlapi.c:handle_path:
 1094|  11.3k|{
 1095|  11.3k|  CURLUcode ures;
 1096|  11.3k|  if(pathlen && (flags & CURLU_URLENCODE)) {
  ------------------
  |  |   94|  2.50k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1096:6): [True: 2.50k, False: 8.84k]
  |  Branch (1096:17): [True: 0, False: 2.50k]
  ------------------
 1097|      0|    struct dynbuf enc;
 1098|      0|    curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|      0|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1099|      0|    ures = urlencode_str(&enc, path, pathlen, TRUE, QUERY_NO);
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
                  ures = urlencode_str(&enc, path, pathlen, TRUE, QUERY_NO);
  ------------------
  |  |   52|      0|#define QUERY_NO      2
  ------------------
 1100|      0|    if(ures)
  ------------------
  |  Branch (1100:8): [True: 0, False: 0]
  ------------------
 1101|      0|      return ures;
 1102|      0|    pathlen = curlx_dyn_len(&enc);
 1103|      0|    path = u->path = curlx_dyn_ptr(&enc);
 1104|      0|  }
 1105|       |
 1106|  11.3k|  if(pathlen >= (size_t)(1 + !is_file)) {
  ------------------
  |  Branch (1106:6): [True: 1.85k, False: 9.49k]
  ------------------
 1107|       |    /* paths for file:// scheme can be one byte, others need to be two */
 1108|  1.85k|    if(!u->path) {
  ------------------
  |  Branch (1108:8): [True: 1.85k, False: 0]
  ------------------
 1109|  1.85k|      u->path = curlx_memdup0(path, pathlen);
 1110|  1.85k|      if(!u->path)
  ------------------
  |  Branch (1110:10): [True: 0, False: 1.85k]
  ------------------
 1111|      0|        return CURLUE_OUT_OF_MEMORY;
 1112|  1.85k|      path = u->path;
 1113|  1.85k|    }
 1114|      0|    else if(flags & CURLU_URLENCODE)
  ------------------
  |  |   94|      0|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1114:13): [True: 0, False: 0]
  ------------------
 1115|       |      /* it might have encoded more than the path so cut it */
 1116|      0|      u->path[pathlen] = 0;
 1117|       |
 1118|  1.85k|    if(!(flags & CURLU_PATH_AS_IS)) {
  ------------------
  |  |   91|  1.85k|#define CURLU_PATH_AS_IS (1 << 4)         /* leave dot sequences */
  ------------------
  |  Branch (1118:8): [True: 1.85k, False: 2]
  ------------------
 1119|       |      /* remove ../ and ./ sequences according to RFC3986 */
 1120|  1.85k|      char *dedot;
 1121|  1.85k|      int err = dedotdotify(path, pathlen, &dedot);
 1122|  1.85k|      if(err)
  ------------------
  |  Branch (1122:10): [True: 0, False: 1.85k]
  ------------------
 1123|      0|        return CURLUE_OUT_OF_MEMORY;
 1124|  1.85k|      if(dedot) {
  ------------------
  |  Branch (1124:10): [True: 1.84k, False: 8]
  ------------------
 1125|  1.84k|        curlx_free(u->path);
  ------------------
  |  | 1488|  1.84k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1126|  1.84k|        u->path = dedot;
 1127|  1.84k|      }
 1128|  1.85k|    }
 1129|  1.85k|  }
 1130|  11.3k|  return CURLUE_OK;
 1131|  11.3k|}

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

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

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.76k|{
   69|  1.76k|  return !!keylog_file_fp;
   70|  1.76k|}

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

Curl_ssl_backend:
  134|  16.2k|{
  135|  16.2k|#ifdef USE_SSL
  136|  16.2k|  multissl_setup(NULL);
  137|  16.2k|  return Curl_ssl->info.id;
  138|       |#else
  139|       |  return CURLSSLBACKEND_NONE;
  140|       |#endif
  141|  16.2k|}
Curl_ssl_init:
  155|      1|{
  156|       |  /* make sure this is only done once */
  157|      1|  if(init_ssl)
  ------------------
  |  Branch (157:6): [True: 0, False: 1]
  ------------------
  158|      0|    return 1;
  159|      1|  init_ssl = TRUE; /* never again */
  ------------------
  |  | 1051|      1|#define TRUE true
  ------------------
  160|       |
  161|      1|  if(Curl_ssl->init)
  ------------------
  |  Branch (161:6): [True: 1, False: 0]
  ------------------
  162|      1|    return Curl_ssl->init();
  163|      0|  return 1;
  164|      1|}
Curl_ssl_close_all:
  230|  28.3k|{
  231|  28.3k|  if(Curl_ssl->close_all)
  ------------------
  |  Branch (231:6): [True: 28.3k, False: 0]
  ------------------
  232|  28.3k|    Curl_ssl->close_all(data);
  233|  28.3k|}
Curl_ssl_adjust_pollset:
  238|     65|{
  239|     65|  struct ssl_connect_data *connssl = cf->ctx;
  240|       |
  241|     65|  if(connssl->io_need) {
  ------------------
  |  Branch (241:6): [True: 65, False: 0]
  ------------------
  242|     65|    curl_socket_t sock = Curl_conn_cf_get_socket(cf->next, data);
  243|     65|    CURLcode result = CURLE_OK;
  244|     65|    if(sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|     65|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (244:8): [True: 65, False: 0]
  ------------------
  245|     65|      if(connssl->io_need & CURL_SSL_IO_NEED_SEND) {
  ------------------
  |  |  107|     65|#define CURL_SSL_IO_NEED_SEND   (1 << 1)
  ------------------
  |  Branch (245:10): [True: 0, False: 65]
  ------------------
  246|      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
  |  |  ------------------
  ------------------
  247|      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]
  |  |  ------------------
  ------------------
  248|      0|                    sock);
  249|      0|      }
  250|     65|      else {
  251|     65|        result = Curl_pollset_set_in_only(data, ps, sock);
  ------------------
  |  |  172|     65|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  283|     65|#define CURL_POLL_IN     1
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  284|     65|#define CURL_POLL_OUT    2
  |  |  ------------------
  ------------------
  252|     65|        CURL_TRC_CF(data, cf, "adjust_pollset, POLLIN fd=%" FMT_SOCKET_T,
  ------------------
  |  |  153|     65|  do {                                          \
  |  |  154|     65|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     65|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    130|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 65, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 65]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    130|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((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|     65|   (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|     65|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     65|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 65]
  |  |  ------------------
  ------------------
  253|     65|                    sock);
  254|     65|      }
  255|     65|    }
  256|     65|    return result;
  257|     65|  }
  258|      0|  return CURLE_OK;
  259|     65|}
Curl_ssl_set_engine:
  264|    710|{
  265|    710|  if(Curl_ssl->set_engine)
  ------------------
  |  Branch (265:6): [True: 710, False: 0]
  ------------------
  266|    710|    return Curl_ssl->set_engine(data, engine);
  267|      0|  return CURLE_NOT_BUILT_IN;
  268|    710|}
Curl_ssl_set_engine_default:
  273|      2|{
  274|      2|  if(Curl_ssl->set_engine_default)
  ------------------
  |  Branch (274:6): [True: 2, False: 0]
  ------------------
  275|      2|    return Curl_ssl->set_engine_default(data);
  276|      0|  return CURLE_NOT_BUILT_IN;
  277|      2|}
Curl_ssl_free_certinfo:
  299|  66.4k|{
  300|  66.4k|  struct curl_certinfo *ci = &data->info.certs;
  301|       |
  302|  66.4k|  if(ci->num_of_certs) {
  ------------------
  |  Branch (302:6): [True: 0, False: 66.4k]
  ------------------
  303|       |    /* free all individual lists used */
  304|      0|    int i;
  305|      0|    for(i = 0; i < ci->num_of_certs; i++) {
  ------------------
  |  Branch (305:16): [True: 0, False: 0]
  ------------------
  306|      0|      curl_slist_free_all(ci->certinfo[i]);
  307|      0|      ci->certinfo[i] = NULL;
  308|      0|    }
  309|       |
  310|       |    curlx_safefree(ci->certinfo); /* free the actual array too */
  ------------------
  |  | 1332|      0|  do {                      \
  |  | 1333|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|      0|    (ptr) = NULL;           \
  |  | 1335|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  311|      0|    ci->num_of_certs = 0;
  312|      0|  }
  313|  66.4k|}
Curl_ssl_random:
  371|  3.17k|{
  372|  3.17k|  DEBUGASSERT(length == sizeof(int));
  ------------------
  |  | 1077|  3.17k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (372:3): [True: 0, False: 3.17k]
  |  Branch (372:3): [True: 3.17k, False: 0]
  ------------------
  373|  3.17k|  if(Curl_ssl->random)
  ------------------
  |  Branch (373:6): [True: 3.17k, False: 0]
  ------------------
  374|  3.17k|    return Curl_ssl->random(data, buffer, length);
  375|      0|  else
  376|      0|    return CURLE_NOT_BUILT_IN;
  377|  3.17k|}
Curl_ssl_cert_status_request:
  589|    631|{
  590|    631|  if(Curl_ssl->cert_status_request)
  ------------------
  |  Branch (590:6): [True: 631, False: 0]
  ------------------
  591|    631|    return Curl_ssl->cert_status_request();
  592|      0|  return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  593|    631|}
Curl_ssl_peer_cleanup:
  871|  2.47k|{
  872|  2.47k|  Curl_peer_unlink(&peer->origin);
  873|  2.47k|  Curl_peer_unlink(&peer->peer);
  874|  2.47k|  curlx_safefree(peer->sni);
  ------------------
  |  | 1332|  2.47k|  do {                      \
  |  | 1333|  2.47k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  2.47k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  2.47k|    (ptr) = NULL;           \
  |  | 1335|  2.47k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 2.47k]
  |  |  ------------------
  ------------------
  875|  2.47k|  curlx_safefree(peer->scache_key);
  ------------------
  |  | 1332|  2.47k|  do {                      \
  |  | 1333|  2.47k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  2.47k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  2.47k|    (ptr) = NULL;           \
  |  | 1335|  2.47k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 2.47k]
  |  |  ------------------
  ------------------
  876|  2.47k|  peer->transport = TRNSPRT_NONE;
  ------------------
  |  |  248|  2.47k|#define TRNSPRT_NONE 0
  ------------------
  877|  2.47k|  peer->type = CURL_SSL_PEER_DNS;
  878|  2.47k|}
Curl_ssl_peer_init:
  905|  2.46k|{
  906|  2.46k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  907|       |
  908|       |  /* We expect a clean struct, e.g. called only ONCE */
  909|  2.46k|  if(!ssl_peer || !origin) {
  ------------------
  |  Branch (909:6): [True: 0, False: 2.46k]
  |  Branch (909:19): [True: 0, False: 2.46k]
  ------------------
  910|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (910:5): [Folded, False: 0]
  |  Branch (910:5): [Folded, False: 0]
  ------------------
  911|      0|    return CURLE_FAILED_INIT;
  912|      0|  }
  913|  2.46k|  DEBUGASSERT(!ssl_peer->origin);
  ------------------
  |  | 1077|  2.46k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (913:3): [True: 0, False: 2.46k]
  |  Branch (913:3): [True: 2.46k, False: 0]
  ------------------
  914|  2.46k|  DEBUGASSERT(!ssl_peer->peer);
  ------------------
  |  | 1077|  2.46k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (914:3): [True: 0, False: 2.46k]
  |  Branch (914:3): [True: 2.46k, False: 0]
  ------------------
  915|  2.46k|  DEBUGASSERT(!ssl_peer->sni);
  ------------------
  |  | 1077|  2.46k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (915:3): [True: 0, False: 2.46k]
  |  Branch (915:3): [True: 2.46k, False: 0]
  ------------------
  916|  2.46k|  ssl_peer->transport = transport;
  917|       |
  918|  2.46k|  Curl_peer_link(&ssl_peer->origin, origin);
  919|  2.46k|  Curl_peer_link(&ssl_peer->peer, peer);
  920|  2.46k|  ssl_peer->type = get_peer_type(origin->hostname);
  921|  2.46k|  if(ssl_peer->type == CURL_SSL_PEER_DNS) {
  ------------------
  |  Branch (921:6): [True: 1.60k, False: 859]
  ------------------
  922|       |    /* not an IP address, normalize according to RCC 6066 ch. 3,
  923|       |     * max len of SNI is 2^16-1, no trailing dot */
  924|  1.60k|    size_t len = strlen(origin->hostname);
  925|  1.60k|    if(len && (origin->hostname[len - 1] == '.'))
  ------------------
  |  Branch (925:8): [True: 1.60k, False: 0]
  |  Branch (925:15): [True: 47, False: 1.55k]
  ------------------
  926|     47|      len--;
  927|  1.60k|    if(len < USHRT_MAX) {
  ------------------
  |  Branch (927:8): [True: 1.60k, False: 0]
  ------------------
  928|  1.60k|      ssl_peer->sni = curlx_calloc(1, len + 1);
  ------------------
  |  | 1485|  1.60k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  929|  1.60k|      if(!ssl_peer->sni)
  ------------------
  |  Branch (929:10): [True: 0, False: 1.60k]
  ------------------
  930|      0|        goto out;
  931|  1.60k|      Curl_strntolower(ssl_peer->sni, origin->hostname, len);
  932|  1.60k|      ssl_peer->sni[len] = 0;
  933|  1.60k|    }
  934|  1.60k|  }
  935|       |
  936|  2.46k|  result = Curl_ssl_peer_key_make(ssl_peer, sslc, tls_id,
  937|  2.46k|                                  &ssl_peer->scache_key);
  938|       |
  939|  2.46k|out:
  940|  2.46k|  if(result)
  ------------------
  |  Branch (940:6): [True: 14, False: 2.44k]
  ------------------
  941|     14|    Curl_ssl_peer_cleanup(ssl_peer);
  942|  2.46k|  return result;
  943|  2.46k|}
Curl_ssl_cfilter_add:
 1397|      1|{
 1398|      1|  struct Curl_cfilter *cf;
 1399|      1|  struct Curl_peer *peer = (sockindex == SECONDARYSOCKET) ?
  ------------------
  |  |  246|      1|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (1399:28): [True: 0, False: 1]
  ------------------
 1400|      1|    conn->via_peer2 : conn->via_peer;
 1401|      1|  CURLcode result;
 1402|       |
 1403|      1|  result = cf_ssl_create(&cf, data, conn);
 1404|      1|  if(!result)
  ------------------
  |  Branch (1404:6): [True: 1, False: 0]
  ------------------
 1405|      1|    result = cf_ssl_peer_init(cf, origin, peer, &conn->ssl_config);
 1406|      1|  if(!result)
  ------------------
  |  Branch (1406:6): [True: 1, False: 0]
  ------------------
 1407|      1|    Curl_conn_cf_add(data, conn, sockindex, cf);
 1408|      0|  else if(cf)
  ------------------
  |  Branch (1408:11): [True: 0, False: 0]
  ------------------
 1409|      0|    Curl_conn_cf_discard_chain(&cf, data);
 1410|      1|  return result;
 1411|      1|}
Curl_cf_ssl_insert_after:
 1417|  2.01k|{
 1418|  2.01k|  struct Curl_cfilter *cf;
 1419|  2.01k|  CURLcode result;
 1420|       |
 1421|  2.01k|  result = cf_ssl_create(&cf, data, cf_at->conn);
 1422|  2.01k|  if(!result)
  ------------------
  |  Branch (1422:6): [True: 2.01k, False: 0]
  ------------------
 1423|  2.01k|    result = cf_ssl_peer_init(cf, origin, peer, &cf_at->conn->ssl_config);
 1424|  2.01k|  if(!result)
  ------------------
  |  Branch (1424:6): [True: 2.00k, False: 14]
  ------------------
 1425|  2.00k|    Curl_conn_cf_insert_after(cf_at, cf);
 1426|     14|  else if(cf)
  ------------------
  |  Branch (1426:11): [True: 14, False: 0]
  ------------------
 1427|     14|    Curl_conn_cf_discard_chain(&cf, data);
 1428|  2.01k|  return result;
 1429|  2.01k|}
Curl_cf_ssl_proxy_insert_after:
 1469|    446|{
 1470|    446|  struct Curl_cfilter *cf;
 1471|    446|  CURLcode result;
 1472|       |
 1473|    446|  result = cf_ssl_proxy_create(&cf, data, cf_at->conn);
 1474|    446|  if(!result)
  ------------------
  |  Branch (1474:6): [True: 446, False: 0]
  ------------------
 1475|    446|    result = cf_ssl_peer_init(cf, peer, NULL, &cf_at->conn->proxy_ssl_config);
 1476|    446|  if(!result)
  ------------------
  |  Branch (1476:6): [True: 446, False: 0]
  ------------------
 1477|    446|    Curl_conn_cf_insert_after(cf_at, cf);
 1478|      0|  else if(cf)
  ------------------
  |  Branch (1478:11): [True: 0, False: 0]
  ------------------
 1479|      0|    Curl_conn_cf_discard_chain(&cf, data);
 1480|    446|  return result;
 1481|    446|}
Curl_ssl_supports:
 1486|  16.2k|{
 1487|  16.2k|  (void)data;
 1488|  16.2k|  return (Curl_ssl->supports & ssl_option);
 1489|  16.2k|}
Curl_ssl_cf_is_proxy:
 1571|  36.5k|{
 1572|  36.5k|  return (cf->cft->flags & CF_TYPE_SSL) && (cf->cft->flags & CF_TYPE_PROXY);
  ------------------
  |  |  203|  36.5k|#define CF_TYPE_SSL         (1 << 1)
  ------------------
                return (cf->cft->flags & CF_TYPE_SSL) && (cf->cft->flags & CF_TYPE_PROXY);
  ------------------
  |  |  205|  36.5k|#define CF_TYPE_PROXY       (1 << 3)
  ------------------
  |  Branch (1572:10): [True: 36.5k, False: 0]
  |  Branch (1572:44): [True: 6.70k, False: 29.8k]
  ------------------
 1573|  36.5k|}
Curl_ssl_cf_get_config:
 1577|  15.0k|{
 1578|       |#ifdef CURL_DISABLE_PROXY
 1579|       |  (void)cf;
 1580|       |  return &data->set.ssl;
 1581|       |#else
 1582|  15.0k|  return Curl_ssl_cf_is_proxy(cf) ? &data->set.proxy_ssl : &data->set.ssl;
  ------------------
  |  Branch (1582:10): [True: 2.71k, False: 12.3k]
  ------------------
 1583|  15.0k|#endif
 1584|  15.0k|}
Curl_ssl_cf_get_primary_config:
 1588|  21.5k|{
 1589|       |#ifdef CURL_DISABLE_PROXY
 1590|       |  return &cf->conn->ssl_config;
 1591|       |#else
 1592|  21.5k|  return Curl_ssl_cf_is_proxy(cf) ?
  ------------------
  |  Branch (1592:10): [True: 3.99k, False: 17.5k]
  ------------------
 1593|  17.5k|    &cf->conn->proxy_ssl_config : &cf->conn->ssl_config;
 1594|  21.5k|#endif
 1595|  21.5k|}
Curl_alpn_to_proto_buf:
 1599|    443|{
 1600|    443|  size_t i, len;
 1601|    443|  int off = 0;
 1602|    443|  unsigned char blen;
 1603|       |
 1604|    443|  memset(buf, 0, sizeof(*buf));
 1605|    889|  for(i = 0; spec && i < spec->count; ++i) {
  ------------------
  |  Branch (1605:14): [True: 889, False: 0]
  |  Branch (1605:22): [True: 446, False: 443]
  ------------------
 1606|    446|    len = strlen(spec->entries[i]);
 1607|    446|    if(len >= ALPN_NAME_MAX)
  ------------------
  |  |   52|    446|#define ALPN_NAME_MAX      10
  ------------------
  |  Branch (1607:8): [True: 0, False: 446]
  ------------------
 1608|      0|      return CURLE_FAILED_INIT;
 1609|    446|    blen = (unsigned char)len;
 1610|    446|    if(off + blen + 1 >= (int)sizeof(buf->data))
  ------------------
  |  Branch (1610:8): [True: 0, False: 446]
  ------------------
 1611|      0|      return CURLE_FAILED_INIT;
 1612|    446|    buf->data[off++] = blen;
 1613|    446|    memcpy(buf->data + off, spec->entries[i], blen);
 1614|    446|    off += blen;
 1615|    446|  }
 1616|    443|  buf->len = off;
 1617|    443|  return CURLE_OK;
 1618|    443|}
Curl_alpn_to_proto_str:
 1622|    443|{
 1623|    443|  size_t i, len;
 1624|    443|  size_t off = 0;
 1625|       |
 1626|    443|  memset(buf, 0, sizeof(*buf));
 1627|    889|  for(i = 0; spec && i < spec->count; ++i) {
  ------------------
  |  Branch (1627:14): [True: 889, False: 0]
  |  Branch (1627:22): [True: 446, False: 443]
  ------------------
 1628|    446|    len = strlen(spec->entries[i]);
 1629|    446|    if(len >= ALPN_NAME_MAX)
  ------------------
  |  |   52|    446|#define ALPN_NAME_MAX      10
  ------------------
  |  Branch (1629:8): [True: 0, False: 446]
  ------------------
 1630|      0|      return CURLE_FAILED_INIT;
 1631|    446|    if(off + len + 2 >= sizeof(buf->data))
  ------------------
  |  Branch (1631:8): [True: 0, False: 446]
  ------------------
 1632|      0|      return CURLE_FAILED_INIT;
 1633|    446|    if(off)
  ------------------
  |  Branch (1633:8): [True: 3, False: 443]
  ------------------
 1634|      3|      buf->data[off++] = ',';
 1635|    446|    memcpy(buf->data + off, spec->entries[i], len);
 1636|    446|    off += len;
 1637|    446|  }
 1638|    443|  buf->data[off] = '\0';
 1639|    443|  buf->len = (int)off;
 1640|    443|  return CURLE_OK;
 1641|    443|}
Curl_alpn_copy:
 1666|  1.76k|{
 1667|  1.76k|  if(src)
  ------------------
  |  Branch (1667:6): [True: 443, False: 1.31k]
  ------------------
 1668|    443|    memcpy(dest, src, sizeof(*dest));
 1669|  1.31k|  else
 1670|  1.31k|    memset(dest, 0, sizeof(*dest));
 1671|  1.76k|}
vtls.c:multissl_setup:
  782|  16.2k|{
  783|  16.2k|  int i;
  784|  16.2k|  char *env;
  785|       |
  786|  16.2k|  if(Curl_ssl != &Curl_ssl_multi)
  ------------------
  |  Branch (786:6): [True: 16.2k, False: 0]
  ------------------
  787|  16.2k|    return 1;
  788|       |
  789|      0|  if(backend) {
  ------------------
  |  Branch (789:6): [True: 0, False: 0]
  ------------------
  790|      0|    Curl_ssl = backend;
  791|      0|    return 0;
  792|      0|  }
  793|       |
  794|      0|  if(!available_backends[0])
  ------------------
  |  Branch (794:6): [True: 0, False: 0]
  ------------------
  795|      0|    return 1;
  796|       |
  797|      0|  env = curl_getenv("CURL_SSL_BACKEND");
  798|      0|  if(env) {
  ------------------
  |  Branch (798:6): [True: 0, False: 0]
  ------------------
  799|      0|    for(i = 0; available_backends[i]; i++) {
  ------------------
  |  Branch (799:16): [True: 0, False: 0]
  ------------------
  800|      0|      if(curl_strequal(env, available_backends[i]->info.name)) {
  ------------------
  |  Branch (800:10): [True: 0, False: 0]
  ------------------
  801|      0|        Curl_ssl = available_backends[i];
  802|      0|        curlx_free(env);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  803|      0|        return 0;
  804|      0|      }
  805|      0|    }
  806|      0|  }
  807|       |
  808|       |#ifdef CURL_DEFAULT_SSL_BACKEND
  809|       |  for(i = 0; available_backends[i]; i++) {
  810|       |    if(curl_strequal(CURL_DEFAULT_SSL_BACKEND,
  811|       |                     available_backends[i]->info.name)) {
  812|       |      Curl_ssl = available_backends[i];
  813|       |      curlx_free(env);
  814|       |      return 0;
  815|       |    }
  816|       |  }
  817|       |#endif
  818|       |
  819|       |  /* Fall back to first available backend */
  820|      0|  Curl_ssl = available_backends[0];
  821|      0|  curlx_free(env);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  822|      0|  return 0;
  823|      0|}
vtls.c:get_peer_type:
  881|  2.46k|{
  882|  2.46k|  if(hostname && hostname[0]) {
  ------------------
  |  Branch (882:6): [True: 2.46k, False: 0]
  |  Branch (882:18): [True: 2.46k, False: 0]
  ------------------
  883|  2.46k|#ifdef USE_IPV6
  884|  2.46k|    struct in6_addr addr;
  885|       |#else
  886|       |    struct in_addr addr;
  887|       |#endif
  888|  2.46k|    if(curlx_inet_pton(AF_INET, hostname, &addr))
  ------------------
  |  Branch (888:8): [True: 851, False: 1.61k]
  ------------------
  889|    851|      return CURL_SSL_PEER_IPV4;
  890|  1.61k|#ifdef USE_IPV6
  891|  1.61k|    else if(curlx_inet_pton(AF_INET6, hostname, &addr)) {
  ------------------
  |  Branch (891:13): [True: 8, False: 1.60k]
  ------------------
  892|      8|      return CURL_SSL_PEER_IPV6;
  893|      8|    }
  894|  2.46k|#endif
  895|  2.46k|  }
  896|  1.60k|  return CURL_SSL_PEER_DNS;
  897|  2.46k|}
vtls.c:ssl_cf_destroy:
  946|  2.46k|{
  947|  2.46k|  struct ssl_connect_data *connssl = cf->ctx;
  948|  2.46k|  if(connssl) {
  ------------------
  |  Branch (948:6): [True: 2.46k, False: 0]
  ------------------
  949|  2.46k|    connssl->ssl_impl->close(cf, data);
  950|  2.46k|    connssl->state = ssl_connection_none;
  951|  2.46k|    connssl->connecting_state = ssl_connect_1;
  952|  2.46k|    connssl->prefs_checked = FALSE;
  ------------------
  |  | 1054|  2.46k|#define FALSE false
  ------------------
  953|  2.46k|    Curl_ssl_peer_cleanup(&connssl->peer);
  954|  2.46k|    Curl_ssl_session_destroy(connssl->session);
  955|  2.46k|    cf_ctx_free(connssl);
  956|  2.46k|    cf->ctx = NULL;
  957|  2.46k|  }
  958|       |  cf->connected = FALSE;
  ------------------
  |  | 1054|  2.46k|#define FALSE false
  ------------------
  959|  2.46k|}
vtls.c:cf_ctx_free:
  212|  2.46k|{
  213|  2.46k|  if(ctx) {
  ------------------
  |  Branch (213:6): [True: 2.46k, False: 0]
  ------------------
  214|  2.46k|    curlx_safefree(ctx->negotiated.alpn);
  ------------------
  |  | 1332|  2.46k|  do {                      \
  |  | 1333|  2.46k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  2.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  2.46k|    (ptr) = NULL;           \
  |  | 1335|  2.46k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 2.46k]
  |  |  ------------------
  ------------------
  215|  2.46k|    Curl_bufq_free(&ctx->earlydata);
  216|  2.46k|    curlx_free(ctx->backend);
  ------------------
  |  | 1488|  2.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  217|  2.46k|    curlx_free(ctx);
  ------------------
  |  | 1488|  2.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  218|  2.46k|  }
  219|  2.46k|}
vtls.c:ssl_cf_connect:
  964|  2.50k|{
  965|  2.50k|  struct ssl_connect_data *connssl = cf->ctx;
  966|  2.50k|  struct cf_call_data save;
  967|  2.50k|  CURLcode result;
  968|       |
  969|  2.50k|  if(cf->connected && (connssl->state != ssl_connection_deferred)) {
  ------------------
  |  Branch (969:6): [True: 0, False: 2.50k]
  |  Branch (969:23): [True: 0, False: 0]
  ------------------
  970|      0|    *done = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  971|      0|    return CURLE_OK;
  972|      0|  }
  973|       |
  974|  2.50k|  if(!cf->next || !connssl->peer.origin) {
  ------------------
  |  Branch (974:6): [True: 0, False: 2.50k]
  |  Branch (974:19): [True: 0, False: 2.50k]
  ------------------
  975|      0|    *done = FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  976|      0|    return CURLE_FAILED_INIT;
  977|      0|  }
  978|       |
  979|  2.50k|  if(!cf->next->connected) {
  ------------------
  |  Branch (979:6): [True: 0, False: 2.50k]
  ------------------
  980|      0|    result = cf->next->cft->do_connect(cf->next, data, done);
  981|      0|    if(result || !*done)
  ------------------
  |  Branch (981:8): [True: 0, False: 0]
  |  Branch (981:18): [True: 0, False: 0]
  ------------------
  982|      0|      return result;
  983|      0|  }
  984|       |
  985|  2.50k|  CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  660|  2.50k|  do { \
  |  |  661|  2.50k|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  221|  2.50k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  662|  2.50k|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1077|  2.50k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  663|  2.50k|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  221|  2.50k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  664|  2.50k|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  221|  2.50k|#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); \
  |  |  ------------------
  |  |  |  |  862|  2.50k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  665|  2.50k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (665:11): [Folded, False: 2.50k]
  |  |  ------------------
  ------------------
  |  Branch (985:3): [True: 2.50k, False: 0]
  |  Branch (985:3): [True: 0, False: 0]
  |  Branch (985:3): [True: 2.50k, False: 0]
  |  Branch (985:3): [True: 0, False: 0]
  ------------------
  986|  2.50k|  CURL_TRC_CF(data, cf, "cf_connect()");
  ------------------
  |  |  153|  2.50k|  do {                                          \
  |  |  154|  2.50k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  2.50k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  5.01k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2.50k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.50k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  5.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|  2.50k|   (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.50k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  2.50k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2.50k]
  |  |  ------------------
  ------------------
  987|  2.50k|  DEBUGASSERT(connssl);
  ------------------
  |  | 1077|  2.50k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (987:3): [True: 0, False: 2.50k]
  |  Branch (987:3): [True: 2.50k, False: 0]
  ------------------
  988|       |
  989|  2.50k|  *done = FALSE;
  ------------------
  |  | 1054|  2.50k|#define FALSE false
  ------------------
  990|       |
  991|  2.50k|  if(!connssl->prefs_checked) {
  ------------------
  |  Branch (991:6): [True: 2.44k, False: 61]
  ------------------
  992|  2.44k|    if(!ssl_prefs_check(data)) {
  ------------------
  |  Branch (992:8): [True: 1, False: 2.44k]
  ------------------
  993|      1|      result = CURLE_SSL_CONNECT_ERROR;
  994|      1|      goto out;
  995|      1|    }
  996|  2.44k|    connssl->prefs_checked = TRUE;
  ------------------
  |  | 1051|  2.44k|#define TRUE true
  ------------------
  997|  2.44k|  }
  998|       |
  999|  2.50k|  result = connssl->ssl_impl->do_connect(cf, data, done);
 1000|       |
 1001|  2.50k|  if(!result && *done) {
  ------------------
  |  Branch (1001:6): [True: 66, False: 2.44k]
  |  Branch (1001:17): [True: 0, False: 66]
  ------------------
 1002|      0|    cf->connected = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 1003|      0|    if(connssl->state == ssl_connection_complete) {
  ------------------
  |  Branch (1003:8): [True: 0, False: 0]
  ------------------
 1004|      0|      connssl->handshake_done = *Curl_pgrs_now(data);
 1005|      0|    }
 1006|      0|    if(Curl_tls_keylog_enabled()) {
  ------------------
  |  Branch (1006:8): [True: 0, False: 0]
  ------------------
 1007|      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]
  |  |  ------------------
  ------------------
 1008|      0|            Curl_tls_keylog_file_name());
 1009|       |#ifdef LIBRESSL_VERSION_NUMBER
 1010|       |      infof(data, "Note LibreSSL only supports SSLKEYLOGFILE for TLS <= 1.2");
 1011|       |#endif
 1012|      0|    }
 1013|       |    /* Connection can be deferred when sending early data */
 1014|      0|    DEBUGASSERT(connssl->state == ssl_connection_complete ||
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1014:5): [True: 0, False: 0]
  |  Branch (1014:5): [True: 0, False: 0]
  |  Branch (1014:5): [True: 0, False: 0]
  |  Branch (1014:5): [True: 0, False: 0]
  ------------------
 1015|      0|                connssl->state == ssl_connection_deferred);
 1016|      0|    DEBUGASSERT(connssl->state != ssl_connection_deferred ||
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1016:5): [True: 0, False: 0]
  |  Branch (1016:5): [True: 0, False: 0]
  |  Branch (1016:5): [True: 0, False: 0]
  |  Branch (1016:5): [True: 0, False: 0]
  ------------------
 1017|      0|                connssl->earlydata_state > ssl_earlydata_none);
 1018|      0|  }
 1019|  2.50k|out:
 1020|  2.50k|  CURL_TRC_CF(data, cf, "cf_connect() -> %d, done=%d", (int)result, *done);
  ------------------
  |  |  153|  2.50k|  do {                                          \
  |  |  154|  2.50k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  2.50k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  5.01k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2.50k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.50k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  5.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|  2.50k|   (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.50k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  2.50k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2.50k]
  |  |  ------------------
  ------------------
 1021|  2.50k|  CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  668|  2.50k|  do { \
  |  |  669|  2.50k|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1077|  2.50k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  670|  2.50k|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1077|  2.50k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  671|  2.50k|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  221|  2.50k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  672|  2.50k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (672:11): [Folded, False: 2.50k]
  |  |  ------------------
  ------------------
  |  Branch (1021:3): [True: 0, False: 2.50k]
  |  Branch (1021:3): [True: 2.50k, False: 0]
  |  Branch (1021:3): [True: 2.50k, False: 0]
  |  Branch (1021:3): [True: 0, False: 0]
  |  Branch (1021:3): [True: 2.50k, False: 0]
  |  Branch (1021:3): [True: 0, False: 0]
  ------------------
 1022|  2.50k|  return result;
 1023|  2.50k|}
vtls.c:ssl_prefs_check:
  167|  2.44k|{
  168|       |  /* check for CURLOPT_SSLVERSION invalid parameter value */
  169|  2.44k|  const unsigned char sslver = data->set.ssl.primary.version;
  170|  2.44k|  if(sslver >= CURL_SSLVERSION_LAST) {
  ------------------
  |  | 2383|  2.44k|#define CURL_SSLVERSION_LAST    8L /* never use, keep last */
  ------------------
  |  Branch (170:6): [True: 0, False: 2.44k]
  ------------------
  171|      0|    failf(data, "Unrecognized parameter value passed via CURLOPT_SSLVERSION");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  172|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  173|      0|  }
  174|       |
  175|  2.44k|  switch(data->set.ssl.primary.version_max) {
  176|  2.39k|  case CURL_SSLVERSION_MAX_NONE:
  ------------------
  |  | 2385|  2.39k|#define CURL_SSLVERSION_MAX_NONE 0L
  ------------------
  |  Branch (176:3): [True: 2.39k, False: 50]
  ------------------
  177|  2.40k|  case CURL_SSLVERSION_MAX_DEFAULT:
  ------------------
  |  | 2386|  2.40k|#define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1   << 16)
  |  |  ------------------
  |  |  |  | 2375|  2.40k|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  |  |  ------------------
  ------------------
  |  Branch (177:3): [True: 3, False: 2.44k]
  ------------------
  178|  2.40k|    break;
  179|       |
  180|     47|  default:
  ------------------
  |  Branch (180:3): [True: 47, False: 2.40k]
  ------------------
  181|     47|    if((data->set.ssl.primary.version_max >> 16) < sslver) {
  ------------------
  |  Branch (181:8): [True: 1, False: 46]
  ------------------
  182|      1|      failf(data, "CURL_SSLVERSION_MAX incompatible with CURL_SSLVERSION");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  183|      1|      return FALSE;
  ------------------
  |  | 1054|      1|#define FALSE false
  ------------------
  184|      1|    }
  185|  2.44k|  }
  186|       |
  187|  2.44k|  return TRUE;
  ------------------
  |  | 1051|  2.44k|#define TRUE true
  ------------------
  188|  2.44k|}
vtls.c:ssl_cf_adjust_pollset:
 1220|     65|{
 1221|     65|  struct ssl_connect_data *connssl = cf->ctx;
 1222|     65|  struct cf_call_data save;
 1223|     65|  CURLcode result;
 1224|       |
 1225|     65|  CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  660|     65|  do { \
  |  |  661|     65|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  221|     65|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  662|     65|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1077|     65|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  663|     65|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  221|     65|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  664|     65|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  221|     65|#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); \
  |  |  ------------------
  |  |  |  |  862|     65|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  665|     65|  } while(0)
  |  |  ------------------
  |  |  |  Branch (665:11): [Folded, False: 65]
  |  |  ------------------
  ------------------
  |  Branch (1225:3): [True: 65, False: 0]
  |  Branch (1225:3): [True: 0, False: 0]
  |  Branch (1225:3): [True: 65, False: 0]
  |  Branch (1225:3): [True: 0, False: 0]
  ------------------
 1226|     65|  result = connssl->ssl_impl->adjust_pollset(cf, data, ps);
 1227|     65|  CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  668|     65|  do { \
  |  |  669|     65|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1077|     65|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  670|     65|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1077|     65|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  671|     65|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  221|     65|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  672|     65|  } while(0)
  |  |  ------------------
  |  |  |  Branch (672:11): [Folded, False: 65]
  |  |  ------------------
  ------------------
  |  Branch (1227:3): [True: 0, False: 65]
  |  Branch (1227:3): [True: 65, False: 0]
  |  Branch (1227:3): [True: 65, False: 0]
  |  Branch (1227:3): [True: 0, False: 0]
  |  Branch (1227:3): [True: 65, False: 0]
  |  Branch (1227:3): [True: 0, False: 0]
  ------------------
 1228|     65|  return result;
 1229|     65|}
vtls.c:ssl_cf_cntrl:
 1276|  2.00k|{
 1277|  2.00k|  struct ssl_connect_data *connssl = cf->ctx;
 1278|       |
 1279|  2.00k|  (void)arg1;
 1280|  2.00k|  (void)arg2;
 1281|  2.00k|  (void)data;
 1282|  2.00k|  switch(event) {
  ------------------
  |  Branch (1282:10): [True: 0, False: 2.00k]
  ------------------
 1283|      0|  case CF_CTRL_CONN_INFO_UPDATE:
  ------------------
  |  |  121|      0|#define CF_CTRL_CONN_INFO_UPDATE (256 + 0) /* 0          NULL     ignored */
  ------------------
  |  Branch (1283:3): [True: 0, False: 2.00k]
  ------------------
 1284|      0|    if(connssl->negotiated.alpn && !cf->sockindex) {
  ------------------
  |  Branch (1284:8): [True: 0, False: 0]
  |  Branch (1284:36): [True: 0, False: 0]
  ------------------
 1285|      0|      if(!strcmp("http/1.1", connssl->negotiated.alpn))
  ------------------
  |  Branch (1285:10): [True: 0, False: 0]
  ------------------
 1286|      0|        cf->conn->httpversion_seen = 11;
 1287|      0|      else if(!strcmp("h2", connssl->negotiated.alpn))
  ------------------
  |  Branch (1287:15): [True: 0, False: 0]
  ------------------
 1288|      0|        cf->conn->httpversion_seen = 20;
 1289|      0|      else if(!strcmp("h3", connssl->negotiated.alpn))
  ------------------
  |  Branch (1289:15): [True: 0, False: 0]
  ------------------
 1290|      0|        cf->conn->httpversion_seen = 30;
 1291|      0|    }
 1292|      0|    break;
 1293|  2.00k|  }
 1294|  2.00k|  return CURLE_OK;
 1295|  2.00k|}
vtls.c:ssl_cf_query:
 1234|  5.01k|{
 1235|  5.01k|  struct ssl_connect_data *connssl = cf->ctx;
 1236|       |
 1237|  5.01k|  switch(query) {
 1238|  2.44k|  case CF_QUERY_TIMER_APPCONNECT: {
  ------------------
  |  |  165|  2.44k|#define CF_QUERY_TIMER_APPCONNECT   5  /* -          struct curltime */
  ------------------
  |  Branch (1238:3): [True: 2.44k, False: 2.56k]
  ------------------
 1239|  2.44k|    struct curltime *when = pres2;
 1240|  2.44k|    if(cf->connected && !Curl_ssl_cf_is_proxy(cf))
  ------------------
  |  Branch (1240:8): [True: 0, False: 2.44k]
  |  Branch (1240:25): [True: 0, False: 0]
  ------------------
 1241|      0|      *when = connssl->handshake_done;
 1242|  2.44k|    return CURLE_OK;
 1243|      0|  }
 1244|      0|  case CF_QUERY_SSL_INFO:
  ------------------
  |  |  174|      0|#define CF_QUERY_SSL_INFO          12  /* -    struct curl_tlssessioninfo * */
  ------------------
  |  Branch (1244:3): [True: 0, False: 5.01k]
  ------------------
 1245|      0|  case CF_QUERY_SSL_CTX_INFO:
  ------------------
  |  |  175|      0|#define CF_QUERY_SSL_CTX_INFO      13  /* -    struct curl_tlssessioninfo * */
  ------------------
  |  Branch (1245:3): [True: 0, False: 5.01k]
  ------------------
 1246|      0|    if(!Curl_ssl_cf_is_proxy(cf)) {
  ------------------
  |  Branch (1246:8): [True: 0, False: 0]
  ------------------
 1247|      0|      struct curl_tlssessioninfo *info = pres2;
 1248|      0|      struct cf_call_data save;
 1249|      0|      CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  660|      0|  do { \
  |  |  661|      0|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  221|      0|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  662|      0|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  663|      0|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  221|      0|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  664|      0|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  221|      0|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |                   CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  862|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  665|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (665:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1249:7): [True: 0, False: 0]
  |  Branch (1249:7): [True: 0, False: 0]
  |  Branch (1249:7): [True: 0, False: 0]
  |  Branch (1249:7): [True: 0, False: 0]
  ------------------
 1250|      0|      info->backend = Curl_ssl_backend();
 1251|      0|      info->internals = connssl->ssl_impl->get_internals(
 1252|      0|        cf->ctx, (query == CF_QUERY_SSL_INFO) ?
  ------------------
  |  |  174|      0|#define CF_QUERY_SSL_INFO          12  /* -    struct curl_tlssessioninfo * */
  ------------------
  |  Branch (1252:18): [True: 0, False: 0]
  ------------------
 1253|      0|        CURLINFO_TLS_SSL_PTR : CURLINFO_TLS_SESSION);
 1254|      0|      CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  668|      0|  do { \
  |  |  669|      0|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  670|      0|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  671|      0|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  221|      0|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  672|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (672:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1254:7): [True: 0, False: 0]
  |  Branch (1254:7): [True: 0, False: 0]
  |  Branch (1254:7): [True: 0, False: 0]
  |  Branch (1254:7): [True: 0, False: 0]
  |  Branch (1254:7): [True: 0, False: 0]
  |  Branch (1254:7): [True: 0, False: 0]
  ------------------
 1255|      0|      return CURLE_OK;
 1256|      0|    }
 1257|      0|    break;
 1258|      0|  case CF_QUERY_ALPN_NEGOTIATED: {
  ------------------
  |  |  177|      0|#define CF_QUERY_ALPN_NEGOTIATED   15  /* -          const char * */
  ------------------
  |  Branch (1258:3): [True: 0, False: 5.01k]
  ------------------
 1259|      0|    const char **palpn = pres2;
 1260|      0|    DEBUGASSERT(palpn);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1260:5): [True: 0, False: 0]
  |  Branch (1260:5): [True: 0, False: 0]
  ------------------
 1261|      0|    *palpn = connssl->negotiated.alpn;
 1262|      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]
  |  |  ------------------
  ------------------
 1263|      0|    return CURLE_OK;
 1264|      0|  }
 1265|  2.56k|  default:
  ------------------
  |  Branch (1265:3): [True: 2.56k, False: 2.44k]
  ------------------
 1266|  2.56k|    break;
 1267|  5.01k|  }
 1268|  2.56k|  return cf->next ?
  ------------------
  |  Branch (1268:10): [True: 2.56k, False: 0]
  ------------------
 1269|  2.56k|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
 1270|  2.56k|    CURLE_UNKNOWN_OPTION;
 1271|  5.01k|}
vtls.c:cf_ssl_create:
 1349|  2.01k|{
 1350|  2.01k|  struct Curl_cfilter *cf = NULL;
 1351|  2.01k|  struct ssl_connect_data *ctx;
 1352|  2.01k|  CURLcode result;
 1353|       |
 1354|  2.01k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1077|  2.01k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1354:3): [True: 0, False: 2.01k]
  |  Branch (1354:3): [True: 2.01k, False: 0]
  ------------------
 1355|       |
 1356|       |#ifdef CURL_DISABLE_HTTP
 1357|       |  (void)conn;
 1358|       |  /* We only support ALPN for HTTP so far. */
 1359|       |  DEBUGASSERT(!conn->bits.tls_enable_alpn);
 1360|       |  ctx = cf_ctx_new(data, NULL);
 1361|       |#else
 1362|  2.01k|  ctx = cf_ctx_new(data, alpn_get_spec(data->state.http_neg.wanted,
 1363|  2.01k|                                       data->state.http_neg.preferred,
 1364|  2.01k|                                       (bool)data->state.http_neg.only_10,
 1365|  2.01k|                                       (bool)conn->bits.tls_enable_alpn));
 1366|  2.01k|#endif
 1367|  2.01k|  if(!ctx) {
  ------------------
  |  Branch (1367:6): [True: 0, False: 2.01k]
  ------------------
 1368|      0|    result = CURLE_OUT_OF_MEMORY;
 1369|      0|    goto out;
 1370|      0|  }
 1371|       |
 1372|  2.01k|  result = Curl_cf_create(&cf, &Curl_cft_ssl, ctx);
 1373|       |
 1374|  2.01k|out:
 1375|  2.01k|  if(result)
  ------------------
  |  Branch (1375:6): [True: 0, False: 2.01k]
  ------------------
 1376|      0|    cf_ctx_free(ctx);
 1377|  2.01k|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (1377:10): [True: 0, False: 2.01k]
  ------------------
 1378|  2.01k|  return result;
 1379|  2.01k|}
vtls.c:cf_ctx_new:
  192|  2.46k|{
  193|  2.46k|  struct ssl_connect_data *ctx;
  194|       |
  195|  2.46k|  (void)data;
  196|  2.46k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1485|  2.46k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  197|  2.46k|  if(!ctx)
  ------------------
  |  Branch (197:6): [True: 0, False: 2.46k]
  ------------------
  198|      0|    return NULL;
  199|       |
  200|  2.46k|  ctx->ssl_impl = Curl_ssl;
  201|  2.46k|  ctx->alpn = alpn;
  202|  2.46k|  Curl_bufq_init2(&ctx->earlydata, CURL_SSL_EARLY_MAX, 1, BUFQ_OPT_NO_SPARES);
  ------------------
  |  |  110|  2.46k|#define CURL_SSL_EARLY_MAX      (64 * 1024)
  ------------------
                Curl_bufq_init2(&ctx->earlydata, CURL_SSL_EARLY_MAX, 1, BUFQ_OPT_NO_SPARES);
  ------------------
  |  |  115|  2.46k|#define BUFQ_OPT_NO_SPARES   (1 << 1)
  ------------------
  203|  2.46k|  ctx->backend = curlx_calloc(1, ctx->ssl_impl->sizeof_ssl_backend_data);
  ------------------
  |  | 1485|  2.46k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  204|  2.46k|  if(!ctx->backend) {
  ------------------
  |  Branch (204:6): [True: 0, False: 2.46k]
  ------------------
  205|      0|    curlx_free(ctx);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  206|      0|    return NULL;
  207|      0|  }
  208|  2.46k|  return ctx;
  209|  2.46k|}
vtls.c:alpn_get_spec:
  105|  2.46k|{
  106|  2.46k|  if(!use_alpn)
  ------------------
  |  Branch (106:6): [True: 2.01k, False: 445]
  ------------------
  107|  2.01k|    return NULL;
  108|       |  /* If HTTP/1.0 is the wanted protocol then use ALPN http/1.0 and http/1.1.
  109|       |     This is for compatibility reasons since some HTTP/1.0 servers with old
  110|       |     ALPN implementations understand ALPN http/1.1 but not http/1.0. */
  111|    445|  if(only_http_10 && (wanted & CURL_HTTP_V1x))
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (111:6): [True: 0, False: 445]
  |  Branch (111:22): [True: 0, False: 0]
  ------------------
  112|      0|    return &ALPN_SPEC_H10_H11;
  113|    445|#ifdef USE_HTTP2
  114|    445|  if(wanted & CURL_HTTP_V2x) {
  ------------------
  |  |   41|    445|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (114:6): [True: 3, False: 442]
  ------------------
  115|      3|    if(wanted & CURL_HTTP_V1x)
  ------------------
  |  |   40|      3|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (115:8): [True: 3, False: 0]
  ------------------
  116|      3|      return (preferred == CURL_HTTP_V1x) ?
  ------------------
  |  |   40|      3|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (116:14): [True: 0, False: 3]
  ------------------
  117|      3|        &ALPN_SPEC_H11_H2 : &ALPN_SPEC_H2_H11;
  118|      0|    return &ALPN_SPEC_H2;
  119|      3|  }
  120|       |#else
  121|       |  (void)wanted;
  122|       |  (void)preferred;
  123|       |#endif
  124|    442|  return &ALPN_SPEC_H11;
  125|    445|}
vtls.c:cf_ssl_peer_init:
 1385|  2.46k|{
 1386|  2.46k|  struct ssl_connect_data *connssl = cf->ctx;
 1387|  2.46k|  char tls_id[80];
 1388|  2.46k|  connssl->ssl_impl->version(tls_id, sizeof(tls_id) - 1);
 1389|  2.46k|  return Curl_ssl_peer_init(&connssl->peer, origin, peer, sslc,
 1390|  2.46k|                            tls_id, TRNSPRT_TCP);
  ------------------
  |  |  249|  2.46k|#define TRNSPRT_TCP  3
  ------------------
 1391|  2.46k|}
vtls.c:cf_ssl_proxy_create:
 1436|    446|{
 1437|    446|  struct Curl_cfilter *cf = NULL;
 1438|    446|  struct ssl_connect_data *ctx;
 1439|    446|  CURLcode result;
 1440|       |  /* ALPN is default, but if user explicitly disables it, obey */
 1441|    446|  bool use_alpn = (bool)data->set.ssl_enable_alpn;
 1442|    446|  http_majors wanted = CURL_HTTP_V1x;
  ------------------
  |  |   40|    446|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 1443|       |
 1444|    446|  (void)conn;
 1445|    446|#ifdef USE_HTTP2
 1446|    446|  if(conn->http_proxy.proxytype == CURLPROXY_HTTPS2) {
  ------------------
  |  |  796|    446|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  ------------------
  |  Branch (1446:6): [True: 3, False: 443]
  ------------------
 1447|      3|    use_alpn = TRUE;
  ------------------
  |  | 1051|      3|#define TRUE true
  ------------------
 1448|      3|    wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   40|      3|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   41|      3|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
 1449|      3|  }
 1450|    446|#endif
 1451|       |
 1452|    446|  ctx = cf_ctx_new(data, alpn_get_spec(wanted, 0, FALSE, use_alpn));
  ------------------
  |  | 1054|    446|#define FALSE false
  ------------------
 1453|    446|  if(!ctx) {
  ------------------
  |  Branch (1453:6): [True: 0, False: 446]
  ------------------
 1454|      0|    result = CURLE_OUT_OF_MEMORY;
 1455|      0|    goto out;
 1456|      0|  }
 1457|    446|  result = Curl_cf_create(&cf, &Curl_cft_ssl_proxy, ctx);
 1458|       |
 1459|    446|out:
 1460|    446|  if(result)
  ------------------
  |  Branch (1460:6): [True: 0, False: 446]
  ------------------
 1461|      0|    cf_ctx_free(ctx);
 1462|    446|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (1462:10): [True: 0, False: 446]
  ------------------
 1463|    446|  return result;
 1464|    446|}

Curl_ssl_config_init:
  105|  56.6k|{
  106|       |  /*
  107|       |   * libcurl 7.10 introduced SSL verification *by default*! This needs to be
  108|       |   * switched off unless wanted.
  109|       |   */
  110|  56.6k|  sslc->verifypeer = TRUE;
  ------------------
  |  | 1051|  56.6k|#define TRUE true
  ------------------
  111|  56.6k|  sslc->verifyhost = TRUE;
  ------------------
  |  | 1051|  56.6k|#define TRUE true
  ------------------
  112|       |  sslc->cache_session = TRUE; /* caching by default */
  ------------------
  |  | 1051|  56.6k|#define TRUE true
  ------------------
  113|  56.6k|}
Curl_ssl_config_cleanup:
  116|  74.5k|{
  117|  74.5k|  if(sslc->deep_copy) {
  ------------------
  |  Branch (117:6): [True: 15.8k, False: 58.7k]
  ------------------
  118|  15.8k|    curlx_safefree(sslc->CApath);
  ------------------
  |  | 1332|  15.8k|  do {                      \
  |  | 1333|  15.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  15.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  15.8k|    (ptr) = NULL;           \
  |  | 1335|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  119|  15.8k|    curlx_safefree(sslc->CAfile);
  ------------------
  |  | 1332|  15.8k|  do {                      \
  |  | 1333|  15.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  15.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  15.8k|    (ptr) = NULL;           \
  |  | 1335|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  120|  15.8k|    curlx_safefree(sslc->issuercert);
  ------------------
  |  | 1332|  15.8k|  do {                      \
  |  | 1333|  15.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  15.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  15.8k|    (ptr) = NULL;           \
  |  | 1335|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  121|  15.8k|    curlx_safefree(sslc->clientcert);
  ------------------
  |  | 1332|  15.8k|  do {                      \
  |  | 1333|  15.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  15.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  15.8k|    (ptr) = NULL;           \
  |  | 1335|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  122|  15.8k|    curlx_safefree(sslc->cipher_list);
  ------------------
  |  | 1332|  15.8k|  do {                      \
  |  | 1333|  15.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  15.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  15.8k|    (ptr) = NULL;           \
  |  | 1335|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  123|  15.8k|    curlx_safefree(sslc->cipher_list13);
  ------------------
  |  | 1332|  15.8k|  do {                      \
  |  | 1333|  15.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  15.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  15.8k|    (ptr) = NULL;           \
  |  | 1335|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  124|  15.8k|    curlx_safefree(sslc->pinned_key);
  ------------------
  |  | 1332|  15.8k|  do {                      \
  |  | 1333|  15.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  15.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  15.8k|    (ptr) = NULL;           \
  |  | 1335|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  125|  15.8k|    curlx_safefree(sslc->cert_blob);
  ------------------
  |  | 1332|  15.8k|  do {                      \
  |  | 1333|  15.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  15.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  15.8k|    (ptr) = NULL;           \
  |  | 1335|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  126|  15.8k|    curlx_safefree(sslc->ca_info_blob);
  ------------------
  |  | 1332|  15.8k|  do {                      \
  |  | 1333|  15.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  15.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  15.8k|    (ptr) = NULL;           \
  |  | 1335|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  127|  15.8k|    curlx_safefree(sslc->issuercert_blob);
  ------------------
  |  | 1332|  15.8k|  do {                      \
  |  | 1333|  15.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  15.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  15.8k|    (ptr) = NULL;           \
  |  | 1335|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  128|  15.8k|    curlx_safefree(sslc->key_blob);
  ------------------
  |  | 1332|  15.8k|  do {                      \
  |  | 1333|  15.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  15.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  15.8k|    (ptr) = NULL;           \
  |  | 1335|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  129|  15.8k|    curlx_safefree(sslc->curves);
  ------------------
  |  | 1332|  15.8k|  do {                      \
  |  | 1333|  15.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  15.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  15.8k|    (ptr) = NULL;           \
  |  | 1335|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  130|  15.8k|    curlx_safefree(sslc->signature_algorithms);
  ------------------
  |  | 1332|  15.8k|  do {                      \
  |  | 1333|  15.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  15.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  15.8k|    (ptr) = NULL;           \
  |  | 1335|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  131|  15.8k|    curlx_safefree(sslc->CRLfile);
  ------------------
  |  | 1332|  15.8k|  do {                      \
  |  | 1333|  15.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  15.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  15.8k|    (ptr) = NULL;           \
  |  | 1335|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  132|  15.8k|    curlx_safefree(sslc->cert_type);
  ------------------
  |  | 1332|  15.8k|  do {                      \
  |  | 1333|  15.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  15.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  15.8k|    (ptr) = NULL;           \
  |  | 1335|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  133|  15.8k|    curlx_safefree(sslc->key);
  ------------------
  |  | 1332|  15.8k|  do {                      \
  |  | 1333|  15.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  15.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  15.8k|    (ptr) = NULL;           \
  |  | 1335|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  134|  15.8k|    curlx_safefree(sslc->key_type);
  ------------------
  |  | 1332|  15.8k|  do {                      \
  |  | 1333|  15.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  15.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  15.8k|    (ptr) = NULL;           \
  |  | 1335|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  135|  15.8k|    curlx_safefree(sslc->key_passwd);
  ------------------
  |  | 1332|  15.8k|  do {                      \
  |  | 1333|  15.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  15.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  15.8k|    (ptr) = NULL;           \
  |  | 1335|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  136|       |    sslc->deep_copy = FALSE;
  ------------------
  |  | 1054|  15.8k|#define FALSE false
  ------------------
  137|  15.8k|  }
  138|  74.5k|}
Curl_ssl_easy_config_complete:
  245|  8.11k|{
  246|  8.11k|  struct ssl_config_data *sslc = &data->set.ssl;
  247|  8.11k|#if defined(CURL_CA_PATH) || defined(CURL_CA_BUNDLE)
  248|  8.11k|  struct UserDefined *set = &data->set;
  249|  8.11k|  CURLcode result;
  250|  8.11k|#endif
  251|       |
  252|  8.11k|  ssl_easy_config_compl_options(origin, data->state.initial_origin, sslc);
  253|       |
  254|  8.11k|  if(Curl_ssl_backend() != CURLSSLBACKEND_SCHANNEL) {
  ------------------
  |  Branch (254:6): [True: 8.11k, False: 0]
  ------------------
  255|       |#if defined(USE_APPLE_SECTRUST) || defined(CURL_CA_NATIVE)
  256|       |    if(!sslc->custom_capath && !sslc->custom_cafile && !sslc->custom_cablob)
  257|       |      sslc->native_ca_store = TRUE;
  258|       |#endif
  259|  8.11k|#ifdef CURL_CA_PATH
  260|  8.11k|    if(!sslc->custom_capath && !set->str[STRING_SSL_CAPATH]) {
  ------------------
  |  Branch (260:8): [True: 7.55k, False: 559]
  |  Branch (260:32): [True: 7.55k, False: 0]
  ------------------
  261|  7.55k|      result = Curl_setstropt(&set->str[STRING_SSL_CAPATH], CURL_CA_PATH);
  ------------------
  |  |   32|  7.55k|#define CURL_CA_PATH "/etc/ssl/certs"
  ------------------
  262|  7.55k|      if(result)
  ------------------
  |  Branch (262:10): [True: 0, False: 7.55k]
  ------------------
  263|      0|        return result;
  264|  7.55k|    }
  265|  8.11k|#endif
  266|  8.11k|#ifdef CURL_CA_BUNDLE
  267|  8.11k|    if(!sslc->custom_cafile && !set->str[STRING_SSL_CAFILE]) {
  ------------------
  |  Branch (267:8): [True: 7.61k, False: 493]
  |  Branch (267:32): [True: 7.61k, False: 0]
  ------------------
  268|  7.61k|      result = Curl_setstropt(&set->str[STRING_SSL_CAFILE], CURL_CA_BUNDLE);
  ------------------
  |  |   26|  7.61k|#define CURL_CA_BUNDLE "/etc/ssl/certs/ca-certificates.crt"
  ------------------
  269|  7.61k|      if(result)
  ------------------
  |  Branch (269:10): [True: 0, False: 7.61k]
  ------------------
  270|      0|        return result;
  271|  7.61k|    }
  272|  8.11k|#endif
  273|  8.11k|  }
  274|  8.11k|  sslc->primary.CAfile = data->set.str[STRING_SSL_CAFILE];
  275|  8.11k|  sslc->primary.CRLfile = data->set.str[STRING_SSL_CRLFILE];
  276|  8.11k|  sslc->primary.CApath = data->set.str[STRING_SSL_CAPATH];
  277|  8.11k|  sslc->primary.cipher_list = data->set.str[STRING_SSL_CIPHER_LIST];
  278|  8.11k|  sslc->primary.cipher_list13 = data->set.str[STRING_SSL_CIPHER13_LIST];
  279|  8.11k|  sslc->primary.signature_algorithms =
  280|  8.11k|    data->set.str[STRING_SSL_SIGNATURE_ALGORITHMS];
  281|  8.11k|  sslc->primary.ca_info_blob = data->set.blobs[BLOB_CAINFO];
  282|  8.11k|  sslc->primary.curves = data->set.str[STRING_SSL_EC_CURVES];
  283|       |  /* Maybe these should not be used for another origin. But for
  284|       |   * backwards compatibility, keep them in. */
  285|  8.11k|  sslc->primary.issuercert = data->set.str[STRING_SSL_ISSUERCERT];
  286|  8.11k|  sslc->primary.issuercert_blob = data->set.blobs[BLOB_SSL_ISSUERCERT];
  287|       |
  288|  8.11k|  if(Curl_peer_equal(data->state.initial_origin, origin)) {
  ------------------
  |  Branch (288:6): [True: 8.11k, False: 0]
  ------------------
  289|  8.11k|    sslc->primary.pinned_key = data->set.str[STRING_SSL_PINNEDPUBLICKEY];
  290|  8.11k|    sslc->primary.cert_blob = data->set.blobs[BLOB_CERT];
  291|  8.11k|    sslc->primary.cert_type = data->set.str[STRING_CERT_TYPE];
  292|  8.11k|    sslc->primary.key = data->set.str[STRING_KEY];
  293|  8.11k|    sslc->primary.key_type = data->set.str[STRING_KEY_TYPE];
  294|  8.11k|    sslc->primary.key_passwd = data->set.str[STRING_KEY_PASSWD];
  295|  8.11k|    sslc->primary.clientcert = data->set.str[STRING_CERT];
  296|  8.11k|    sslc->primary.key_blob = data->set.blobs[BLOB_KEY];
  297|  8.11k|  }
  298|      0|  else {
  299|      0|    sslc->primary.pinned_key = NULL;
  300|      0|    sslc->primary.cert_blob = NULL;
  301|      0|    sslc->primary.cert_type = NULL;
  302|      0|    sslc->primary.key = NULL;
  303|      0|    sslc->primary.key_type = NULL;
  304|      0|    sslc->primary.key_passwd = NULL;
  305|      0|    sslc->primary.clientcert = NULL;
  306|      0|    sslc->primary.key_blob = NULL;
  307|      0|  }
  308|       |
  309|  8.11k|#ifndef CURL_DISABLE_PROXY
  310|  8.11k|  sslc = &data->set.proxy_ssl;
  311|       |  /* no initial origin for proxy, it is not changed for redirects */
  312|  8.11k|  ssl_easy_config_compl_options(NULL, NULL, sslc);
  313|       |
  314|  8.11k|  if(Curl_ssl_backend() != CURLSSLBACKEND_SCHANNEL) {
  ------------------
  |  Branch (314:6): [True: 8.11k, False: 0]
  ------------------
  315|       |#if defined(USE_APPLE_SECTRUST) || defined(CURL_CA_NATIVE)
  316|       |    if(!sslc->custom_capath && !sslc->custom_cafile && !sslc->custom_cablob)
  317|       |      sslc->native_ca_store = TRUE;
  318|       |#endif
  319|  8.11k|#ifdef CURL_CA_PATH
  320|  8.11k|    if(!sslc->custom_capath && !set->str[STRING_SSL_CAPATH_PROXY]) {
  ------------------
  |  Branch (320:8): [True: 8.10k, False: 6]
  |  Branch (320:32): [True: 8.08k, False: 24]
  ------------------
  321|  8.08k|      result = Curl_setstropt(&set->str[STRING_SSL_CAPATH_PROXY],
  322|  8.08k|                              CURL_CA_PATH);
  ------------------
  |  |   32|  8.08k|#define CURL_CA_PATH "/etc/ssl/certs"
  ------------------
  323|  8.08k|      if(result)
  ------------------
  |  Branch (323:10): [True: 0, False: 8.08k]
  ------------------
  324|      0|        return result;
  325|  8.08k|    }
  326|  8.11k|#endif
  327|  8.11k|#ifdef CURL_CA_BUNDLE
  328|  8.11k|    if(!sslc->custom_cafile && !set->str[STRING_SSL_CAFILE_PROXY]) {
  ------------------
  |  Branch (328:8): [True: 8.10k, False: 2]
  |  Branch (328:32): [True: 8.08k, False: 24]
  ------------------
  329|  8.08k|      result = Curl_setstropt(&set->str[STRING_SSL_CAFILE_PROXY],
  330|  8.08k|                              CURL_CA_BUNDLE);
  ------------------
  |  |   26|  8.08k|#define CURL_CA_BUNDLE "/etc/ssl/certs/ca-certificates.crt"
  ------------------
  331|  8.08k|      if(result)
  ------------------
  |  Branch (331:10): [True: 0, False: 8.08k]
  ------------------
  332|      0|        return result;
  333|  8.08k|    }
  334|  8.11k|#endif
  335|  8.11k|  }
  336|  8.11k|  sslc->primary.CAfile = data->set.str[STRING_SSL_CAFILE_PROXY];
  337|  8.11k|  sslc->primary.CApath = data->set.str[STRING_SSL_CAPATH_PROXY];
  338|  8.11k|  sslc->primary.cipher_list = data->set.str[STRING_SSL_CIPHER_LIST_PROXY];
  339|  8.11k|  sslc->primary.cipher_list13 = data->set.str[STRING_SSL_CIPHER13_LIST_PROXY];
  340|  8.11k|  sslc->primary.pinned_key = data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY];
  341|  8.11k|  sslc->primary.cert_blob = data->set.blobs[BLOB_CERT_PROXY];
  342|  8.11k|  sslc->primary.ca_info_blob = data->set.blobs[BLOB_CAINFO_PROXY];
  343|  8.11k|  sslc->primary.issuercert = data->set.str[STRING_SSL_ISSUERCERT_PROXY];
  344|  8.11k|  sslc->primary.issuercert_blob = data->set.blobs[BLOB_SSL_ISSUERCERT_PROXY];
  345|  8.11k|  sslc->primary.CRLfile = data->set.str[STRING_SSL_CRLFILE_PROXY];
  346|  8.11k|  sslc->primary.cert_type = data->set.str[STRING_CERT_TYPE_PROXY];
  347|  8.11k|  sslc->primary.key = data->set.str[STRING_KEY_PROXY];
  348|  8.11k|  sslc->primary.key_type = data->set.str[STRING_KEY_TYPE_PROXY];
  349|  8.11k|  sslc->primary.key_passwd = data->set.str[STRING_KEY_PASSWD_PROXY];
  350|  8.11k|  sslc->primary.clientcert = data->set.str[STRING_CERT_PROXY];
  351|  8.11k|  sslc->primary.key_blob = data->set.blobs[BLOB_KEY_PROXY];
  352|  8.11k|#endif /* CURL_DISABLE_PROXY */
  353|       |
  354|  8.11k|  return CURLE_OK;
  355|  8.11k|}
Curl_ssl_conn_config_init:
  359|  7.93k|{
  360|       |  /* Clone "primary" SSL configurations from the easy handle to
  361|       |   * the connection. They are used for connection cache matching and
  362|       |   * probably outlive the easy handle */
  363|  7.93k|  if(!clone_ssl_primary_config(&data->set.ssl.primary, &conn->ssl_config))
  ------------------
  |  Branch (363:6): [True: 0, False: 7.93k]
  ------------------
  364|      0|    return CURLE_OUT_OF_MEMORY;
  365|  7.93k|#ifndef CURL_DISABLE_PROXY
  366|  7.93k|  if(!clone_ssl_primary_config(&data->set.proxy_ssl.primary,
  ------------------
  |  Branch (366:6): [True: 0, False: 7.93k]
  ------------------
  367|  7.93k|                               &conn->proxy_ssl_config))
  368|      0|    return CURLE_OUT_OF_MEMORY;
  369|  7.93k|#endif
  370|  7.93k|  return CURLE_OK;
  371|  7.93k|}
Curl_ssl_conn_config_cleanup:
  374|  8.94k|{
  375|  8.94k|  Curl_ssl_config_cleanup(&conn->ssl_config);
  376|  8.94k|#ifndef CURL_DISABLE_PROXY
  377|  8.94k|  Curl_ssl_config_cleanup(&conn->proxy_ssl_config);
  378|  8.94k|#endif
  379|  8.94k|}
Curl_ssl_conn_config_update:
  382|  1.88k|{
  383|       |  /* May be called on an easy that has no connection yet */
  384|  1.88k|  if(data->conn) {
  ------------------
  |  Branch (384:6): [True: 0, False: 1.88k]
  ------------------
  385|      0|    struct ssl_primary_config *src, *dest;
  386|      0|#ifndef CURL_DISABLE_PROXY
  387|      0|    src = for_proxy ? &data->set.proxy_ssl.primary : &data->set.ssl.primary;
  ------------------
  |  Branch (387:11): [True: 0, False: 0]
  ------------------
  388|      0|    dest = for_proxy ? &data->conn->proxy_ssl_config : &data->conn->ssl_config;
  ------------------
  |  Branch (388:12): [True: 0, False: 0]
  ------------------
  389|       |#else
  390|       |    (void)for_proxy;
  391|       |    src = &data->set.ssl.primary;
  392|       |    dest = &data->conn->ssl_config;
  393|       |#endif
  394|      0|    dest->verifyhost = src->verifyhost;
  395|      0|    dest->verifypeer = src->verifypeer;
  396|      0|    dest->verifystatus = src->verifystatus;
  397|      0|  }
  398|  1.88k|}
vtls_config.c:ssl_easy_config_compl_options:
  227|  16.2k|{
  228|  16.2k|  uint8_t options = sslc->primary.ssl_options;
  229|       |  /* If set via CURLOPT_(PROXY_)SSL_OPTIONS, we definitely use it.
  230|       |   * If not, we switch it on for supported backends if no custom
  231|       |   * CA settings exist. */
  232|  16.2k|  sslc->native_ca_store = !!(options & CURLSSLOPT_NATIVE_CA);
  ------------------
  |  |  957|  16.2k|#define CURLSSLOPT_NATIVE_CA (1L << 4)
  ------------------
  233|  16.2k|  sslc->enable_beast = !!(options & CURLSSLOPT_ALLOW_BEAST);
  ------------------
  |  |  940|  16.2k|#define CURLSSLOPT_ALLOW_BEAST (1L << 0)
  ------------------
  234|  16.2k|  sslc->no_partialchain = !!(options & CURLSSLOPT_NO_PARTIALCHAIN);
  ------------------
  |  |  948|  16.2k|#define CURLSSLOPT_NO_PARTIALCHAIN (1L << 2)
  ------------------
  235|  16.2k|  sslc->no_revoke = !!(options & CURLSSLOPT_NO_REVOKE);
  ------------------
  |  |  944|  16.2k|#define CURLSSLOPT_NO_REVOKE (1L << 1)
  ------------------
  236|  16.2k|  sslc->revoke_best_effort = !!(options & CURLSSLOPT_REVOKE_BEST_EFFORT);
  ------------------
  |  |  953|  16.2k|#define CURLSSLOPT_REVOKE_BEST_EFFORT (1L << 3)
  ------------------
  237|  16.2k|  sslc->earlydata = !!(options & CURLSSLOPT_EARLYDATA);
  ------------------
  |  |  964|  16.2k|#define CURLSSLOPT_EARLYDATA (1L << 6)
  ------------------
  238|       |
  239|  16.2k|  sslc->auto_client_cert = Curl_peer_equal(origin, initial_origin) &&
  ------------------
  |  Branch (239:28): [True: 16.2k, False: 0]
  ------------------
  240|  16.2k|                           !!(options & CURLSSLOPT_AUTO_CLIENT_CERT);
  ------------------
  |  |  961|  16.2k|#define CURLSSLOPT_AUTO_CLIENT_CERT (1L << 5)
  ------------------
  |  Branch (240:28): [True: 2, False: 16.2k]
  ------------------
  241|  16.2k|}
vtls_config.c:clone_ssl_primary_config:
  191|  15.8k|{
  192|  15.8k|  DEBUGASSERT(!dest->deep_copy);
  ------------------
  |  | 1077|  15.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (192:3): [True: 0, False: 15.8k]
  |  Branch (192:3): [True: 15.8k, False: 0]
  ------------------
  193|  15.8k|  dest->deep_copy = TRUE;
  ------------------
  |  | 1051|  15.8k|#define TRUE true
  ------------------
  194|  15.8k|  dest->version = source->version;
  195|  15.8k|  dest->version_max = source->version_max;
  196|  15.8k|  dest->verifypeer = source->verifypeer;
  197|  15.8k|  dest->verifyhost = source->verifyhost;
  198|  15.8k|  dest->verifystatus = source->verifystatus;
  199|  15.8k|  dest->cache_session = source->cache_session;
  200|  15.8k|  dest->ssl_options = source->ssl_options;
  201|       |
  202|  15.8k|  CLONE_BLOB(cert_blob);
  ------------------
  |  |   66|  15.8k|  do {                                   \
  |  |   67|  15.8k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (67:8): [True: 0, False: 15.8k]
  |  |  ------------------
  |  |   68|  15.8k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   69|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (69:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  203|  15.8k|  CLONE_BLOB(ca_info_blob);
  ------------------
  |  |   66|  15.8k|  do {                                   \
  |  |   67|  15.8k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (67:8): [True: 0, False: 15.8k]
  |  |  ------------------
  |  |   68|  15.8k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   69|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (69:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  204|  15.8k|  CLONE_BLOB(issuercert_blob);
  ------------------
  |  |   66|  15.8k|  do {                                   \
  |  |   67|  15.8k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (67:8): [True: 0, False: 15.8k]
  |  |  ------------------
  |  |   68|  15.8k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   69|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (69:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  205|  15.8k|  CLONE_STRING(CApath);
  ------------------
  |  |   55|  15.8k|  do {                                       \
  |  |   56|  15.8k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 15.8k, False: 0]
  |  |  ------------------
  |  |   57|  15.8k|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|  15.8k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|  15.8k|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 15.8k]
  |  |  ------------------
  |  |   59|  15.8k|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|  15.8k|    }                                        \
  |  |   61|  15.8k|    else                                     \
  |  |   62|  15.8k|      dest->var = NULL;                      \
  |  |   63|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  206|  15.8k|  CLONE_STRING(CAfile);
  ------------------
  |  |   55|  15.8k|  do {                                       \
  |  |   56|  15.8k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 15.8k, False: 0]
  |  |  ------------------
  |  |   57|  15.8k|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|  15.8k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|  15.8k|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 15.8k]
  |  |  ------------------
  |  |   59|  15.8k|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|  15.8k|    }                                        \
  |  |   61|  15.8k|    else                                     \
  |  |   62|  15.8k|      dest->var = NULL;                      \
  |  |   63|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  207|  15.8k|  CLONE_STRING(issuercert);
  ------------------
  |  |   55|  15.8k|  do {                                       \
  |  |   56|  15.8k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 8, False: 15.8k]
  |  |  ------------------
  |  |   57|      8|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|      8|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|      8|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 8]
  |  |  ------------------
  |  |   59|      8|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|      8|    }                                        \
  |  |   61|  15.8k|    else                                     \
  |  |   62|  15.8k|      dest->var = NULL;                      \
  |  |   63|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  208|  15.8k|  CLONE_STRING(cipher_list);
  ------------------
  |  |   55|  15.8k|  do {                                       \
  |  |   56|  15.8k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 766, False: 15.0k]
  |  |  ------------------
  |  |   57|    766|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|    766|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|    766|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 766]
  |  |  ------------------
  |  |   59|    766|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|    766|    }                                        \
  |  |   61|  15.8k|    else                                     \
  |  |   62|  15.8k|      dest->var = NULL;                      \
  |  |   63|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  209|  15.8k|  CLONE_STRING(cipher_list13);
  ------------------
  |  |   55|  15.8k|  do {                                       \
  |  |   56|  15.8k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 124, False: 15.7k]
  |  |  ------------------
  |  |   57|    124|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|    124|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|    124|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 124]
  |  |  ------------------
  |  |   59|    124|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|    124|    }                                        \
  |  |   61|  15.8k|    else                                     \
  |  |   62|  15.8k|      dest->var = NULL;                      \
  |  |   63|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  210|  15.8k|  CLONE_STRING(pinned_key);
  ------------------
  |  |   55|  15.8k|  do {                                       \
  |  |   56|  15.8k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 33, False: 15.8k]
  |  |  ------------------
  |  |   57|     33|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|     33|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|     33|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 33]
  |  |  ------------------
  |  |   59|     33|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|     33|    }                                        \
  |  |   61|  15.8k|    else                                     \
  |  |   62|  15.8k|      dest->var = NULL;                      \
  |  |   63|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  211|  15.8k|  CLONE_STRING(curves);
  ------------------
  |  |   55|  15.8k|  do {                                       \
  |  |   56|  15.8k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 307, False: 15.5k]
  |  |  ------------------
  |  |   57|    307|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|    307|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|    307|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 307]
  |  |  ------------------
  |  |   59|    307|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|    307|    }                                        \
  |  |   61|  15.8k|    else                                     \
  |  |   62|  15.8k|      dest->var = NULL;                      \
  |  |   63|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  212|  15.8k|  CLONE_STRING(signature_algorithms);
  ------------------
  |  |   55|  15.8k|  do {                                       \
  |  |   56|  15.8k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 0, False: 15.8k]
  |  |  ------------------
  |  |   57|      0|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|      0|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   59|      0|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|      0|    }                                        \
  |  |   61|  15.8k|    else                                     \
  |  |   62|  15.8k|      dest->var = NULL;                      \
  |  |   63|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  213|  15.8k|  CLONE_STRING(CRLfile);
  ------------------
  |  |   55|  15.8k|  do {                                       \
  |  |   56|  15.8k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 7.93k, False: 7.92k]
  |  |  ------------------
  |  |   57|  7.93k|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|  7.93k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|  7.93k|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 7.93k]
  |  |  ------------------
  |  |   59|  7.93k|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|  7.93k|    }                                        \
  |  |   61|  15.8k|    else                                     \
  |  |   62|  15.8k|      dest->var = NULL;                      \
  |  |   63|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  214|       |  /* SSL credentials: client certificate */
  215|  15.8k|  CLONE_STRING(clientcert);
  ------------------
  |  |   55|  15.8k|  do {                                       \
  |  |   56|  15.8k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 20, False: 15.8k]
  |  |  ------------------
  |  |   57|     20|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|     20|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|     20|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 20]
  |  |  ------------------
  |  |   59|     20|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|     20|    }                                        \
  |  |   61|  15.8k|    else                                     \
  |  |   62|  15.8k|      dest->var = NULL;                      \
  |  |   63|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  216|  15.8k|  CLONE_STRING(cert_type);
  ------------------
  |  |   55|  15.8k|  do {                                       \
  |  |   56|  15.8k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 22, False: 15.8k]
  |  |  ------------------
  |  |   57|     22|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|     22|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|     22|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 22]
  |  |  ------------------
  |  |   59|     22|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|     22|    }                                        \
  |  |   61|  15.8k|    else                                     \
  |  |   62|  15.8k|      dest->var = NULL;                      \
  |  |   63|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  217|  15.8k|  CLONE_STRING(key);
  ------------------
  |  |   55|  15.8k|  do {                                       \
  |  |   56|  15.8k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 10, False: 15.8k]
  |  |  ------------------
  |  |   57|     10|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|     10|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|     10|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 10]
  |  |  ------------------
  |  |   59|     10|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|     10|    }                                        \
  |  |   61|  15.8k|    else                                     \
  |  |   62|  15.8k|      dest->var = NULL;                      \
  |  |   63|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  218|  15.8k|  CLONE_STRING(key_type);
  ------------------
  |  |   55|  15.8k|  do {                                       \
  |  |   56|  15.8k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 15, False: 15.8k]
  |  |  ------------------
  |  |   57|     15|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|     15|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|     15|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 15]
  |  |  ------------------
  |  |   59|     15|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|     15|    }                                        \
  |  |   61|  15.8k|    else                                     \
  |  |   62|  15.8k|      dest->var = NULL;                      \
  |  |   63|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  219|  15.8k|  CLONE_STRING(key_passwd);
  ------------------
  |  |   55|  15.8k|  do {                                       \
  |  |   56|  15.8k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 6, False: 15.8k]
  |  |  ------------------
  |  |   57|      6|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|      6|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|      6|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 6]
  |  |  ------------------
  |  |   59|      6|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|      6|    }                                        \
  |  |   61|  15.8k|    else                                     \
  |  |   62|  15.8k|      dest->var = NULL;                      \
  |  |   63|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  220|  15.8k|  CLONE_BLOB(key_blob);
  ------------------
  |  |   66|  15.8k|  do {                                   \
  |  |   67|  15.8k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (67:8): [True: 0, False: 15.8k]
  |  |  ------------------
  |  |   68|  15.8k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   69|  15.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (69:11): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  221|  15.8k|  return TRUE;
  ------------------
  |  | 1051|  15.8k|#define TRUE true
  ------------------
  222|  15.8k|}
vtls_config.c:blobdup:
   72|  63.4k|{
   73|  63.4k|  DEBUGASSERT(dest);
  ------------------
  |  | 1077|  63.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (73:3): [True: 0, False: 63.4k]
  |  Branch (73:3): [True: 63.4k, False: 0]
  ------------------
   74|  63.4k|  DEBUGASSERT(!*dest);
  ------------------
  |  | 1077|  63.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (74:3): [True: 0, False: 63.4k]
  |  Branch (74:3): [True: 63.4k, False: 0]
  ------------------
   75|  63.4k|  if(src) {
  ------------------
  |  Branch (75:6): [True: 0, False: 63.4k]
  ------------------
   76|       |    /* only if there is data to dupe! */
   77|      0|    struct curl_blob *d;
   78|      0|    d = curlx_malloc(sizeof(struct curl_blob) + src->len);
  ------------------
  |  | 1483|      0|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
   79|      0|    if(!d)
  ------------------
  |  Branch (79:8): [True: 0, False: 0]
  ------------------
   80|      0|      return CURLE_OUT_OF_MEMORY;
   81|      0|    d->len = src->len;
   82|       |    /* Always duplicate because the connection may survive longer than the
   83|       |       handle that passed in the blob. */
   84|      0|    d->flags = CURL_BLOB_COPY;
  ------------------
  |  |   31|      0|#define CURL_BLOB_COPY   1 /* tell libcurl to copy the data */
  ------------------
   85|      0|    d->data = (void *)((char *)d + sizeof(struct curl_blob));
   86|      0|    memcpy(d->data, src->data, src->len);
   87|      0|    *dest = d;
   88|      0|  }
   89|  63.4k|  return CURLE_OK;
   90|  63.4k|}

Curl_ssl_peer_key_make:
  349|  2.46k|{
  350|  2.46k|  return ssl_peer_key_build(sslc, peer, tls_id, ppeer_key);
  351|  2.46k|}
Curl_ssl_session_destroy:
  439|  4.21k|{
  440|  4.21k|  if(s) {
  ------------------
  |  Branch (440:6): [True: 0, False: 4.21k]
  ------------------
  441|       |    /* if in the list, the list destructor takes care of it */
  442|      0|    if(Curl_node_llist(&s->list))
  ------------------
  |  Branch (442:8): [True: 0, False: 0]
  ------------------
  443|      0|      Curl_node_remove(&s->list);
  444|      0|    else {
  445|       |      cf_ssl_scache_session_ldestroy(NULL, s);
  446|      0|    }
  447|      0|  }
  448|  4.21k|}
Curl_ssl_scache_create:
  622|  13.0k|{
  623|  13.0k|  struct Curl_ssl_scache *scache;
  624|  13.0k|  struct Curl_ssl_scache_peer *peers;
  625|  13.0k|  size_t i;
  626|       |
  627|  13.0k|  *pscache = NULL;
  628|  13.0k|  peers = curlx_calloc(max_peers, sizeof(*peers));
  ------------------
  |  | 1485|  13.0k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  629|  13.0k|  if(!peers)
  ------------------
  |  Branch (629:6): [True: 0, False: 13.0k]
  ------------------
  630|      0|    return CURLE_OUT_OF_MEMORY;
  631|       |
  632|  13.0k|  scache = curlx_calloc(1, sizeof(*scache));
  ------------------
  |  | 1485|  13.0k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  633|  13.0k|  if(!scache) {
  ------------------
  |  Branch (633:6): [True: 0, False: 13.0k]
  ------------------
  634|      0|    curlx_free(peers);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  635|      0|    return CURLE_OUT_OF_MEMORY;
  636|      0|  }
  637|       |
  638|  13.0k|  scache->magic = CURL_SCACHE_MAGIC;
  ------------------
  |  |   65|  13.0k|#define CURL_SCACHE_MAGIC 0x000e1551
  ------------------
  639|  13.0k|  scache->default_lifetime_secs = (24 * 60 * 60); /* 1 day */
  640|  13.0k|  scache->peer_count = max_peers;
  641|  13.0k|  scache->peers = peers;
  642|  13.0k|  scache->age = 1;
  643|   339k|  for(i = 0; i < scache->peer_count; ++i) {
  ------------------
  |  Branch (643:14): [True: 326k, False: 13.0k]
  ------------------
  644|   326k|    scache->peers[i].max_sessions = max_sessions_per_peer;
  645|   326k|    Curl_llist_init(&scache->peers[i].sessions,
  646|   326k|                    cf_ssl_scache_session_ldestroy);
  647|   326k|  }
  648|       |
  649|  13.0k|  *pscache = scache;
  650|  13.0k|  return CURLE_OK;
  651|  13.0k|}
Curl_ssl_scache_destroy:
  654|  13.0k|{
  655|  13.0k|  if(GOOD_SCACHE(scache)) {
  ------------------
  |  |   67|  13.0k|#define GOOD_SCACHE(x) ((x) && (x)->magic == CURL_SCACHE_MAGIC)
  |  |  ------------------
  |  |  |  |   65|  13.0k|#define CURL_SCACHE_MAGIC 0x000e1551
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 13.0k, False: 0]
  |  |  |  Branch (67:32): [True: 13.0k, False: 0]
  |  |  ------------------
  ------------------
  656|  13.0k|    size_t i;
  657|  13.0k|    scache->magic = 0;
  658|   339k|    for(i = 0; i < scache->peer_count; ++i) {
  ------------------
  |  Branch (658:16): [True: 326k, False: 13.0k]
  ------------------
  659|   326k|      cf_ssl_scache_clear_peer(&scache->peers[i]);
  660|   326k|    }
  661|  13.0k|    curlx_free(scache->peers);
  ------------------
  |  | 1488|  13.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  662|  13.0k|    curlx_free(scache);
  ------------------
  |  | 1488|  13.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  663|  13.0k|  }
  664|  13.0k|}
Curl_ssl_scache_use:
  667|  1.76k|{
  668|  1.76k|  if(cf_ssl_scache_get(data)) {
  ------------------
  |  Branch (668:6): [True: 1.76k, False: 0]
  ------------------
  669|  1.76k|    struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
  670|  1.76k|    return ssl_config ? ssl_config->primary.cache_session : FALSE;
  ------------------
  |  | 1054|  1.76k|#define FALSE false
  ------------------
  |  Branch (670:12): [True: 1.76k, False: 0]
  ------------------
  671|  1.76k|  }
  672|      0|  return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  673|  1.76k|}
Curl_ssl_scache_lock:
  677|  1.75k|{
  678|  1.75k|  struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
  679|  1.75k|  if(scache) {
  ------------------
  |  Branch (679:6): [True: 1.75k, False: 0]
  ------------------
  680|  1.75k|    if(CURL_SHARE_ssl_scache(data))
  ------------------
  |  |   85|  1.75k|  ((data)->share &&                                                \
  |  |  ------------------
  |  |  |  Branch (85:4): [True: 0, False: 1.75k]
  |  |  ------------------
  |  |   86|  1.75k|   ((data)->share->specifier & (1 << CURL_LOCK_DATA_SSL_SESSION)))
  |  |  ------------------
  |  |  |  Branch (86:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  681|      0|      Curl_share_lock(data, CURL_LOCK_DATA_SSL_SESSION,
  682|      0|                      CURL_LOCK_ACCESS_SINGLE);
  683|  1.75k|    DEBUGASSERT(!scache->is_locked);
  ------------------
  |  | 1077|  1.75k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (683:5): [True: 0, False: 1.75k]
  |  Branch (683:5): [True: 1.75k, False: 0]
  ------------------
  684|  1.75k|    scache->is_locked = TRUE;
  ------------------
  |  | 1051|  1.75k|#define TRUE true
  ------------------
  685|  1.75k|  }
  686|  1.75k|}
Curl_ssl_scache_unlock:
  690|  1.75k|{
  691|  1.75k|  struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
  692|  1.75k|  if(scache) {
  ------------------
  |  Branch (692:6): [True: 1.75k, False: 0]
  ------------------
  693|  1.75k|    DEBUGASSERT(scache->is_locked);
  ------------------
  |  | 1077|  1.75k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (693:5): [True: 0, False: 1.75k]
  |  Branch (693:5): [True: 1.75k, False: 0]
  ------------------
  694|  1.75k|    scache->is_locked = FALSE;
  ------------------
  |  | 1054|  1.75k|#define FALSE false
  ------------------
  695|  1.75k|    if(CURL_SHARE_ssl_scache(data))
  ------------------
  |  |   85|  1.75k|  ((data)->share &&                                                \
  |  |  ------------------
  |  |  |  Branch (85:4): [True: 0, False: 1.75k]
  |  |  ------------------
  |  |   86|  1.75k|   ((data)->share->specifier & (1 << CURL_LOCK_DATA_SSL_SESSION)))
  |  |  ------------------
  |  |  |  Branch (86:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  696|      0|      Curl_share_unlock(data, CURL_LOCK_DATA_SSL_SESSION);
  697|  1.75k|  }
  698|  1.75k|}
Curl_ssl_scache_return:
  959|  1.75k|{
  960|       |  /* See RFC 8446 C.4:
  961|       |   * "Clients SHOULD NOT reuse a ticket for multiple connections." */
  962|  1.75k|  if(s && s->ietf_tls_id < 0x304)
  ------------------
  |  Branch (962:6): [True: 0, False: 1.75k]
  |  Branch (962:11): [True: 0, False: 0]
  ------------------
  963|      0|    (void)Curl_ssl_scache_put(cf, data, ssl_peer_key, s);
  964|  1.75k|  else
  965|  1.75k|    Curl_ssl_session_destroy(s);
  966|  1.75k|}
Curl_ssl_scache_take:
  972|  1.75k|{
  973|  1.75k|  struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
  974|  1.75k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
  975|  1.75k|  struct Curl_ssl_scache_peer *peer = NULL;
  976|  1.75k|  struct Curl_llist_node *n;
  977|  1.75k|  struct Curl_ssl_session *s = NULL;
  978|  1.75k|  CURLcode result;
  979|       |
  980|  1.75k|  *ps = NULL;
  981|  1.75k|  if(!scache)
  ------------------
  |  Branch (981:6): [True: 0, False: 1.75k]
  ------------------
  982|      0|    return CURLE_OK;
  983|       |
  984|  1.75k|  Curl_ssl_scache_lock(data);
  985|  1.75k|  result = cf_ssl_find_peer_by_key(data, scache, ssl_peer_key, conn_config,
  986|  1.75k|                                   &peer);
  987|  1.75k|  if(!result && peer) {
  ------------------
  |  Branch (987:6): [True: 1.75k, False: 0]
  |  Branch (987:17): [True: 0, False: 1.75k]
  ------------------
  988|      0|    cf_scache_peer_remove_expired(peer, (curl_off_t)time(NULL));
  989|      0|    n = Curl_llist_head(&peer->sessions);
  990|      0|    if(n) {
  ------------------
  |  Branch (990:8): [True: 0, False: 0]
  ------------------
  991|      0|      s = Curl_node_take_elem(n);
  992|      0|      (scache->age)++;            /* increase general age */
  993|      0|      peer->age = scache->age; /* set this as used in this age */
  994|      0|    }
  995|      0|  }
  996|  1.75k|  if(s) {
  ------------------
  |  Branch (996:6): [True: 0, False: 1.75k]
  ------------------
  997|      0|    *ps = s;
  998|      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]
  |  |  ------------------
  ------------------
  999|      0|                  "alpn=%s, earlydata=%zu, quic_tp=%s], %zu sessions remain",
 1000|      0|                  ssl_peer_key, (unsigned int)s->ietf_tls_id, s->alpn,
 1001|      0|                  s->earlydata_max, s->quic_tp ? "yes" : "no",
 1002|      0|                  Curl_llist_count(&peer->sessions));
 1003|      0|  }
 1004|  1.75k|  else {
 1005|  1.75k|    CURL_TRC_SSLS(data, "no cached session for %s", ssl_peer_key);
  ------------------
  |  |  194|  1.75k|  do {                                                    \
  |  |  195|  1.75k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  326|  1.75k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  3.51k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.75k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.75k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  3.51k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((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.75k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|  1.75k|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|  1.75k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 1.75k]
  |  |  ------------------
  ------------------
 1006|  1.75k|  }
 1007|  1.75k|  Curl_ssl_scache_unlock(data);
 1008|  1.75k|  return result;
 1009|  1.75k|}
vtls_scache.c:ssl_peer_key_build:
  231|  2.46k|{
  232|  2.46k|  struct dynbuf buf;
  233|  2.46k|  size_t key_len;
  234|  2.46k|  bool is_local = FALSE;
  ------------------
  |  | 1054|  2.46k|#define FALSE false
  ------------------
  235|  2.46k|  CURLcode result;
  236|       |
  237|  2.46k|  *ppeer_key = NULL;
  238|  2.46k|  curlx_dyn_init(&buf, 10 * 1024);
  239|       |
  240|  2.46k|  result = curlx_dyn_addf(&buf, "%s:%d",
  241|  2.46k|                          peer->origin->hostname, peer->origin->port);
  242|  2.46k|  if(result)
  ------------------
  |  Branch (242:6): [True: 8, False: 2.45k]
  ------------------
  243|      8|    goto out;
  244|  2.45k|  result = ssl_peer_key_add_transport(&buf, peer->transport);
  245|  2.45k|  if(result)
  ------------------
  |  Branch (245:6): [True: 0, False: 2.45k]
  ------------------
  246|      0|    goto out;
  247|  2.45k|  result = ssl_peer_key_add_vrfy(&buf, ssl, peer);
  248|  2.45k|  if(result)
  ------------------
  |  Branch (248:6): [True: 0, False: 2.45k]
  ------------------
  249|      0|    goto out;
  250|  2.45k|  if(ssl->version || ssl->version_max) {
  ------------------
  |  Branch (250:6): [True: 2.45k, False: 0]
  |  Branch (250:22): [True: 0, False: 0]
  ------------------
  251|  2.45k|    result = curlx_dyn_addf(&buf, ":TLSVER-%d-%u", ssl->version,
  252|  2.45k|                            (ssl->version_max >> 16));
  253|  2.45k|    if(result)
  ------------------
  |  Branch (253:8): [True: 1, False: 2.45k]
  ------------------
  254|      1|      goto out;
  255|  2.45k|  }
  256|  2.45k|  if(ssl->ssl_options) {
  ------------------
  |  Branch (256:6): [True: 3, False: 2.44k]
  ------------------
  257|      3|    result = curlx_dyn_addf(&buf, ":TLSOPT-%x", ssl->ssl_options);
  258|      3|    if(result)
  ------------------
  |  Branch (258:8): [True: 0, False: 3]
  ------------------
  259|      0|      goto out;
  260|      3|  }
  261|  2.45k|  if(ssl->cipher_list) {
  ------------------
  |  Branch (261:6): [True: 762, False: 1.69k]
  ------------------
  262|    762|    result = curlx_dyn_addf(&buf, ":CIPHER-%s", ssl->cipher_list);
  263|    762|    if(result)
  ------------------
  |  Branch (263:8): [True: 0, False: 762]
  ------------------
  264|      0|      goto out;
  265|    762|  }
  266|  2.45k|  if(ssl->cipher_list13) {
  ------------------
  |  Branch (266:6): [True: 121, False: 2.33k]
  ------------------
  267|    121|    result = curlx_dyn_addf(&buf, ":CIPHER13-%s", ssl->cipher_list13);
  268|    121|    if(result)
  ------------------
  |  Branch (268:8): [True: 0, False: 121]
  ------------------
  269|      0|      goto out;
  270|    121|  }
  271|  2.45k|  if(ssl->curves) {
  ------------------
  |  Branch (271:6): [True: 297, False: 2.15k]
  ------------------
  272|    297|    result = curlx_dyn_addf(&buf, ":CURVES-%s", ssl->curves);
  273|    297|    if(result)
  ------------------
  |  Branch (273:8): [True: 0, False: 297]
  ------------------
  274|      0|      goto out;
  275|    297|  }
  276|  2.45k|  if(ssl->signature_algorithms) {
  ------------------
  |  Branch (276:6): [True: 0, False: 2.45k]
  ------------------
  277|      0|    result = curlx_dyn_addf(&buf, ":SIGALGS-%s",
  278|      0|                            ssl->signature_algorithms);
  279|      0|    if(result)
  ------------------
  |  Branch (279:8): [True: 0, False: 0]
  ------------------
  280|      0|      goto out;
  281|      0|  }
  282|  2.45k|  if(ssl->verifypeer) {
  ------------------
  |  Branch (282:6): [True: 2.43k, False: 13]
  ------------------
  283|  2.43k|    result = cf_ssl_peer_key_add_path(&buf, "CA", ssl->CAfile, &is_local);
  284|  2.43k|    if(result)
  ------------------
  |  Branch (284:8): [True: 1, False: 2.43k]
  ------------------
  285|      1|      goto out;
  286|  2.43k|    result = cf_ssl_peer_key_add_path(&buf, "CApath", ssl->CApath, &is_local);
  287|  2.43k|    if(result)
  ------------------
  |  Branch (287:8): [True: 1, False: 2.43k]
  ------------------
  288|      1|      goto out;
  289|  2.43k|    result = cf_ssl_peer_key_add_path(&buf, "CRL", ssl->CRLfile, &is_local);
  290|  2.43k|    if(result)
  ------------------
  |  Branch (290:8): [True: 1, False: 2.43k]
  ------------------
  291|      1|      goto out;
  292|  2.43k|    result = cf_ssl_peer_key_add_path(&buf, "Issuer", ssl->issuercert,
  293|  2.43k|                                      &is_local);
  294|  2.43k|    if(result)
  ------------------
  |  Branch (294:8): [True: 0, False: 2.43k]
  ------------------
  295|      0|      goto out;
  296|  2.43k|    if(ssl->ca_info_blob) {
  ------------------
  |  Branch (296:8): [True: 0, False: 2.43k]
  ------------------
  297|      0|      result = cf_ssl_peer_key_add_hash(&buf, "CAInfoBlob", ssl->ca_info_blob);
  298|      0|      if(result)
  ------------------
  |  Branch (298:10): [True: 0, False: 0]
  ------------------
  299|      0|        goto out;
  300|      0|    }
  301|  2.43k|    if(ssl->issuercert_blob) {
  ------------------
  |  Branch (301:8): [True: 0, False: 2.43k]
  ------------------
  302|      0|      result = cf_ssl_peer_key_add_hash(&buf, "IssuerBlob",
  303|      0|                                        ssl->issuercert_blob);
  304|      0|      if(result)
  ------------------
  |  Branch (304:10): [True: 0, False: 0]
  ------------------
  305|      0|        goto out;
  306|      0|    }
  307|  2.43k|  }
  308|  2.44k|  if(ssl->cert_blob) {
  ------------------
  |  Branch (308:6): [True: 0, False: 2.44k]
  ------------------
  309|      0|    result = cf_ssl_peer_key_add_hash(&buf, "CertBlob", ssl->cert_blob);
  310|      0|    if(result)
  ------------------
  |  Branch (310:8): [True: 0, False: 0]
  ------------------
  311|      0|      goto out;
  312|      0|  }
  313|  2.44k|  if(ssl->pinned_key && ssl->pinned_key[0]) {
  ------------------
  |  Branch (313:6): [True: 2, False: 2.44k]
  |  Branch (313:25): [True: 1, False: 1]
  ------------------
  314|      1|    result = curlx_dyn_addf(&buf, ":Pinned-%s", ssl->pinned_key);
  315|      1|    if(result)
  ------------------
  |  Branch (315:8): [True: 0, False: 1]
  ------------------
  316|      0|      goto out;
  317|      1|  }
  318|       |
  319|  2.44k|  result = cf_ssl_peer_key_add_mtls(&buf, ssl, &is_local);
  320|  2.44k|  if(result)
  ------------------
  |  Branch (320:6): [True: 0, False: 2.44k]
  ------------------
  321|      0|    goto out;
  322|       |
  323|  2.44k|  if(!tls_id || !tls_id[0]) {
  ------------------
  |  Branch (323:6): [True: 0, False: 2.44k]
  |  Branch (323:17): [True: 0, False: 2.44k]
  ------------------
  324|      0|    result = CURLE_FAILED_INIT;
  325|      0|    goto out;
  326|      0|  }
  327|  2.44k|  result = curlx_dyn_addf(&buf, ":IMPL-%s", tls_id);
  328|  2.44k|  if(result)
  ------------------
  |  Branch (328:6): [True: 1, False: 2.44k]
  ------------------
  329|      1|    goto out;
  330|       |
  331|  2.44k|  result = curlx_dyn_addf(&buf, is_local ?
  ------------------
  |  Branch (331:33): [True: 150, False: 2.29k]
  ------------------
  332|  2.29k|                          CURL_SSLS_LOCAL_SUFFIX : CURL_SSLS_GLOBAL_SUFFIX);
  ------------------
  |  |  167|    150|#define CURL_SSLS_LOCAL_SUFFIX     ":L"
  ------------------
                                        CURL_SSLS_LOCAL_SUFFIX : CURL_SSLS_GLOBAL_SUFFIX);
  ------------------
  |  |  168|  2.29k|#define CURL_SSLS_GLOBAL_SUFFIX    ":G"
  ------------------
  333|  2.44k|  if(result)
  ------------------
  |  Branch (333:6): [True: 1, False: 2.44k]
  ------------------
  334|      1|    goto out;
  335|       |
  336|  2.44k|  *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.46k|out:
  341|  2.46k|  curlx_dyn_free(&buf);
  342|  2.46k|  return result;
  343|  2.44k|}
vtls_scache.c:ssl_peer_key_add_transport:
  180|  2.45k|{
  181|  2.45k|  switch(transport) {
  182|  2.45k|  case TRNSPRT_TCP:
  ------------------
  |  |  249|  2.45k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (182:3): [True: 2.45k, False: 0]
  ------------------
  183|  2.45k|    return CURLE_OK;
  184|      0|  case TRNSPRT_UDP:
  ------------------
  |  |  250|      0|#define TRNSPRT_UDP  4
  ------------------
  |  Branch (184:3): [True: 0, False: 2.45k]
  ------------------
  185|      0|    return curlx_dyn_add(buf, ":UDP");
  186|      0|  case TRNSPRT_QUIC:
  ------------------
  |  |  251|      0|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (186:3): [True: 0, False: 2.45k]
  ------------------
  187|      0|    return curlx_dyn_add(buf, ":QUIC");
  188|      0|  case TRNSPRT_UNIX:
  ------------------
  |  |  252|      0|#define TRNSPRT_UNIX 6
  ------------------
  |  Branch (188:3): [True: 0, False: 2.45k]
  ------------------
  189|      0|    return curlx_dyn_add(buf, ":UNIX");
  190|      0|  default:
  ------------------
  |  Branch (190:3): [True: 0, False: 2.45k]
  ------------------
  191|      0|    return curlx_dyn_addf(buf, ":TRNSPRT-%d", transport);
  192|  2.45k|  }
  193|  2.45k|}
vtls_scache.c:ssl_peer_key_add_vrfy:
  198|  2.45k|{
  199|  2.45k|  CURLcode result;
  200|       |
  201|  2.45k|  if(!ssl->verifypeer) {
  ------------------
  |  Branch (201:6): [True: 13, False: 2.44k]
  ------------------
  202|     13|    result = curlx_dyn_add(buf, ":NO-VRFY-PEER");
  203|     13|    if(result)
  ------------------
  |  Branch (203:8): [True: 0, False: 13]
  ------------------
  204|      0|      return result;
  205|     13|  }
  206|  2.45k|  if(!ssl->verifyhost) {
  ------------------
  |  Branch (206:6): [True: 1, False: 2.45k]
  ------------------
  207|      1|    result = curlx_dyn_add(buf, ":NO-VRFY-HOST");
  208|      1|    if(result)
  ------------------
  |  Branch (208:8): [True: 0, False: 1]
  ------------------
  209|      0|      return result;
  210|      1|  }
  211|  2.45k|  if(ssl->verifystatus) {
  ------------------
  |  Branch (211:6): [True: 2, False: 2.45k]
  ------------------
  212|      2|    result = curlx_dyn_add(buf, ":VRFY-STATUS");
  213|      2|    if(result)
  ------------------
  |  Branch (213:8): [True: 0, False: 2]
  ------------------
  214|      0|      return result;
  215|      2|  }
  216|  2.45k|  if((!ssl->verifypeer || !ssl->verifyhost) &&
  ------------------
  |  Branch (216:7): [True: 13, False: 2.44k]
  |  Branch (216:27): [True: 1, False: 2.43k]
  ------------------
  217|     14|     peer->peer && !Curl_peer_equal(peer->origin, peer->peer)) {
  ------------------
  |  Branch (217:6): [True: 2, False: 12]
  |  Branch (217:20): [True: 2, False: 0]
  ------------------
  218|      2|    result = curlx_dyn_addf(buf, ":CHOST-%s:CPORT-%u",
  219|      2|                            peer->peer->hostname,
  220|      2|                            peer->peer->port);
  221|      2|    if(result)
  ------------------
  |  Branch (221:8): [True: 0, False: 2]
  ------------------
  222|      0|      return result;
  223|      2|  }
  224|  2.45k|  return CURLE_OK;
  225|  2.45k|}
vtls_scache.c:cf_ssl_peer_key_add_path:
   73|  9.76k|{
   74|  9.76k|  if(path && path[0]) {
  ------------------
  |  Branch (74:6): [True: 6.90k, False: 2.86k]
  |  Branch (74:14): [True: 6.84k, False: 54]
  ------------------
   75|       |    /* We try to add absolute paths, so that the session key can stay valid
   76|       |     * when used in another process with different CWD. When a path does not
   77|       |     * exist, this does not work. Then, we add the path as is. */
   78|       |#ifdef _WIN32
   79|       |    char abspath[_MAX_PATH];
   80|       |    if(_fullpath(abspath, path, _MAX_PATH))
   81|       |      return curlx_dyn_addf(buf, ":%s-%s", name, abspath);
   82|       |    *is_local = TRUE;
   83|       |#elif defined(HAVE_REALPATH)
   84|  6.84k|    if(path[0] != '/') {
  ------------------
  |  Branch (84:8): [True: 160, False: 6.68k]
  ------------------
   85|    160|      char *abspath = realpath(path, NULL);
   86|    160|      if(abspath) {
  ------------------
  |  Branch (86:10): [True: 7, False: 153]
  ------------------
   87|      7|        CURLcode result = curlx_dyn_addf(buf, ":%s-%s", name, abspath);
   88|       |        /* !checksrc! disable BANNEDFUNC 1 */
   89|      7|        free(abspath); /* allocated by libc, free without memdebug */
   90|      7|        return result;
   91|      7|      }
   92|    153|      *is_local = TRUE;
  ------------------
  |  | 1051|    153|#define TRUE true
  ------------------
   93|    153|    }
   94|  6.83k|#endif
   95|  6.83k|    return curlx_dyn_addf(buf, ":%s-%s", name, path);
   96|  6.84k|  }
   97|  2.91k|  return CURLE_OK;
   98|  9.76k|}
vtls_scache.c:cf_ssl_peer_key_add_mtls:
  128|  2.44k|{
  129|  2.44k|  CURLcode result = CURLE_OK;
  130|  2.44k|  if(ssl->clientcert && ssl->clientcert[0]) {
  ------------------
  |  Branch (130:6): [True: 16, False: 2.43k]
  |  Branch (130:25): [True: 9, False: 7]
  ------------------
  131|      9|    result = cf_ssl_peer_key_add_path(buf, "CCERT", ssl->clientcert, is_local);
  132|      9|    if(result)
  ------------------
  |  Branch (132:8): [True: 0, False: 9]
  ------------------
  133|      0|      goto out;
  134|      9|  }
  135|  2.44k|  if(ssl->key && ssl->key[0]) {
  ------------------
  |  Branch (135:6): [True: 7, False: 2.44k]
  |  Branch (135:18): [True: 6, False: 1]
  ------------------
  136|      6|    result = cf_ssl_peer_key_add_path(buf, "KEY", ssl->key, is_local);
  137|      6|    if(result)
  ------------------
  |  Branch (137:8): [True: 0, False: 6]
  ------------------
  138|      0|      goto out;
  139|      6|  }
  140|  2.44k|  if(ssl->key_blob) {
  ------------------
  |  Branch (140:6): [True: 0, False: 2.44k]
  ------------------
  141|      0|    result = cf_ssl_peer_key_add_hash(buf, "KEYBlob", ssl->key_blob);
  142|      0|    if(result)
  ------------------
  |  Branch (142:8): [True: 0, False: 0]
  ------------------
  143|      0|      goto out;
  144|      0|  }
  145|  2.44k|  if(ssl->cert_type && ssl->cert_type[0]) {
  ------------------
  |  Branch (145:6): [True: 17, False: 2.43k]
  |  Branch (145:24): [True: 15, False: 2]
  ------------------
  146|     15|    size_t i;
  147|     15|    result = curlx_dyn_add(buf, ":CT-");
  148|  1.82k|    for(i = 0; !result && ssl->cert_type[i]; i++) {
  ------------------
  |  Branch (148:16): [True: 1.82k, False: 0]
  |  Branch (148:27): [True: 1.80k, False: 15]
  ------------------
  149|  1.80k|      char c = Curl_raw_toupper(ssl->cert_type[i]);
  150|  1.80k|      result = curlx_dyn_addn(buf, &c, 1);
  151|  1.80k|    }
  152|     15|    if(result)
  ------------------
  |  Branch (152:8): [True: 0, False: 15]
  ------------------
  153|      0|      goto out;
  154|     15|  }
  155|  2.44k|  if(ssl->key_type && ssl->key_type[0]) {
  ------------------
  |  Branch (155:6): [True: 13, False: 2.43k]
  |  Branch (155:23): [True: 11, False: 2]
  ------------------
  156|     11|    size_t i;
  157|     11|    result = curlx_dyn_add(buf, ":KT-");
  158|  1.62k|    for(i = 0; !result && ssl->key_type[i]; i++) {
  ------------------
  |  Branch (158:16): [True: 1.62k, False: 0]
  |  Branch (158:27): [True: 1.60k, False: 11]
  ------------------
  159|  1.60k|      char c = Curl_raw_toupper(ssl->key_type[i]);
  160|  1.60k|      result = curlx_dyn_addn(buf, &c, 1);
  161|  1.60k|    }
  162|     11|  }
  163|  2.44k|out:
  164|  2.44k|  return result;
  165|  2.44k|}
vtls_scache.c:cf_ssl_scache_clear_peer:
  499|   326k|{
  500|   326k|  Curl_llist_destroy(&peer->sessions, NULL);
  501|   326k|  if(peer->sobj) {
  ------------------
  |  Branch (501:6): [True: 0, False: 326k]
  ------------------
  502|      0|    DEBUGASSERT(peer->sobj_free);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (502:5): [True: 0, False: 0]
  |  Branch (502:5): [True: 0, False: 0]
  ------------------
  503|      0|    if(peer->sobj_free)
  ------------------
  |  Branch (503:8): [True: 0, False: 0]
  ------------------
  504|      0|      peer->sobj_free(peer->sobj);
  505|      0|    peer->sobj = NULL;
  506|      0|  }
  507|   326k|  peer->sobj_free = NULL;
  508|   326k|  curlx_safefree(peer->clientcert);
  ------------------
  |  | 1332|   326k|  do {                      \
  |  | 1333|   326k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|   326k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|   326k|    (ptr) = NULL;           \
  |  | 1335|   326k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 326k]
  |  |  ------------------
  ------------------
  509|   326k|  curlx_safefree(peer->key_passwd);
  ------------------
  |  | 1332|   326k|  do {                      \
  |  | 1333|   326k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|   326k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|   326k|    (ptr) = NULL;           \
  |  | 1335|   326k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 326k]
  |  |  ------------------
  ------------------
  510|   326k|  curlx_safefree(peer->ssl_peer_key);
  ------------------
  |  | 1332|   326k|  do {                      \
  |  | 1333|   326k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|   326k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|   326k|    (ptr) = NULL;           \
  |  | 1335|   326k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 326k]
  |  |  ------------------
  ------------------
  511|   326k|  peer->age = 0;
  512|       |  peer->hmac_set = FALSE;
  ------------------
  |  | 1054|   326k|#define FALSE false
  ------------------
  513|   326k|}
vtls_scache.c:cf_ssl_scache_get:
  363|  7.03k|{
  364|  7.03k|  struct Curl_ssl_scache *scache = NULL;
  365|       |  /* If a share is present, its ssl_scache has preference over the multi */
  366|  7.03k|  if(data->share && data->share->ssl_scache)
  ------------------
  |  Branch (366:6): [True: 0, False: 7.03k]
  |  Branch (366:21): [True: 0, False: 0]
  ------------------
  367|      0|    scache = data->share->ssl_scache;
  368|  7.03k|  else if(data->multi && data->multi->ssl_scache)
  ------------------
  |  Branch (368:11): [True: 7.03k, False: 0]
  |  Branch (368:26): [True: 7.03k, False: 0]
  ------------------
  369|  7.03k|    scache = data->multi->ssl_scache;
  370|  7.03k|  if(scache && !GOOD_SCACHE(scache)) {
  ------------------
  |  |   67|  7.03k|#define GOOD_SCACHE(x) ((x) && (x)->magic == CURL_SCACHE_MAGIC)
  |  |  ------------------
  |  |  |  |   65|  7.03k|#define CURL_SCACHE_MAGIC 0x000e1551
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 7.03k, False: 0]
  |  |  |  Branch (67:32): [True: 7.03k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (370:6): [True: 7.03k, False: 0]
  ------------------
  371|      0|    failf(data, "transfer would use an invalid scache at %p, denied",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  372|      0|          (void *)scache);
  373|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (373:5): [Folded, False: 0]
  |  Branch (373:5): [Folded, False: 0]
  ------------------
  374|      0|    return NULL;
  375|      0|  }
  376|  7.03k|  return scache;
  377|  7.03k|}
vtls_scache.c:cf_ssl_find_peer_by_key:
  720|  1.75k|{
  721|  1.75k|  size_t i, peer_key_len = 0;
  722|  1.75k|  CURLcode result = CURLE_OK;
  723|       |
  724|  1.75k|  *ppeer = NULL;
  725|  1.75k|  if(!GOOD_SCACHE(scache)) {
  ------------------
  |  |   67|  1.75k|#define GOOD_SCACHE(x) ((x) && (x)->magic == CURL_SCACHE_MAGIC)
  |  |  ------------------
  |  |  |  |   65|  1.75k|#define CURL_SCACHE_MAGIC 0x000e1551
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 1.75k, False: 0]
  |  |  |  Branch (67:32): [True: 1.75k, False: 0]
  |  |  ------------------
  ------------------
  726|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  727|      0|  }
  728|       |
  729|  1.75k|  CURL_TRC_SSLS(data, "find peer slot for %s among %zu slots",
  ------------------
  |  |  194|  1.75k|  do {                                                    \
  |  |  195|  1.75k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  326|  1.75k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  3.51k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.75k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.75k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  3.51k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((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.75k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|  1.75k|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|  1.75k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 1.75k]
  |  |  ------------------
  ------------------
  730|  1.75k|                ssl_peer_key, scache->peer_count);
  731|       |
  732|       |  /* check for entries with known peer_key */
  733|  45.7k|  for(i = 0; scache && i < scache->peer_count; i++) {
  ------------------
  |  Branch (733:14): [True: 45.7k, False: 0]
  |  Branch (733:24): [True: 43.9k, False: 1.75k]
  ------------------
  734|  43.9k|    if(scache->peers[i].ssl_peer_key &&
  ------------------
  |  Branch (734:8): [True: 0, False: 43.9k]
  ------------------
  735|      0|       curl_strequal(ssl_peer_key, scache->peers[i].ssl_peer_key) &&
  ------------------
  |  Branch (735:8): [True: 0, False: 0]
  ------------------
  736|      0|       cf_ssl_scache_match_auth(&scache->peers[i], conn_config)) {
  ------------------
  |  Branch (736:8): [True: 0, False: 0]
  ------------------
  737|       |      /* yes, we have a cached session for this! */
  738|      0|      *ppeer = &scache->peers[i];
  739|      0|      goto out;
  740|      0|    }
  741|  43.9k|  }
  742|       |  /* check for entries with HMAC set but no known peer_key */
  743|  45.7k|  for(i = 0; scache && i < scache->peer_count; i++) {
  ------------------
  |  Branch (743:14): [True: 45.7k, False: 0]
  |  Branch (743:24): [True: 43.9k, False: 1.75k]
  ------------------
  744|  43.9k|    if(!scache->peers[i].ssl_peer_key &&
  ------------------
  |  Branch (744:8): [True: 43.9k, False: 0]
  ------------------
  745|  43.9k|       scache->peers[i].hmac_set &&
  ------------------
  |  Branch (745:8): [True: 0, False: 43.9k]
  ------------------
  746|      0|       cf_ssl_scache_match_auth(&scache->peers[i], conn_config)) {
  ------------------
  |  Branch (746:8): [True: 0, False: 0]
  ------------------
  747|       |      /* possible entry with unknown peer_key, check hmac */
  748|      0|      unsigned char my_hmac[CURL_SHA256_DIGEST_LENGTH];
  749|      0|      if(!peer_key_len) /* we are lazy */
  ------------------
  |  Branch (749:10): [True: 0, False: 0]
  ------------------
  750|      0|        peer_key_len = strlen(ssl_peer_key);
  751|      0|      result = Curl_hmacit(&Curl_HMAC_SHA256,
  752|      0|                           scache->peers[i].key_salt,
  753|      0|                           sizeof(scache->peers[i].key_salt),
  754|      0|                           (const unsigned char *)ssl_peer_key,
  755|      0|                           peer_key_len,
  756|      0|                           my_hmac);
  757|      0|      if(result)
  ------------------
  |  Branch (757:10): [True: 0, False: 0]
  ------------------
  758|      0|        goto out;
  759|      0|      if(!memcmp(scache->peers[i].key_hmac, my_hmac, sizeof(my_hmac))) {
  ------------------
  |  Branch (759:10): [True: 0, False: 0]
  ------------------
  760|       |        /* remember peer_key for future lookups */
  761|      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]
  |  |  ------------------
  ------------------
  762|      0|                      i, ssl_peer_key);
  763|      0|        scache->peers[i].ssl_peer_key = curlx_strdup(ssl_peer_key);
  ------------------
  |  | 1482|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  764|      0|        if(!scache->peers[i].ssl_peer_key) {
  ------------------
  |  Branch (764:12): [True: 0, False: 0]
  ------------------
  765|      0|          result = CURLE_OUT_OF_MEMORY;
  766|      0|          goto out;
  767|      0|        }
  768|      0|        cf_ssl_cache_peer_update(&scache->peers[i]);
  769|      0|        *ppeer = &scache->peers[i];
  770|      0|        goto out;
  771|      0|      }
  772|      0|    }
  773|  43.9k|  }
  774|  1.75k|  CURL_TRC_SSLS(data, "peer not found for %s", ssl_peer_key);
  ------------------
  |  |  194|  1.75k|  do {                                                    \
  |  |  195|  1.75k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  326|  1.75k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  3.51k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.75k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.75k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  3.51k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((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.75k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|  1.75k|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|  1.75k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 1.75k]
  |  |  ------------------
  ------------------
  775|  1.75k|out:
  776|  1.75k|  return result;
  777|  1.75k|}

freea:
  107|    274|{
  108|       |  /* Check argument.  */
  109|    274|  uintptr_t u = (uintptr_t) p;
  110|    274|  if (u & (sa_alignment_max - 1))
  ------------------
  |  Branch (110:7): [True: 0, False: 274]
  ------------------
  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|    274|  if (u & sa_alignment_max)
  ------------------
  |  Branch (116:7): [True: 0, False: 274]
  ------------------
  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|    274|}

idn2_lookup_ul:
  656|    274|{
  657|    274|  uint8_t *utf8src = NULL;
  658|    274|  int rc;
  659|       |
  660|    274|  if (src)
  ------------------
  |  Branch (660:7): [True: 274, False: 0]
  ------------------
  661|    274|    {
  662|    274|      const char *encoding = locale_charset ();
  663|       |
  664|    274|      utf8src = u8_strconv_from_encoding (src, encoding, iconveh_error);
  665|       |
  666|    274|      if (!utf8src)
  ------------------
  |  Branch (666:11): [True: 274, False: 0]
  ------------------
  667|    274|	{
  668|    274|	  if (errno == ENOMEM)
  ------------------
  |  Branch (668:8): [True: 0, False: 274]
  ------------------
  669|      0|	    return IDN2_MALLOC;
  670|    274|	  return IDN2_ICONV_FAIL;
  671|    274|	}
  672|    274|    }
  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|    274|}

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

c_tolower:
  338|  9.31k|{
  339|  9.31k|  switch (c)
  340|  9.31k|    {
  341|  6.57k|    _C_CTYPE_UPPER:
  ------------------
  |  |  148|      0|#define _C_CTYPE_UPPER _C_CTYPE_LOWER_N ('A' - 'a')
  |  |  ------------------
  |  |  |  |  122|  1.37k|   _C_CTYPE_LOWER_A_THRU_F_N(N): \
  |  |  |  |  ------------------
  |  |  |  |  |  |  119|    822|   case 'a' + (N): case 'b' + (N): case 'c' + (N): case 'd' + (N): \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (119:4): [True: 822, False: 8.49k]
  |  |  |  |  |  |  |  Branch (119:20): [True: 0, False: 9.31k]
  |  |  |  |  |  |  |  Branch (119:36): [True: 0, False: 9.31k]
  |  |  |  |  |  |  |  Branch (119:52): [True: 0, False: 9.31k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  1.37k|   case 'e' + (N): case 'f' + (N)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (120:4): [True: 0, False: 9.31k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (122:4): [True: 548, False: 8.76k]
  |  |  |  |  ------------------
  |  |  |  |  123|  1.91k|   case 'g' + (N): case 'h' + (N): case 'i' + (N): case 'j' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (123:4): [True: 0, False: 9.31k]
  |  |  |  |  |  Branch (123:20): [True: 0, False: 9.31k]
  |  |  |  |  |  Branch (123:36): [True: 548, False: 8.76k]
  |  |  |  |  |  Branch (123:52): [True: 0, False: 9.31k]
  |  |  |  |  ------------------
  |  |  |  |  124|  3.01k|   case 'k' + (N): case 'l' + (N): case 'm' + (N): case 'n' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:4): [True: 0, False: 9.31k]
  |  |  |  |  |  Branch (124:20): [True: 548, False: 8.76k]
  |  |  |  |  |  Branch (124:36): [True: 0, False: 9.31k]
  |  |  |  |  |  Branch (124:52): [True: 548, False: 8.76k]
  |  |  |  |  ------------------
  |  |  |  |  125|  3.56k|   case 'o' + (N): case 'p' + (N): case 'q' + (N): case 'r' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (125:4): [True: 0, False: 9.31k]
  |  |  |  |  |  Branch (125:20): [True: 0, False: 9.31k]
  |  |  |  |  |  Branch (125:36): [True: 0, False: 9.31k]
  |  |  |  |  |  Branch (125:52): [True: 548, False: 8.76k]
  |  |  |  |  ------------------
  |  |  |  |  126|  6.57k|   case 's' + (N): case 't' + (N): case 'u' + (N): case 'v' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (126:4): [True: 548, False: 8.76k]
  |  |  |  |  |  Branch (126:20): [True: 1.64k, False: 7.67k]
  |  |  |  |  |  Branch (126:36): [True: 822, False: 8.49k]
  |  |  |  |  |  Branch (126:52): [True: 0, False: 9.31k]
  |  |  |  |  ------------------
  |  |  |  |  127|  6.57k|   case 'w' + (N): case 'x' + (N): case 'y' + (N): case 'z' + (N)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (127:4): [True: 0, False: 9.31k]
  |  |  |  |  |  Branch (127:20): [True: 0, False: 9.31k]
  |  |  |  |  |  Branch (127:36): [True: 0, False: 9.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  342|  6.57k|      return c - 'A' + 'a';
  343|  2.74k|    default:
  ------------------
  |  Branch (343:5): [True: 2.74k, False: 6.57k]
  ------------------
  344|  2.74k|      return c;
  345|  9.31k|    }
  346|  9.31k|}
c_isupper:
  313|  2.19k|{
  314|  2.19k|  switch (c)
  315|  2.19k|    {
  316|  1.37k|    _C_CTYPE_UPPER:
  ------------------
  |  |  148|      0|#define _C_CTYPE_UPPER _C_CTYPE_LOWER_N ('A' - 'a')
  |  |  ------------------
  |  |  |  |  122|    274|   _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: 2.19k]
  |  |  |  |  |  |  |  Branch (119:20): [True: 0, False: 2.19k]
  |  |  |  |  |  |  |  Branch (119:36): [True: 0, False: 2.19k]
  |  |  |  |  |  |  |  Branch (119:52): [True: 0, False: 2.19k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  120|    274|   case 'e' + (N): case 'f' + (N)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (120:4): [True: 0, False: 2.19k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (122:4): [True: 274, False: 1.91k]
  |  |  |  |  ------------------
  |  |  |  |  123|    274|   case 'g' + (N): case 'h' + (N): case 'i' + (N): case 'j' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (123:4): [True: 0, False: 2.19k]
  |  |  |  |  |  Branch (123:20): [True: 0, False: 2.19k]
  |  |  |  |  |  Branch (123:36): [True: 0, False: 2.19k]
  |  |  |  |  |  Branch (123:52): [True: 0, False: 2.19k]
  |  |  |  |  ------------------
  |  |  |  |  124|    274|   case 'k' + (N): case 'l' + (N): case 'm' + (N): case 'n' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:4): [True: 0, False: 2.19k]
  |  |  |  |  |  Branch (124:20): [True: 0, False: 2.19k]
  |  |  |  |  |  Branch (124:36): [True: 0, False: 2.19k]
  |  |  |  |  |  Branch (124:52): [True: 0, False: 2.19k]
  |  |  |  |  ------------------
  |  |  |  |  125|    274|   case 'o' + (N): case 'p' + (N): case 'q' + (N): case 'r' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (125:4): [True: 0, False: 2.19k]
  |  |  |  |  |  Branch (125:20): [True: 0, False: 2.19k]
  |  |  |  |  |  Branch (125:36): [True: 0, False: 2.19k]
  |  |  |  |  |  Branch (125:52): [True: 0, False: 2.19k]
  |  |  |  |  ------------------
  |  |  |  |  126|  1.37k|   case 's' + (N): case 't' + (N): case 'u' + (N): case 'v' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (126:4): [True: 0, False: 2.19k]
  |  |  |  |  |  Branch (126:20): [True: 274, False: 1.91k]
  |  |  |  |  |  Branch (126:36): [True: 822, False: 1.37k]
  |  |  |  |  |  Branch (126:52): [True: 0, False: 2.19k]
  |  |  |  |  ------------------
  |  |  |  |  127|  1.37k|   case 'w' + (N): case 'x' + (N): case 'y' + (N): case 'z' + (N)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (127:4): [True: 0, False: 2.19k]
  |  |  |  |  |  Branch (127:20): [True: 0, False: 2.19k]
  |  |  |  |  |  Branch (127:36): [True: 0, False: 2.19k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  317|  1.37k|      return true;
  318|    822|    default:
  ------------------
  |  Branch (318:5): [True: 822, False: 1.37k]
  ------------------
  319|       |      return false;
  320|  2.19k|    }
  321|  2.19k|}

c_strcasecmp:
   28|    548|{
   29|    548|  register const unsigned char *p1 = (const unsigned char *) s1;
   30|    548|  register const unsigned char *p2 = (const unsigned char *) s2;
   31|    548|  unsigned char c1, c2;
   32|       |
   33|    548|  if (p1 == p2)
  ------------------
  |  Branch (33:7): [True: 0, False: 548]
  ------------------
   34|      0|    return 0;
   35|       |
   36|    548|  do
   37|  4.65k|    {
   38|  4.65k|      c1 = c_tolower (*p1);
   39|  4.65k|      c2 = c_tolower (*p2);
   40|       |
   41|  4.65k|      if (c1 == '\0')
  ------------------
  |  Branch (41:11): [True: 274, False: 4.38k]
  ------------------
   42|    274|        break;
   43|       |
   44|  4.38k|      ++p1;
   45|  4.38k|      ++p2;
   46|  4.38k|    }
   47|  4.38k|  while (c1 == c2);
  ------------------
  |  Branch (47:10): [True: 4.11k, False: 274]
  ------------------
   48|       |
   49|    548|  if (UCHAR_MAX <= INT_MAX)
  ------------------
  |  Branch (49:7): [True: 548, Folded]
  ------------------
   50|    548|    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|    548|}

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

locale_charset:
  832|    274|{
  833|    274|  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|    274|#if HAVE_LANGINFO_CODESET || defined WINDOWS_NATIVE || defined OS2
  843|       |
  844|    274|# if HAVE_LANGINFO_CODESET
  845|       |
  846|       |  /* Most systems support nl_langinfo (CODESET) nowadays.  */
  847|    274|  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|    274|  if (codeset == NULL)
  ------------------
  |  Branch (911:7): [True: 0, False: 274]
  ------------------
  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|    274|  {
 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|    274|      {
 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|    274|        if (codeset[0] == '\0')
  ------------------
  |  Branch (1072:13): [True: 0, False: 274]
  ------------------
 1073|      0|          codeset = "ASCII";
 1074|    274|# endif
 1075|    274|      }
 1076|    274|  }
 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|    274|  return codeset;
 1161|    274|}

iconveh_open:
   48|    274|{
   49|    274|  iconv_t cd;
   50|    274|  iconv_t cd1;
   51|    274|  iconv_t cd2;
   52|       |
   53|    274|  cd = iconv_open (to_codeset, from_codeset);
   54|       |
   55|    274|  if (STRCASEEQ (from_codeset, "UTF-8", 'U','T','F','-','8',0,0,0,0))
  ------------------
  |  |  179|    274|  strcaseeq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28)
  |  |  ------------------
  |  |  |  Branch (179:3): [True: 0, False: 274]
  |  |  ------------------
  ------------------
   56|      0|    cd1 = (iconv_t)(-1);
   57|    274|  else
   58|    274|    {
   59|    274|      cd1 = iconv_open ("UTF-8", from_codeset);
   60|    274|      if (cd1 == (iconv_t)(-1))
  ------------------
  |  Branch (60:11): [True: 0, False: 274]
  ------------------
   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|    274|    }
   69|       |
   70|    274|  if (STRCASEEQ (to_codeset, "UTF-8", 'U','T','F','-','8',0,0,0,0)
  ------------------
  |  |  179|    548|  strcaseeq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28)
  |  |  ------------------
  |  |  |  Branch (179:3): [True: 0, False: 274]
  |  |  ------------------
  ------------------
   71|    274|# if (((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2) \
   72|    274|      && !defined __UCLIBC__) \
   73|    274|     || _LIBICONV_VERSION >= 0x0105 \
   74|    274|     || defined ICONV_SET_TRANSLITERATE
   75|    274|      || c_strcasecmp (to_codeset, "UTF-8//TRANSLIT") == 0
  ------------------
  |  Branch (75:10): [True: 274, False: 0]
  ------------------
   76|    274|# endif
   77|    274|     )
   78|    274|    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|    274|  cdp->cd = cd;
   95|    274|  cdp->cd1 = cd1;
   96|    274|  cdp->cd2 = cd2;
   97|    274|  return 0;
   98|    274|}
iconveh_close:
  102|    274|{
  103|    274|  if (cd->cd2 != (iconv_t)(-1) && iconv_close (cd->cd2) < 0)
  ------------------
  |  Branch (103:7): [True: 0, False: 274]
  |  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|    274|  if (cd->cd1 != (iconv_t)(-1) && iconv_close (cd->cd1) < 0)
  ------------------
  |  Branch (114:7): [True: 274, False: 0]
  |  Branch (114:35): [True: 0, False: 274]
  ------------------
  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|    274|  if (cd->cd != (iconv_t)(-1) && iconv_close (cd->cd) < 0)
  ------------------
  |  Branch (123:7): [True: 274, False: 0]
  |  Branch (123:34): [True: 0, False: 274]
  ------------------
  124|      0|    return -1;
  125|    274|  return 0;
  126|    274|}
mem_cd_iconveh:
 1055|    274|{
 1056|    274|  return mem_cd_iconveh_internal (src, srclen, cd->cd, cd->cd1, cd->cd2,
 1057|    274|                                  handler, 0, offsets, resultp, lengthp);
 1058|    274|}
mem_iconveh:
 1095|    274|{
 1096|    274|  if (srclen == 0)
  ------------------
  |  Branch (1096:7): [True: 0, False: 274]
  ------------------
 1097|      0|    {
 1098|       |      /* Nothing to convert.  */
 1099|      0|      *lengthp = 0;
 1100|      0|      return 0;
 1101|      0|    }
 1102|    274|  else if (offsets == NULL && c_strcasecmp (from_codeset, to_codeset) == 0)
  ------------------
  |  Branch (1102:12): [True: 274, False: 0]
  |  Branch (1102:31): [True: 0, False: 274]
  ------------------
 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|    274|  else
 1123|    274|    {
 1124|    274|#if HAVE_ICONV
 1125|    274|      iconveh_t cd;
 1126|    274|      char *result;
 1127|    274|      size_t length;
 1128|    274|      int retval;
 1129|       |
 1130|    274|      if (iconveh_open (to_codeset, from_codeset, &cd) < 0)
  ------------------
  |  Branch (1130:11): [True: 0, False: 274]
  ------------------
 1131|      0|        return -1;
 1132|       |
 1133|    274|      result = *resultp;
 1134|    274|      length = *lengthp;
 1135|    274|      retval = mem_cd_iconveh (src, srclen, &cd, handler, offsets,
 1136|    274|                               &result, &length);
 1137|       |
 1138|    274|      if (retval < 0)
  ------------------
  |  Branch (1138:11): [True: 274, False: 0]
  ------------------
 1139|    274|        {
 1140|       |          /* Close cd, but preserve the errno from str_cd_iconv.  */
 1141|    274|          int saved_errno = errno;
 1142|    274|          iconveh_close (&cd);
 1143|    274|          errno = saved_errno;
 1144|    274|        }
 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|    274|      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|    274|    }
 1167|    274|}
striconveh.c:mem_cd_iconveh_internal:
  347|    274|{
  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|    274|# 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|    274|  union { unsigned int align; char buf[tmpbufsize]; } tmp;
  357|    274|# define tmpbuf tmp.buf
  358|       |
  359|    274|  char *initial_result;
  360|    274|  char *result;
  361|    274|  size_t allocated;
  362|    274|  size_t length;
  363|    274|  size_t last_length = (size_t)(-1); /* only needed if offsets != NULL */
  364|       |
  365|    274|  if (*resultp != NULL && *lengthp >= sizeof (tmpbuf))
  ------------------
  |  |  357|      0|# define tmpbuf tmp.buf
  ------------------
  |  Branch (365:7): [True: 0, False: 274]
  |  Branch (365:27): [True: 0, False: 0]
  ------------------
  366|      0|    {
  367|      0|      initial_result = *resultp;
  368|      0|      allocated = *lengthp;
  369|      0|    }
  370|    274|  else
  371|    274|    {
  372|    274|      initial_result = tmpbuf;
  ------------------
  |  |  357|    274|# define tmpbuf tmp.buf
  ------------------
  373|    274|      allocated = sizeof (tmpbuf);
  ------------------
  |  |  357|    274|# define tmpbuf tmp.buf
  ------------------
  374|    274|    }
  375|    274|  result = initial_result;
  376|       |
  377|       |  /* Test whether a direct conversion is possible at all.  */
  378|    274|  if (cd == (iconv_t)(-1))
  ------------------
  |  Branch (378:7): [True: 0, False: 274]
  ------------------
  379|      0|    goto indirectly;
  380|       |
  381|    274|  if (offsets != NULL)
  ------------------
  |  Branch (381:7): [True: 0, False: 274]
  ------------------
  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|    274|  length = 0;
  391|       |
  392|       |  /* First, try a direct conversion, and see whether a conversion error
  393|       |     occurs at all.  */
  394|    274|  {
  395|    274|    const char *inptr = src;
  396|    274|    size_t insize = srclen;
  397|       |
  398|       |    /* Set to the initial state.  */
  399|    274|    iconv (cd, NULL, NULL, NULL, NULL);
  400|       |
  401|    310|    while (insize > 0)
  ------------------
  |  Branch (401:12): [True: 310, False: 0]
  ------------------
  402|    310|      {
  403|    310|        char *outptr = result + length;
  404|    310|        size_t outsize = allocated - extra_alloc - length;
  405|    310|        bool incremented;
  406|    310|        size_t res;
  407|    310|        bool grow;
  408|       |
  409|    310|        if (offsets != NULL)
  ------------------
  |  Branch (409:13): [True: 0, False: 310]
  ------------------
  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|    310|        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|    310|          res = iconv_carefully (cd,
  ------------------
  |  |  201|    310|     (*(incremented) = false, \
  |  |  202|    310|      iconv (cd, (ICONV_CONST char **) (inbuf), inbytesleft, outbuf, outbytesleft))
  ------------------
  429|    310|                                 &inptr, &insize,
  430|    310|                                 &outptr, &outsize,
  431|    310|                                 &incremented);
  432|       |
  433|    310|        length = outptr - result;
  434|    310|        grow = (length + extra_alloc > allocated / 2);
  435|    310|        if (res == (size_t)(-1))
  ------------------
  |  Branch (435:13): [True: 310, False: 0]
  ------------------
  436|    310|          {
  437|    310|            if (errno == E2BIG)
  ------------------
  |  Branch (437:17): [True: 36, False: 274]
  ------------------
  438|     36|              grow = true;
  439|    274|            else if (errno == EINVAL)
  ------------------
  |  Branch (439:22): [True: 0, False: 274]
  ------------------
  440|      0|              break;
  441|    274|            else if (errno == EILSEQ && handler != iconveh_error)
  ------------------
  |  Branch (441:22): [True: 274, False: 0]
  |  Branch (441:41): [True: 0, False: 274]
  ------------------
  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|    274|            else
  502|    274|              {
  503|    274|                if (result != initial_result)
  ------------------
  |  Branch (503:21): [True: 16, False: 258]
  ------------------
  504|     16|                  free (result);
  505|    274|                return -1;
  506|    274|              }
  507|    310|          }
  508|     36|        if (insize == 0)
  ------------------
  |  Branch (508:13): [True: 0, False: 36]
  ------------------
  509|      0|          break;
  510|     36|        if (grow)
  ------------------
  |  Branch (510:13): [True: 36, False: 0]
  ------------------
  511|     36|          {
  512|     36|            char *memory;
  513|       |
  514|     36|            allocated = 2 * allocated;
  515|     36|            if (result == initial_result)
  ------------------
  |  Branch (515:17): [True: 16, False: 20]
  ------------------
  516|     16|              memory = (char *) malloc (allocated);
  517|     20|            else
  518|     20|              memory = (char *) realloc (result, allocated);
  519|     36|            if (memory == NULL)
  ------------------
  |  Branch (519:17): [True: 0, False: 36]
  ------------------
  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|     36|            if (result == initial_result)
  ------------------
  |  Branch (526:17): [True: 16, False: 20]
  ------------------
  527|     16|              memcpy (memory, initial_result, length);
  528|     36|            result = memory;
  529|     36|          }
  530|     36|      }
  531|    274|  }
  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|    274|{
  215|    274|  if (srclen == 0)
  ------------------
  |  Branch (215:7): [True: 0, False: 274]
  ------------------
  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|    274|#if (((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2) \
  225|    274|     && !defined __UCLIBC__) \
  226|    274|    || _LIBICONV_VERSION >= 0x0105 \
  227|    274|    || defined ICONV_SET_TRANSLITERATE
  228|    274|  if (transliterate)
  ------------------
  |  Branch (228:7): [True: 274, False: 0]
  ------------------
  229|    274|    {
  230|    274|      int retval;
  231|    274|      size_t len = strlen (to_codeset);
  232|    274|      char *to_codeset_suffixed = (char *) malloca (len + 10 + 1);
  ------------------
  |  |   86|    274|    ((N) < 4032 - (2 * sa_alignment_max - 1)                                   \
  |  |  ------------------
  |  |  |  Branch (86:6): [True: 274, False: 0]
  |  |  ------------------
  |  |   87|    274|     ? (void *) (((uintptr_t) (char *) alloca ((N) + 2 * sa_alignment_max - 1) \
  |  |   88|    274|                  + (2 * sa_alignment_max - 1))                                \
  |  |   89|    274|                 & ~(uintptr_t)(2 * sa_alignment_max - 1))                     \
  |  |   90|    274|     : mmalloca (N))
  ------------------
  233|    274|      if (to_codeset_suffixed == NULL)
  ------------------
  |  Branch (233:11): [True: 0, False: 274]
  ------------------
  234|      0|        {
  235|      0|          errno = ENOMEM;
  236|      0|          return -1;
  237|      0|        }
  238|    274|      memcpy (to_codeset_suffixed, to_codeset, len);
  239|    274|      memcpy (to_codeset_suffixed + len, "//TRANSLIT", 10 + 1);
  240|       |
  241|    274|      retval = mem_iconveha_notranslit (src, srclen,
  242|    274|                                        from_codeset, to_codeset_suffixed,
  243|    274|                                        handler, offsets, resultp, lengthp);
  244|       |
  245|    274|      freea (to_codeset_suffixed);
  246|       |
  247|    274|      return retval;
  248|    274|    }
  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|    274|}
striconveha.c:mem_iconveha_notranslit:
  151|    274|{
  152|    274|  int retval = mem_iconveh (src, srclen, from_codeset, to_codeset, handler,
  153|    274|                            offsets, resultp, lengthp);
  154|    274|  if (retval >= 0 || errno != EINVAL)
  ------------------
  |  Branch (154:7): [True: 0, False: 274]
  |  Branch (154:22): [True: 274, False: 0]
  ------------------
  155|    274|    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|    274|}

u8_strconv_from_encoding:
   21|    274|{
   22|    274|  UNIT *result;
  ------------------
  |  |   31|    274|#define UNIT uint8_t
  ------------------
   23|    274|  size_t length;
   24|       |
   25|    274|  result =
   26|    274|    U_CONV_FROM_ENCODING (fromcode, handler,
  ------------------
  |  |   32|    274|#define U_CONV_FROM_ENCODING u8_conv_from_encoding
  ------------------
   27|    274|                          string, strlen (string) + 1, NULL,
   28|    274|                          NULL, &length);
   29|    274|  if (result == NULL)
  ------------------
  |  Branch (29:7): [True: 274, False: 0]
  ------------------
   30|    274|    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|    274|{
   39|    274|  if (STRCASEEQ (fromcode, "UTF-8", 'U','T','F','-','8',0,0,0,0))
  ------------------
  |  |  179|    274|  strcaseeq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28)
  |  |  ------------------
  |  |  |  Branch (179:3): [True: 0, False: 274]
  |  |  ------------------
  ------------------
   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|    274|  else
   86|    274|    {
   87|    274|      char *result = (char *) resultbuf;
   88|    274|      size_t length = *lengthp;
   89|       |
   90|    274|      if (mem_iconveha (src, srclen, fromcode, "UTF-8", true, handler,
  ------------------
  |  Branch (90:11): [True: 274, False: 0]
  ------------------
   91|    274|                        offsets, &result, &length) < 0)
   92|    274|        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|    274|}

ber_pvt_log_printf:
  124|     31|{
  125|     31|	char buf[1024];
  126|     31|	va_list ap;
  127|       |
  128|     31|	assert( fmt != NULL );
  ------------------
  |  Branch (128:2): [True: 0, False: 31]
  |  Branch (128:2): [True: 31, False: 0]
  ------------------
  129|       |
  130|     31|	if ( !ber_log_check( errlvl, loglvl )) {
  ------------------
  |  |   41|     31|#define	ber_log_check(errlvl, loglvl)	((errlvl) & (loglvl))
  ------------------
  |  Branch (130:7): [True: 31, False: 0]
  ------------------
  131|     31|		return 0;
  132|     31|	}
  133|       |
  134|     31|	va_start( ap, fmt );
  135|       |
  136|      0|	buf[sizeof(buf) - 1] = '\0';
  137|      0|	vsnprintf( buf, sizeof(buf)-1, fmt, ap );
  138|       |
  139|      0|	va_end(ap);
  140|       |
  141|      0|	(*ber_pvt_log_print)( buf );
  142|      0|	return 1;
  143|     31|}

ber_peek_element:
  153|  65.8k|{
  154|  65.8k|	ber_tag_t	tag;
  155|  65.8k|	ber_len_t	len, rest;
  156|  65.8k|	unsigned	i;
  157|  65.8k|	unsigned char *ptr;
  158|       |
  159|  65.8k|	assert( bv != NULL );
  ------------------
  |  Branch (159:2): [True: 0, False: 65.8k]
  |  Branch (159:2): [True: 65.8k, False: 0]
  ------------------
  160|       |
  161|       |	/*
  162|       |	 * Any ber element looks like this: tag length contents.
  163|       |	 * Assuming everything's ok, we return the tag, and point
  164|       |	 * bv at the contents.
  165|       |	 *
  166|       |	 * Assumptions:
  167|       |	 *	1) definite lengths
  168|       |	 *	2) primitive encodings used whenever possible
  169|       |	 */
  170|       |
  171|  65.8k|	len = 0;
  172|       |
  173|       |	/*
  174|       |	 * First, we read the tag.
  175|       |	 */
  176|  65.8k|	tag = ber_tag_and_rest( ber, bv );
  177|       |
  178|  65.8k|	rest = bv->bv_len;
  179|  65.8k|	ptr = (unsigned char *) bv->bv_val;
  180|  65.8k|	if ( tag == LBER_DEFAULT || rest == 0 ) {
  ------------------
  |  |   80|   131k|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  |  Branch (180:7): [True: 313, False: 65.5k]
  |  Branch (180:30): [True: 141, False: 65.4k]
  ------------------
  181|    454|		goto fail;
  182|    454|	}
  183|       |
  184|       |	/*
  185|       |	 * Next, read the length.  The first octet determines the length
  186|       |	 * of the length.	If bit 8 is 0, the length is the short form,
  187|       |	 * otherwise if the octet != 0x80 it's the long form, otherwise
  188|       |	 * the ber element has the unsupported indefinite-length format.
  189|       |	 * Lengths that do not fit in a ber_len_t are not accepted.
  190|       |	 */
  191|       |
  192|  65.4k|	len = *ptr++;
  193|  65.4k|	rest--;
  194|       |
  195|  65.4k|	if ( len & 0x80U ) {
  ------------------
  |  Branch (195:7): [True: 1.72k, False: 63.6k]
  ------------------
  196|  1.72k|		len &= 0x7fU;
  197|  1.72k|		if ( len - 1U > sizeof(ber_len_t) - 1U || rest < len ) {
  ------------------
  |  Branch (197:8): [True: 1.00k, False: 720]
  |  Branch (197:45): [True: 13, False: 707]
  ------------------
  198|       |			/* Indefinite-length/too long length/not enough data */
  199|  1.01k|			goto fail;
  200|  1.01k|		}
  201|       |
  202|    707|		rest -= len;
  203|    707|		i = len;
  204|  2.02k|		for( len = *ptr++ & 0xffU; --i; len |= *ptr++ & 0xffU ) {
  ------------------
  |  Branch (204:30): [True: 1.32k, False: 707]
  ------------------
  205|  1.32k|			len <<= 8;
  206|  1.32k|		}
  207|    707|	}
  208|       |
  209|       |	/* BER element should have enough data left */
  210|  64.3k|	if( len > rest ) {
  ------------------
  |  Branch (210:6): [True: 1.37k, False: 63.0k]
  ------------------
  211|  2.84k|	fail:
  212|  2.84k|		tag = LBER_DEFAULT;
  ------------------
  |  |   80|  2.84k|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  213|  2.84k|	}
  214|       |
  215|  65.8k|	bv->bv_len = len;
  216|  65.8k|	bv->bv_val = (char *) ptr;
  217|  65.8k|	return tag;
  218|  64.3k|}
ber_skip_element:
  226|  31.8k|{
  227|  31.8k|	ber_tag_t tag = ber_peek_element( ber, bv );
  228|       |
  229|  31.8k|	if ( tag != LBER_DEFAULT ) {
  ------------------
  |  |   80|  31.8k|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  |  Branch (229:7): [True: 31.4k, False: 421]
  ------------------
  230|  31.4k|		ber->ber_ptr = bv->bv_val + bv->bv_len;
  231|  31.4k|		ber->ber_tag = *(unsigned char *) ber->ber_ptr;
  232|  31.4k|	}
  233|       |
  234|  31.8k|	return tag;
  235|  31.8k|}
ber_peek_tag:
  260|  12.8k|{
  261|  12.8k|	struct berval bv;
  262|  12.8k|	ber_tag_t tag = ber_peek_element( ber, &bv );
  263|       |
  264|  12.8k|	*len = bv.bv_len;
  265|  12.8k|	return tag;
  266|  12.8k|}
ber_skip_tag:
  270|  21.1k|{
  271|  21.1k|	struct berval bv;
  272|  21.1k|	ber_tag_t tag = ber_peek_element( ber, &bv );
  273|       |
  274|  21.1k|	ber->ber_ptr = bv.bv_val;
  275|  21.1k|	ber->ber_tag = *(unsigned char *) ber->ber_ptr;
  276|       |
  277|  21.1k|	*lenp = bv.bv_len;
  278|  21.1k|	return tag;
  279|  21.1k|}
ber_get_int:
  285|  16.2k|{
  286|  16.2k|	struct berval bv;
  287|  16.2k|	ber_tag_t	tag = ber_skip_element( ber, &bv );
  288|       |
  289|  16.2k|	if ( tag == LBER_DEFAULT ) {
  ------------------
  |  |   80|  16.2k|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  |  Branch (289:7): [True: 193, False: 16.0k]
  ------------------
  290|    193|		return tag;
  291|    193|	}
  292|       |
  293|  16.0k|	return ber_decode_int( &bv, num ) ? LBER_DEFAULT : tag;
  ------------------
  |  |   80|     25|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  |  Branch (293:9): [True: 25, False: 15.9k]
  ------------------
  294|  16.2k|}
ber_decode_int:
  298|  16.0k|{
  299|  16.0k|	ber_len_t	len = bv->bv_len;
  300|  16.0k|	if ( len > sizeof(ber_int_t) )
  ------------------
  |  Branch (300:7): [True: 25, False: 15.9k]
  ------------------
  301|     25|		return -1;
  302|       |
  303|  16.0k|	assert( num != NULL );
  ------------------
  |  Branch (303:2): [True: 0, False: 15.9k]
  |  Branch (303:2): [True: 15.9k, False: 0]
  ------------------
  304|       |
  305|       |	/* parse two's complement integer */
  306|  15.9k|	if( len ) {
  ------------------
  |  Branch (306:6): [True: 11.9k, False: 4.06k]
  ------------------
  307|  11.9k|		unsigned char *buf = (unsigned char *) bv->bv_val;
  308|  11.9k|		ber_len_t i;
  309|  11.9k|		ber_int_t netnum = buf[0] & 0xff;
  310|       |
  311|       |		/* sign extend */
  312|  11.9k|		netnum = (netnum ^ 0x80) - 0x80;
  313|       |
  314|       |		/* shift in the bytes */
  315|  14.2k|		for( i = 1; i < len; i++ ) {
  ------------------
  |  Branch (315:15): [True: 2.36k, False: 11.9k]
  ------------------
  316|  2.36k|			netnum = ((unsigned)netnum << 8 ) | buf[i];
  317|  2.36k|		}
  318|       |
  319|  11.9k|		*num = netnum;
  320|       |
  321|  11.9k|	} else {
  322|  4.06k|		*num = 0;
  323|  4.06k|	}
  324|       |
  325|  15.9k|	return 0;
  326|  15.9k|}
ber_get_stringbv:
  504|  3.03k|{
  505|  3.03k|	ber_tag_t	tag;
  506|  3.03k|	char		*data;
  507|       |
  508|  3.03k|	tag = ber_skip_element( ber, bv );
  509|  3.03k|	if ( tag == LBER_DEFAULT ||
  ------------------
  |  |   80|  6.07k|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  |  Branch (509:7): [True: 68, False: 2.97k]
  ------------------
  510|  2.97k|		(( option & LBER_BV_STRING ) &&
  ------------------
  |  |  296|  2.97k|#define	LBER_BV_STRING	0x04	/* fail if berval contains embedded \0 */
  ------------------
  |  Branch (510:4): [True: 430, False: 2.54k]
  ------------------
  511|    430|		 bv->bv_len && memchr( bv->bv_val, 0, bv->bv_len - 1 )))
  ------------------
  |  Branch (511:4): [True: 76, False: 354]
  |  Branch (511:18): [True: 7, False: 69]
  ------------------
  512|     75|	{
  513|     75|		bv->bv_val = NULL;
  514|     75|		return LBER_DEFAULT;
  ------------------
  |  |   80|     75|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  515|     75|	}
  516|       |
  517|  2.96k|	data = bv->bv_val;
  518|  2.96k|	if ( option & LBER_BV_ALLOC ) {
  ------------------
  |  |  294|  2.96k|#define	LBER_BV_ALLOC	0x01	/* allocate/copy result, otherwise in-place */
  ------------------
  |  Branch (518:7): [True: 427, False: 2.53k]
  ------------------
  519|    427|		bv->bv_val = (char *) ber_memalloc_x( bv->bv_len + 1,
  520|    427|			ber->ber_memctx );
  521|    427|		if ( bv->bv_val == NULL ) {
  ------------------
  |  Branch (521:8): [True: 0, False: 427]
  ------------------
  522|      0|			return LBER_DEFAULT;
  ------------------
  |  |   80|      0|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  523|      0|		}
  524|       |
  525|    427|		if ( bv->bv_len != 0 ) {
  ------------------
  |  Branch (525:8): [True: 70, False: 357]
  ------------------
  526|     70|			memcpy( bv->bv_val, data, bv->bv_len );
  527|     70|		}
  528|    427|		data = bv->bv_val;
  529|    427|	}
  530|  2.96k|	if ( !( option & LBER_BV_NOTERM ))
  ------------------
  |  |  295|  2.96k|#define	LBER_BV_NOTERM	0x02	/* omit NUL-terminator if parsing in-place */
  ------------------
  |  Branch (530:7): [True: 2.96k, False: 0]
  ------------------
  531|  2.96k|		data[bv->bv_len] = '\0';
  532|       |
  533|  2.96k|	return tag;
  534|  2.96k|}
ber_get_stringbv_null:
  538|  10.7k|{
  539|  10.7k|	ber_tag_t	tag;
  540|  10.7k|	char		*data;
  541|       |
  542|  10.7k|	tag = ber_skip_element( ber, bv );
  543|  10.7k|	if ( tag == LBER_DEFAULT || bv->bv_len == 0 ) {
  ------------------
  |  |   80|  21.4k|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  |  Branch (543:7): [True: 130, False: 10.5k]
  |  Branch (543:30): [True: 7.61k, False: 2.98k]
  ------------------
  544|  7.74k|		bv->bv_val = NULL;
  545|  7.74k|		return tag;
  546|  7.74k|	}
  547|       |
  548|  2.98k|	if (( option & LBER_BV_STRING ) &&
  ------------------
  |  |  296|  2.98k|#define	LBER_BV_STRING	0x04	/* fail if berval contains embedded \0 */
  ------------------
  |  Branch (548:6): [True: 2.98k, False: 0]
  ------------------
  549|  2.98k|		memchr( bv->bv_val, 0, bv->bv_len - 1 ))
  ------------------
  |  Branch (549:3): [True: 12, False: 2.97k]
  ------------------
  550|     12|	{
  551|     12|		bv->bv_val = NULL;
  552|     12|		return LBER_DEFAULT;
  ------------------
  |  |   80|     12|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  553|     12|	}
  554|       |
  555|  2.97k|	data = bv->bv_val;
  556|  2.97k|	if ( option & LBER_BV_ALLOC ) {
  ------------------
  |  |  294|  2.97k|#define	LBER_BV_ALLOC	0x01	/* allocate/copy result, otherwise in-place */
  ------------------
  |  Branch (556:7): [True: 2.97k, False: 0]
  ------------------
  557|  2.97k|		bv->bv_val = (char *) ber_memalloc_x( bv->bv_len + 1,
  558|  2.97k|			ber->ber_memctx );
  559|  2.97k|		if ( bv->bv_val == NULL ) {
  ------------------
  |  Branch (559:8): [True: 0, False: 2.97k]
  ------------------
  560|      0|			return LBER_DEFAULT;
  ------------------
  |  |   80|      0|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  561|      0|		}
  562|       |
  563|  2.97k|		memcpy( bv->bv_val, data, bv->bv_len );
  564|  2.97k|		data = bv->bv_val;
  565|  2.97k|	}
  566|  2.97k|	if ( !( option & LBER_BV_NOTERM ))
  ------------------
  |  |  295|  2.97k|#define	LBER_BV_NOTERM	0x02	/* omit NUL-terminator if parsing in-place */
  ------------------
  |  Branch (566:7): [True: 2.97k, False: 0]
  ------------------
  567|  2.97k|		data[bv->bv_len] = '\0';
  568|       |
  569|  2.97k|	return tag;
  570|  2.97k|}
ber_get_stringa_null:
  588|  10.7k|{
  589|  10.7k|	BerValue	bv;
  590|  10.7k|	ber_tag_t	tag;
  591|       |
  592|  10.7k|	assert( buf != NULL );
  ------------------
  |  Branch (592:2): [True: 0, False: 10.7k]
  |  Branch (592:2): [True: 10.7k, False: 0]
  ------------------
  593|       |
  594|  10.7k|	tag = ber_get_stringbv_null( ber, &bv, LBER_BV_ALLOC | LBER_BV_STRING );
  ------------------
  |  |  294|  10.7k|#define	LBER_BV_ALLOC	0x01	/* allocate/copy result, otherwise in-place */
  ------------------
              	tag = ber_get_stringbv_null( ber, &bv, LBER_BV_ALLOC | LBER_BV_STRING );
  ------------------
  |  |  296|  10.7k|#define	LBER_BV_STRING	0x04	/* fail if berval contains embedded \0 */
  ------------------
  595|  10.7k|	*buf = bv.bv_val;
  596|       |
  597|  10.7k|	return tag;
  598|  10.7k|}
ber_get_stringal:
  602|      4|{
  603|      4|	ber_tag_t	tag;
  604|       |
  605|      4|	assert( ber != NULL );
  ------------------
  |  Branch (605:2): [True: 0, False: 4]
  |  Branch (605:2): [True: 4, False: 0]
  ------------------
  606|      4|	assert( bv != NULL );
  ------------------
  |  Branch (606:2): [True: 0, False: 4]
  |  Branch (606:2): [True: 4, False: 0]
  ------------------
  607|       |
  608|      4|	*bv = (struct berval *) ber_memalloc_x( sizeof(struct berval),
  609|      4|		ber->ber_memctx );
  610|      4|	if ( *bv == NULL ) {
  ------------------
  |  Branch (610:7): [True: 0, False: 4]
  ------------------
  611|      0|		return LBER_DEFAULT;
  ------------------
  |  |   80|      0|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  612|      0|	}
  613|       |
  614|      4|	tag = ber_get_stringbv( ber, *bv, LBER_BV_ALLOC );
  ------------------
  |  |  294|      4|#define	LBER_BV_ALLOC	0x01	/* allocate/copy result, otherwise in-place */
  ------------------
  615|      4|	if ( tag == LBER_DEFAULT ) {
  ------------------
  |  |   80|      4|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  |  Branch (615:7): [True: 0, False: 4]
  ------------------
  616|      0|		ber_memfree_x( *bv, ber->ber_memctx );
  617|       |		*bv = NULL;
  618|      0|	}
  619|      4|	return tag;
  620|      4|}
ber_scanf:
  727|  17.6k|{
  728|  17.6k|	va_list		ap;
  729|  17.6k|	LDAP_CONST char		*fmt_reset;
  ------------------
  |  |   39|  17.6k|#	define LDAP_CONST	const
  ------------------
  730|  17.6k|	char		*s, **ss, ***sss;
  731|  17.6k|	struct berval	data, *bval, **bvp, ***bvpp;
  732|  17.6k|	ber_int_t	*i;
  733|  17.6k|	ber_len_t	*l;
  734|  17.6k|	ber_tag_t	*t;
  735|  17.6k|	ber_tag_t	rc;
  736|  17.6k|	ber_len_t	len;
  737|       |
  738|  17.6k|	va_start( ap, fmt );
  739|       |
  740|  17.6k|	assert( ber != NULL );
  ------------------
  |  Branch (740:2): [True: 0, False: 17.6k]
  |  Branch (740:2): [True: 17.6k, False: 0]
  ------------------
  741|  17.6k|	assert( fmt != NULL );
  ------------------
  |  Branch (741:2): [True: 0, False: 17.6k]
  |  Branch (741:2): [True: 17.6k, False: 0]
  ------------------
  742|  17.6k|	assert( LBER_VALID( ber ) );
  ------------------
  |  Branch (742:2): [True: 0, False: 17.6k]
  |  Branch (742:2): [True: 17.6k, False: 0]
  ------------------
  743|       |
  744|  17.6k|	fmt_reset = fmt;
  745|       |
  746|  17.6k|	if ( ber->ber_debug & (LDAP_DEBUG_TRACE|LDAP_DEBUG_BER)) {
  ------------------
  |  |   81|  17.6k|#define ber_debug		ber_opts.lbo_debug
  ------------------
              	if ( ber->ber_debug & (LDAP_DEBUG_TRACE|LDAP_DEBUG_BER)) {
  ------------------
  |  |  107|  17.6k|#define LDAP_DEBUG_TRACE	0x0001
  ------------------
              	if ( ber->ber_debug & (LDAP_DEBUG_TRACE|LDAP_DEBUG_BER)) {
  ------------------
  |  |  111|  17.6k|#define LDAP_DEBUG_BER		0x0010
  ------------------
  |  Branch (746:7): [True: 0, False: 17.6k]
  ------------------
  747|      0|		ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug,
  ------------------
  |  |  173|      0|#define ber_log_printf ber_pvt_log_printf
  ------------------
              		ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug,
  ------------------
  |  |  107|      0|#define LDAP_DEBUG_TRACE	0x0001
  ------------------
              		ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug,
  ------------------
  |  |   81|      0|#define ber_debug		ber_opts.lbo_debug
  ------------------
  748|      0|			"ber_scanf fmt (%s) ber:\n", fmt );
  749|      0|		ber_log_dump( LDAP_DEBUG_BER, ber->ber_debug, ber, 1 );
  ------------------
  |  |  111|      0|#define LDAP_DEBUG_BER		0x0010
  ------------------
              		ber_log_dump( LDAP_DEBUG_BER, ber->ber_debug, ber, 1 );
  ------------------
  |  |   81|      0|#define ber_debug		ber_opts.lbo_debug
  ------------------
  750|      0|	}
  751|       |
  752|  66.7k|	for ( rc = 0; *fmt && rc != LBER_DEFAULT; fmt++ ) {
  ------------------
  |  |   80|  49.6k|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  |  Branch (752:16): [True: 49.6k, False: 17.1k]
  |  Branch (752:24): [True: 49.1k, False: 508]
  ------------------
  753|       |		/* When this is modified, remember to update
  754|       |		 * the error-cleanup code below accordingly. */
  755|  49.1k|		switch ( *fmt ) {
  756|      0|		case '!': { /* Hook */
  ------------------
  |  Branch (756:3): [True: 0, False: 49.1k]
  ------------------
  757|      0|				BERDecodeCallback *f;
  758|      0|				void *p;
  759|       |
  760|      0|				f = va_arg( ap, BERDecodeCallback * );
  761|      0|				p = va_arg( ap, void * );
  762|       |
  763|      0|				rc = (*f)( ber, p, 0 );
  764|      0|			} break;
  765|       |
  766|      0|		case 'a':	/* octet string - allocate storage as needed */
  ------------------
  |  Branch (766:3): [True: 0, False: 49.1k]
  ------------------
  767|      0|			ss = va_arg( ap, char ** );
  768|      0|			rc = ber_get_stringa( ber, ss );
  769|      0|			break;
  770|       |
  771|  10.7k|		case 'A':	/* octet string - allocate storage as needed,
  ------------------
  |  Branch (771:3): [True: 10.7k, False: 38.4k]
  ------------------
  772|       |				 * but return NULL if len == 0 */
  773|  10.7k|			ss = va_arg( ap, char ** );
  774|  10.7k|			rc = ber_get_stringa_null( ber, ss );
  775|  10.7k|			break;
  776|       |
  777|      0|		case 'b':	/* boolean */
  ------------------
  |  Branch (777:3): [True: 0, False: 49.1k]
  ------------------
  778|      0|			i = va_arg( ap, ber_int_t * );
  779|      0|			rc = ber_get_boolean( ber, i );
  780|      0|			break;
  781|       |
  782|      0|		case 'B':	/* bit string - allocate storage as needed */
  ------------------
  |  Branch (782:3): [True: 0, False: 49.1k]
  ------------------
  783|      0|			ss = va_arg( ap, char ** );
  784|      0|			l = va_arg( ap, ber_len_t * ); /* for length, in bits */
  785|      0|			rc = ber_get_bitstringa( ber, ss, l );
  786|      0|			break;
  787|       |
  788|  3.59k|		case 'e':	/* enumerated */
  ------------------
  |  Branch (788:3): [True: 3.59k, False: 45.5k]
  ------------------
  789|  12.9k|		case 'i':	/* integer */
  ------------------
  |  Branch (789:3): [True: 9.34k, False: 39.8k]
  ------------------
  790|  12.9k|			i = va_arg( ap, ber_int_t * );
  791|  12.9k|			rc = ber_get_int( ber, i );
  792|  12.9k|			break;
  793|       |
  794|    454|		case 'l':	/* length of next item */
  ------------------
  |  Branch (794:3): [True: 454, False: 48.6k]
  ------------------
  795|    454|			l = va_arg( ap, ber_len_t * );
  796|    454|			rc = ber_peek_tag( ber, l );
  797|    454|			break;
  798|       |
  799|  1.32k|		case 'm':	/* octet string in berval, in-place */
  ------------------
  |  Branch (799:3): [True: 1.32k, False: 47.8k]
  ------------------
  800|  1.32k|			bval = va_arg( ap, struct berval * );
  801|  1.32k|			rc = ber_get_stringbv( ber, bval, 0 );
  802|  1.32k|			break;
  803|       |
  804|    747|		case 'M':	/* bvoffarray - must include address of
  ------------------
  |  Branch (804:3): [True: 747, False: 48.4k]
  ------------------
  805|       |				 * a record len, and record offset.
  806|       |				 * number of records will be returned thru
  807|       |				 * len ptr on finish. parsed in-place.
  808|       |				 */
  809|    747|		{
  810|    747|			bgbvr cookie = { BvOff, 0 };
  811|    747|			bvp = va_arg( ap, struct berval ** );
  812|    747|			l = va_arg( ap, ber_len_t * );
  813|    747|			cookie.siz = *l;
  814|    747|			cookie.off = va_arg( ap, ber_len_t );
  815|    747|			rc = ber_get_stringbvl( ber, &cookie );
  816|    747|			*bvp = cookie.result;
  817|    747|			*l = cookie.siz;
  818|    747|			break;
  819|  3.59k|		}
  820|       |
  821|      0|		case 'n':	/* null */
  ------------------
  |  Branch (821:3): [True: 0, False: 49.1k]
  ------------------
  822|      0|			rc = ber_get_null( ber );
  823|      0|			break;
  824|       |
  825|      0|		case 'o':	/* octet string in a supplied berval */
  ------------------
  |  Branch (825:3): [True: 0, False: 49.1k]
  ------------------
  826|      0|			bval = va_arg( ap, struct berval * );
  827|      0|			rc = ber_get_stringbv( ber, bval, LBER_BV_ALLOC );
  ------------------
  |  |  294|      0|#define	LBER_BV_ALLOC	0x01	/* allocate/copy result, otherwise in-place */
  ------------------
  828|      0|			break;
  829|       |
  830|      4|		case 'O':	/* octet string - allocate & include length */
  ------------------
  |  Branch (830:3): [True: 4, False: 49.1k]
  ------------------
  831|      4|			bvp = va_arg( ap, struct berval ** );
  832|      4|			rc = ber_get_stringal( ber, bvp );
  833|      4|			break;
  834|       |
  835|      0|		case 's':	/* octet string - in a buffer */
  ------------------
  |  Branch (835:3): [True: 0, False: 49.1k]
  ------------------
  836|      0|			s = va_arg( ap, char * );
  837|      0|			l = va_arg( ap, ber_len_t * );
  838|      0|			rc = ber_get_stringb( ber, s, l );
  839|      0|			break;
  840|       |
  841|  4.31k|		case 't':	/* tag of next item */
  ------------------
  |  Branch (841:3): [True: 4.31k, False: 44.8k]
  ------------------
  842|  4.31k|			t = va_arg( ap, ber_tag_t * );
  843|  4.31k|			*t = rc = ber_peek_tag( ber, &len );
  844|  4.31k|			break;
  845|       |
  846|      0|		case 'T':	/* skip tag of next item */
  ------------------
  |  Branch (846:3): [True: 0, False: 49.1k]
  ------------------
  847|      0|			t = va_arg( ap, ber_tag_t * );
  848|      0|			*t = rc = ber_skip_tag( ber, &len );
  849|      0|			break;
  850|       |
  851|    105|		case 'v':	/* sequence of strings */
  ------------------
  |  Branch (851:3): [True: 105, False: 49.0k]
  ------------------
  852|    105|		{
  853|    105|			bgbvr cookie = {
  854|    105|				ChArray, LBER_BV_ALLOC | LBER_BV_STRING, sizeof( char * )
  ------------------
  |  |  294|    105|#define	LBER_BV_ALLOC	0x01	/* allocate/copy result, otherwise in-place */
  ------------------
              				ChArray, LBER_BV_ALLOC | LBER_BV_STRING, sizeof( char * )
  ------------------
  |  |  296|    105|#define	LBER_BV_STRING	0x04	/* fail if berval contains embedded \0 */
  ------------------
  855|    105|			};
  856|    105|			rc = ber_get_stringbvl( ber, &cookie );
  857|    105|			*(va_arg( ap, char *** )) = cookie.result;
  858|    105|			break;
  859|  3.59k|		}
  860|       |
  861|      0|		case 'V':	/* sequence of strings + lengths */
  ------------------
  |  Branch (861:3): [True: 0, False: 49.1k]
  ------------------
  862|      0|		{
  863|      0|			bgbvr cookie = {
  864|      0|				BvVec, LBER_BV_ALLOC, sizeof( struct berval * )
  ------------------
  |  |  294|      0|#define	LBER_BV_ALLOC	0x01	/* allocate/copy result, otherwise in-place */
  ------------------
  865|      0|			};
  866|      0|			rc = ber_get_stringbvl( ber, &cookie );
  867|      0|			*(va_arg( ap, struct berval *** )) = cookie.result;
  868|      0|			break;
  869|  3.59k|		}
  870|       |
  871|      0|		case 'W':	/* bvarray */
  ------------------
  |  Branch (871:3): [True: 0, False: 49.1k]
  ------------------
  872|      0|		{
  873|      0|			bgbvr cookie = {
  874|      0|				BvArray, LBER_BV_ALLOC, sizeof( struct berval )
  ------------------
  |  |  294|      0|#define	LBER_BV_ALLOC	0x01	/* allocate/copy result, otherwise in-place */
  ------------------
  875|      0|			};
  876|      0|			rc = ber_get_stringbvl( ber, &cookie );
  877|      0|			*(va_arg( ap, struct berval ** )) = cookie.result;
  878|      0|			break;
  879|  3.59k|		}
  880|       |
  881|     14|		case 'x':	/* skip the next element - whatever it is */
  ------------------
  |  Branch (881:3): [True: 14, False: 49.1k]
  ------------------
  882|     14|			rc = ber_skip_element( ber, &data );
  883|     14|			break;
  884|       |
  885|  15.9k|		case '{':	/* begin sequence */
  ------------------
  |  Branch (885:3): [True: 15.9k, False: 33.1k]
  ------------------
  886|  15.9k|		case '[':	/* begin set */
  ------------------
  |  Branch (886:3): [True: 0, False: 49.1k]
  ------------------
  887|  15.9k|			switch ( fmt[1] ) {
  888|      0|			case 'v': case 'V': case 'W': case 'M':
  ------------------
  |  Branch (888:4): [True: 0, False: 15.9k]
  |  Branch (888:14): [True: 0, False: 15.9k]
  |  Branch (888:24): [True: 0, False: 15.9k]
  |  Branch (888:34): [True: 0, False: 15.9k]
  ------------------
  889|      0|				break;
  890|  15.9k|			default:
  ------------------
  |  Branch (890:4): [True: 15.9k, False: 0]
  ------------------
  891|  15.9k|				rc = ber_skip_tag( ber, &len );
  892|  15.9k|				break;
  893|  15.9k|			}
  894|  15.9k|			break;
  895|       |
  896|  15.9k|		case '}':	/* end sequence */
  ------------------
  |  Branch (896:3): [True: 2.52k, False: 46.6k]
  ------------------
  897|  2.52k|		case ']':	/* end set */
  ------------------
  |  Branch (897:3): [True: 0, False: 49.1k]
  ------------------
  898|  2.52k|			break;
  899|       |
  900|      0|		default:
  ------------------
  |  Branch (900:3): [True: 0, False: 49.1k]
  ------------------
  901|      0|			if( ber->ber_debug ) {
  ------------------
  |  |   81|      0|#define ber_debug		ber_opts.lbo_debug
  ------------------
  |  Branch (901:8): [True: 0, False: 0]
  ------------------
  902|      0|				ber_log_printf( LDAP_DEBUG_ANY, ber->ber_debug,
  ------------------
  |  |  173|      0|#define ber_log_printf ber_pvt_log_printf
  ------------------
              				ber_log_printf( LDAP_DEBUG_ANY, ber->ber_debug,
  ------------------
  |  |  126|      0|#define LDAP_DEBUG_ANY		(-1)
  ------------------
              				ber_log_printf( LDAP_DEBUG_ANY, ber->ber_debug,
  ------------------
  |  |   81|      0|#define ber_debug		ber_opts.lbo_debug
  ------------------
  903|      0|					"ber_scanf: unknown fmt %c\n", *fmt );
  904|      0|			}
  905|      0|			rc = LBER_DEFAULT;
  ------------------
  |  |   80|      0|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  906|      0|			break;
  907|  49.1k|		}
  908|  49.1k|	}
  909|       |
  910|  17.6k|	va_end( ap );
  911|       |
  912|  17.6k|	if ( rc == LBER_DEFAULT ) {
  ------------------
  |  |   80|  17.6k|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  |  Branch (912:7): [True: 586, False: 17.0k]
  ------------------
  913|       |		/*
  914|       |		 * Error.  Reclaim malloced memory that was given to the caller.
  915|       |		 * Set allocated pointers to NULL, "data length" outvalues to 0.
  916|       |		 */
  917|    586|		va_start( ap, fmt );
  918|       |
  919|  1.97k|		for ( ; fmt_reset < fmt; fmt_reset++ ) {
  ------------------
  |  Branch (919:11): [True: 1.38k, False: 586]
  ------------------
  920|  1.38k|		switch ( *fmt_reset ) {
  921|      0|		case '!': { /* Hook */
  ------------------
  |  Branch (921:3): [True: 0, False: 1.38k]
  ------------------
  922|      0|				BERDecodeCallback *f;
  923|      0|				void *p;
  924|       |
  925|      0|				f = va_arg( ap, BERDecodeCallback * );
  926|      0|				p = va_arg( ap, void * );
  927|       |
  928|      0|				(void) (*f)( ber, p, 1 );
  929|      0|			} break;
  930|       |
  931|      0|		case 'a':	/* octet string - allocate storage as needed */
  ------------------
  |  Branch (931:3): [True: 0, False: 1.38k]
  ------------------
  932|    207|		case 'A':
  ------------------
  |  Branch (932:3): [True: 207, False: 1.17k]
  ------------------
  933|    207|			ss = va_arg( ap, char ** );
  934|    207|			ber_memfree_x( *ss, ber->ber_memctx );
  935|    207|			*ss = NULL;
  936|    207|			break;
  937|       |
  938|      0|		case 'b':	/* boolean */
  ------------------
  |  Branch (938:3): [True: 0, False: 1.38k]
  ------------------
  939|    233|		case 'e':	/* enumerated */
  ------------------
  |  Branch (939:3): [True: 233, False: 1.15k]
  ------------------
  940|    279|		case 'i':	/* integer */
  ------------------
  |  Branch (940:3): [True: 46, False: 1.33k]
  ------------------
  941|    279|			(void) va_arg( ap, ber_int_t * );
  942|    279|			break;
  943|       |
  944|     14|		case 'l':	/* length of next item */
  ------------------
  |  Branch (944:3): [True: 14, False: 1.37k]
  ------------------
  945|     14|			*(va_arg( ap, ber_len_t * )) = 0;
  946|     14|			break;
  947|       |
  948|    190|		case 'm':	/* berval in-place */
  ------------------
  |  Branch (948:3): [True: 190, False: 1.19k]
  ------------------
  949|    190|			bval = va_arg( ap, struct berval * );
  950|    190|			BER_BVZERO( bval );
  ------------------
  |  |  208|    190|	do { \
  |  |  209|    190|		(bv)->bv_len = 0; \
  |  |  210|    190|		(bv)->bv_val = NULL; \
  |  |  211|    190|	} while (0)
  |  |  ------------------
  |  |  |  Branch (211:11): [Folded, False: 190]
  |  |  ------------------
  ------------------
  951|    190|			break;
  952|       |
  953|    108|		case 'M':	/* BVoff array in-place */
  ------------------
  |  Branch (953:3): [True: 108, False: 1.27k]
  ------------------
  954|    108|			bvp = va_arg( ap, struct berval ** );
  955|    108|			ber_memfree_x( *bvp, ber->ber_memctx );
  956|    108|			*bvp = NULL;
  957|    108|			*(va_arg( ap, ber_len_t * )) = 0;
  958|    108|			(void) va_arg( ap, ber_len_t );
  959|    108|			break;
  960|       |
  961|      0|		case 'o':	/* octet string in a supplied berval */
  ------------------
  |  Branch (961:3): [True: 0, False: 1.38k]
  ------------------
  962|      0|			bval = va_arg( ap, struct berval * );
  963|      0|			ber_memfree_x( bval->bv_val, ber->ber_memctx );
  964|      0|			BER_BVZERO( bval );
  ------------------
  |  |  208|      0|	do { \
  |  |  209|      0|		(bv)->bv_len = 0; \
  |  |  210|      0|		(bv)->bv_val = NULL; \
  |  |  211|      0|	} while (0)
  |  |  ------------------
  |  |  |  Branch (211:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  965|      0|			break;
  966|       |
  967|      0|		case 'O':	/* octet string - allocate & include length */
  ------------------
  |  Branch (967:3): [True: 0, False: 1.38k]
  ------------------
  968|      0|			bvp = va_arg( ap, struct berval ** );
  969|      0|			ber_bvfree_x( *bvp, ber->ber_memctx );
  970|      0|			*bvp = NULL;
  971|      0|			break;
  972|       |
  973|      0|		case 's':	/* octet string - in a buffer */
  ------------------
  |  Branch (973:3): [True: 0, False: 1.38k]
  ------------------
  974|      0|			(void) va_arg( ap, char * );
  975|      0|			*(va_arg( ap, ber_len_t * )) = 0;
  976|      0|			break;
  977|       |
  978|      0|		case 't':	/* tag of next item */
  ------------------
  |  Branch (978:3): [True: 0, False: 1.38k]
  ------------------
  979|      0|		case 'T':	/* skip tag of next item */
  ------------------
  |  Branch (979:3): [True: 0, False: 1.38k]
  ------------------
  980|      0|			(void) va_arg( ap, ber_tag_t * );
  981|      0|			break;
  982|       |
  983|      0|		case 'B':	/* bit string - allocate storage as needed */
  ------------------
  |  Branch (983:3): [True: 0, False: 1.38k]
  ------------------
  984|      0|			ss = va_arg( ap, char ** );
  985|      0|			ber_memfree_x( *ss, ber->ber_memctx );
  986|      0|			*ss = NULL;
  987|      0|			*(va_arg( ap, ber_len_t * )) = 0; /* for length, in bits */
  988|      0|			break;
  989|       |
  990|     13|		case 'v':	/* sequence of strings */
  ------------------
  |  Branch (990:3): [True: 13, False: 1.37k]
  ------------------
  991|     13|			sss = va_arg( ap, char *** );
  992|     13|			ber_memvfree_x( (void **) *sss, ber->ber_memctx );
  993|     13|			*sss = NULL;
  994|     13|			break;
  995|       |
  996|      0|		case 'V':	/* sequence of strings + lengths */
  ------------------
  |  Branch (996:3): [True: 0, False: 1.38k]
  ------------------
  997|      0|			bvpp = va_arg( ap, struct berval *** );
  998|      0|			ber_bvecfree_x( *bvpp, ber->ber_memctx );
  999|      0|			*bvpp = NULL;
 1000|      0|			break;
 1001|       |
 1002|      0|		case 'W':	/* BerVarray */
  ------------------
  |  Branch (1002:3): [True: 0, False: 1.38k]
  ------------------
 1003|      0|			bvp = va_arg( ap, struct berval ** );
 1004|      0|			ber_bvarray_free_x( *bvp, ber->ber_memctx );
 1005|      0|			*bvp = NULL;
 1006|      0|			break;
 1007|       |
 1008|      0|		case 'n':	/* null */
  ------------------
  |  Branch (1008:3): [True: 0, False: 1.38k]
  ------------------
 1009|      0|		case 'x':	/* skip the next element - whatever it is */
  ------------------
  |  Branch (1009:3): [True: 0, False: 1.38k]
  ------------------
 1010|    573|		case '{':	/* begin sequence */
  ------------------
  |  Branch (1010:3): [True: 573, False: 811]
  ------------------
 1011|    573|		case '[':	/* begin set */
  ------------------
  |  Branch (1011:3): [True: 0, False: 1.38k]
  ------------------
 1012|    573|		case '}':	/* end sequence */
  ------------------
  |  Branch (1012:3): [True: 0, False: 1.38k]
  ------------------
 1013|    573|		case ']':	/* end set */
  ------------------
  |  Branch (1013:3): [True: 0, False: 1.38k]
  ------------------
 1014|    573|			break;
 1015|       |
 1016|      0|		default:
  ------------------
  |  Branch (1016:3): [True: 0, False: 1.38k]
  ------------------
 1017|       |			/* format should be good */
 1018|      0|			assert( 0 );
  ------------------
  |  Branch (1018:4): [Folded, False: 0]
  |  Branch (1018:4): [Folded, False: 0]
  ------------------
 1019|  1.38k|		}
 1020|  1.38k|		}
 1021|       |
 1022|    586|		va_end( ap );
 1023|    586|	}
 1024|       |
 1025|  17.6k|	return rc;
 1026|  17.6k|}
decode.c:ber_tag_and_rest:
   92|  65.8k|{
   93|  65.8k|	ber_tag_t	tag;
   94|  65.8k|	ptrdiff_t	rest;
   95|  65.8k|	unsigned char	*ptr;
   96|       |
   97|  65.8k|	assert( ber != NULL );
  ------------------
  |  Branch (97:2): [True: 0, False: 65.8k]
  |  Branch (97:2): [True: 65.8k, False: 0]
  ------------------
   98|  65.8k|	assert( LBER_VALID( ber ) );
  ------------------
  |  Branch (98:2): [True: 0, False: 65.8k]
  |  Branch (98:2): [True: 65.8k, False: 0]
  ------------------
   99|       |
  100|  65.8k|	ptr = (unsigned char *) ber->ber_ptr;
  101|  65.8k|	rest = (unsigned char *) ber->ber_end - ptr;
  102|  65.8k|	if ( rest <= 0 ) {
  ------------------
  |  Branch (102:7): [True: 228, False: 65.6k]
  ------------------
  103|    228|		goto fail;
  104|    228|	}
  105|       |
  106|  65.6k|	tag = ber->ber_tag;
  107|  65.6k|	if ( (char *) ptr == ber->ber_buf ) {
  ------------------
  |  Branch (107:7): [True: 7.60k, False: 58.0k]
  ------------------
  108|  7.60k|		tag = *ptr;
  109|  7.60k|	}
  110|  65.6k|	ptr++;
  111|  65.6k|	rest--;
  112|  65.6k|	if ( (tag & LBER_BIG_TAG_MASK) != LBER_BIG_TAG_MASK ) {
  ------------------
  |  |   71|  65.6k|#define LBER_BIG_TAG_MASK		((ber_tag_t) 0x1fU)
  ------------------
              	if ( (tag & LBER_BIG_TAG_MASK) != LBER_BIG_TAG_MASK ) {
  ------------------
  |  |   71|  65.6k|#define LBER_BIG_TAG_MASK		((ber_tag_t) 0x1fU)
  ------------------
  |  Branch (112:7): [True: 59.8k, False: 5.79k]
  ------------------
  113|  59.8k|		goto done;
  114|  59.8k|	}
  115|       |
  116|  19.1k|	do {
  117|  19.1k|		if ( rest <= 0 ) {
  ------------------
  |  Branch (117:8): [True: 31, False: 19.1k]
  ------------------
  118|     31|			break;
  119|     31|		}
  120|  19.1k|		tag <<= 8;
  121|  19.1k|		tag |= *ptr++ & 0xffU;
  122|  19.1k|		rest--;
  123|       |
  124|  19.1k|		if ( ! (tag & LBER_MORE_TAG_MASK) ) {
  ------------------
  |  |   72|  19.1k|#define LBER_MORE_TAG_MASK		((ber_tag_t) 0x80U)
  ------------------
  |  Branch (124:8): [True: 5.71k, False: 13.4k]
  ------------------
  125|  5.71k|			goto done;
  126|  5.71k|		}
  127|  19.1k|	} while ( tag <= (ber_tag_t)-1 / 256 );
  ------------------
  |  Branch (127:12): [True: 13.3k, False: 54]
  ------------------
  128|       |
  129|    313| fail:
  130|       |	/* Error or unsupported tag size */
  131|    313|	tag = LBER_DEFAULT;
  ------------------
  |  |   80|    313|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  132|       |
  133|  65.8k| done:
  134|  65.8k|	bv->bv_len = rest;
  135|  65.8k|	bv->bv_val = (char *) ptr;
  136|  65.8k|	return tag;
  137|    313|}
decode.c:ber_get_stringbvl:
  382|    852|{
  383|    852|	int i = 0, n;
  384|    852|	ber_tag_t tag;
  385|    852|	ber_len_t tot_size = 0, siz = b->siz;
  386|    852|	char *last, *orig;
  387|    852|	struct berval bv, *bvp = NULL;
  388|    852|	union stringbvl_u {
  389|    852|		char **ca;				/* ChArray */
  390|    852|		BerVarray ba;			/* BvArray */
  391|    852|		struct berval **bv;		/* BvVec */
  392|    852|		char *bo;				/* BvOff */
  393|    852|	} res;
  394|       |
  395|    852|	tag = ber_skip_tag( ber, &bv.bv_len );
  396|       |
  397|    852|	if ( tag != LBER_DEFAULT ) {
  ------------------
  |  |   80|    852|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  |  Branch (397:7): [True: 782, False: 70]
  ------------------
  398|    782|		tag = 0;
  399|    782|		orig = ber->ber_ptr;
  400|    782|		last = orig + bv.bv_len;
  401|       |
  402|  2.60k|		for ( ; ber->ber_ptr < last; i++, tot_size += siz ) {
  ------------------
  |  Branch (402:11): [True: 1.85k, False: 752]
  ------------------
  403|  1.85k|			if ( ber_skip_element( ber, &bv ) == LBER_DEFAULT )
  ------------------
  |  |   80|  1.85k|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  |  Branch (403:9): [True: 30, False: 1.82k]
  ------------------
  404|     30|				break;
  405|  1.85k|		}
  406|    782|		if ( ber->ber_ptr != last ) {
  ------------------
  |  Branch (406:8): [True: 44, False: 738]
  ------------------
  407|     44|			i = 0;
  408|     44|			tag = LBER_DEFAULT;
  ------------------
  |  |   80|     44|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  409|     44|		}
  410|       |
  411|    782|		ber->ber_ptr = orig;
  412|    782|		ber->ber_tag = *(unsigned char *) orig;
  413|    782|	}
  414|       |
  415|    852|	b->siz = i;
  416|    852|	if ( i == 0 ) {
  ------------------
  |  Branch (416:7): [True: 506, False: 346]
  ------------------
  417|    506|		return tag;
  418|    506|	}
  419|       |
  420|       |	/* Allocate and NULL-terminate the result vector */
  421|    346|	b->result = ber_memalloc_x( tot_size + siz, ber->ber_memctx );
  422|    346|	if ( b->result == NULL ) {
  ------------------
  |  Branch (422:7): [True: 0, False: 346]
  ------------------
  423|      0|		return LBER_DEFAULT;
  ------------------
  |  |   80|      0|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  424|      0|	}
  425|    346|	switch (b->choice) {
  ------------------
  |  Branch (425:10): [True: 346, False: 0]
  ------------------
  426|     97|	case ChArray:
  ------------------
  |  Branch (426:2): [True: 97, False: 249]
  ------------------
  427|     97|		res.ca = b->result;
  428|     97|		res.ca[i] = NULL;
  429|     97|		break;
  430|      0|	case BvArray:
  ------------------
  |  Branch (430:2): [True: 0, False: 346]
  ------------------
  431|      0|		res.ba = b->result;
  432|      0|		res.ba[i].bv_val = NULL;
  433|      0|		break;
  434|      0|	case BvVec:
  ------------------
  |  Branch (434:2): [True: 0, False: 346]
  ------------------
  435|      0|		res.bv = b->result;
  436|      0|		res.bv[i] = NULL;
  437|      0|		break;
  438|    249|	case BvOff:
  ------------------
  |  Branch (438:2): [True: 249, False: 97]
  ------------------
  439|    249|		res.bo = (char *) b->result + b->off;
  440|    249|		((struct berval *) (res.bo + tot_size))->bv_val = NULL;
  441|    249|		tot_size = 0;
  442|    249|		break;
  443|    346|	}
  444|       |
  445|    346|	n = 0;
  446|  1.70k|	do {
  447|  1.70k|		tag = ber_get_stringbv( ber, &bv, b->option );
  448|  1.70k|		if ( tag == LBER_DEFAULT ) {
  ------------------
  |  |   80|  1.70k|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  |  Branch (448:8): [True: 7, False: 1.70k]
  ------------------
  449|      7|			goto failed;
  450|      7|		}
  451|       |
  452|       |		/* store my result */
  453|  1.70k|		switch (b->choice) {
  ------------------
  |  Branch (453:11): [True: 1.70k, False: 0]
  ------------------
  454|    423|		case ChArray:
  ------------------
  |  Branch (454:3): [True: 423, False: 1.27k]
  ------------------
  455|    423|			res.ca[n] = bv.bv_val;
  456|    423|			break;
  457|      0|		case BvArray:
  ------------------
  |  Branch (457:3): [True: 0, False: 1.70k]
  ------------------
  458|      0|			res.ba[n] = bv;
  459|      0|			break;
  460|      0|		case BvVec:
  ------------------
  |  Branch (460:3): [True: 0, False: 1.70k]
  ------------------
  461|      0|			bvp = ber_memalloc_x( sizeof( struct berval ),
  462|      0|				ber->ber_memctx );
  463|      0|			if ( !bvp ) {
  ------------------
  |  Branch (463:9): [True: 0, False: 0]
  ------------------
  464|      0|				ber_memfree_x( bv.bv_val, ber->ber_memctx );
  465|      0|				goto failed;
  466|      0|			}
  467|      0|			res.bv[n] = bvp;
  468|      0|			*bvp = bv;
  469|      0|			break;
  470|  1.27k|		case BvOff:
  ------------------
  |  Branch (470:3): [True: 1.27k, False: 423]
  ------------------
  471|  1.27k|			*(struct berval *)(res.bo + tot_size) = bv;
  472|  1.27k|			tot_size += siz;
  473|  1.27k|			break;
  474|  1.70k|		}
  475|  1.70k|	} while (++n < i);
  ------------------
  |  Branch (475:11): [True: 1.36k, False: 339]
  ------------------
  476|    339|	return tag;
  477|       |
  478|      7|failed:
  479|      7|	if (b->choice != BvOff) { /* BvOff does not have LBER_BV_ALLOC set */
  ------------------
  |  Branch (479:6): [True: 7, False: 0]
  ------------------
  480|     31|		while (--n >= 0) {
  ------------------
  |  Branch (480:10): [True: 24, False: 7]
  ------------------
  481|     24|			switch(b->choice) {
  482|     24|			case ChArray:
  ------------------
  |  Branch (482:4): [True: 24, False: 0]
  ------------------
  483|     24|				ber_memfree_x(res.ca[n], ber->ber_memctx);
  484|     24|				break;
  485|      0|			case BvArray:
  ------------------
  |  Branch (485:4): [True: 0, False: 24]
  ------------------
  486|      0|				ber_memfree_x(res.ba[n].bv_val, ber->ber_memctx);
  487|      0|				break;
  488|      0|			case BvVec:
  ------------------
  |  Branch (488:4): [True: 0, False: 24]
  ------------------
  489|      0|				ber_memfree_x(res.bv[n]->bv_val, ber->ber_memctx);
  490|      0|				ber_memfree_x(res.bv[n], ber->ber_memctx);
  491|      0|				break;
  492|      0|			default:
  ------------------
  |  Branch (492:4): [True: 0, False: 24]
  ------------------
  493|      0|				break;
  494|     24|			}
  495|     24|		}
  496|      7|	}
  497|      7|	ber_memfree_x(b->result, ber->ber_memctx);
  498|      7|	b->result = NULL;
  499|      7|	return LBER_DEFAULT;
  ------------------
  |  |   80|      7|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  500|      7|}

ber_put_enum:
  201|  3.12k|{
  202|  3.12k|	if ( tag == LBER_DEFAULT ) {
  ------------------
  |  |   80|  3.12k|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  |  Branch (202:7): [True: 3.12k, False: 0]
  ------------------
  203|  3.12k|		tag = LBER_ENUMERATED;
  ------------------
  |  |   88|  3.12k|#define LBER_ENUMERATED		((ber_tag_t) 0x0aUL)
  ------------------
  204|  3.12k|	}
  205|       |
  206|  3.12k|	return ber_put_int_or_enum( ber, num, tag );
  207|  3.12k|}
ber_put_int:
  214|  14.3k|{
  215|  14.3k|	if ( tag == LBER_DEFAULT ) {
  ------------------
  |  |   80|  14.3k|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  |  Branch (215:7): [True: 13.5k, False: 769]
  ------------------
  216|  13.5k|		tag = LBER_INTEGER;
  ------------------
  |  |   84|  13.5k|#define LBER_INTEGER		((ber_tag_t) 0x02UL)
  ------------------
  217|  13.5k|	}
  218|       |
  219|  14.3k|	return ber_put_int_or_enum( ber, num, tag );
  220|  14.3k|}
ber_put_ostring:
  228|  10.4k|{
  229|  10.4k|	int rc;
  230|  10.4k|	unsigned char header[HEADER_SIZE], *ptr;
  231|       |
  232|  10.4k|	if ( tag == LBER_DEFAULT ) {
  ------------------
  |  |   80|  10.4k|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  |  Branch (232:7): [True: 6.10k, False: 4.36k]
  ------------------
  233|  6.10k|		tag = LBER_OCTETSTRING;
  ------------------
  |  |   86|  6.10k|#define LBER_OCTETSTRING	((ber_tag_t) 0x04UL)
  ------------------
  234|  6.10k|	}
  235|       |
  236|  10.4k|	if ( len > MAXINT_BERSIZE ) {
  ------------------
  |  |   69|  10.4k|	(INT_MAX>0xffffffffUL ? (ber_len_t) 0xffffffffUL : INT_MAX-HEADER_SIZE)
  |  |  ------------------
  |  |  |  |   49|  20.9k|#define HEADER_SIZE (TAGBUF_SIZE + LENBUF_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  10.4k|#define TAGBUF_SIZE OCTET_SIZE(ber_tag_t)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  10.4k|#define OCTET_SIZE(type) ((ber_len_t) (sizeof(type)*CHAR_BIT + 7) / 8)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define HEADER_SIZE (TAGBUF_SIZE + LENBUF_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   48|  10.4k|#define LENBUF_SIZE (1 + OCTET_SIZE(ber_len_t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  10.4k|#define OCTET_SIZE(type) ((ber_len_t) (sizeof(type)*CHAR_BIT + 7) / 8)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (69:3): [Folded, False: 10.4k]
  |  |  ------------------
  ------------------
  |  Branch (236:7): [True: 0, False: 10.4k]
  ------------------
  237|      0|		return -1;
  238|      0|	}
  239|       |
  240|  10.4k|	ptr = ber_prepend_len( &header[sizeof(header)], len );
  241|  10.4k|	ptr = ber_prepend_tag( ptr, tag );
  242|       |
  243|  10.4k|	rc = ber_write( ber, (char *) ptr, &header[sizeof(header)] - ptr, 0 );
  244|  10.4k|	if ( rc >= 0 && ber_write( ber, str, len, 0 ) >= 0 ) {
  ------------------
  |  Branch (244:7): [True: 10.4k, False: 0]
  |  Branch (244:18): [True: 10.4k, False: 0]
  ------------------
  245|       |		/* length(tag + length + contents) */
  246|  10.4k|		return rc + (int) len;
  247|  10.4k|	}
  248|       |
  249|      0|	return -1;
  250|  10.4k|}
ber_put_berval:
  257|  3.07k|{
  258|  3.07k|	if( bv == NULL || bv->bv_len == 0 ) {
  ------------------
  |  Branch (258:6): [True: 0, False: 3.07k]
  |  Branch (258:20): [True: 3.04k, False: 32]
  ------------------
  259|  3.04k|		return ber_put_ostring( ber, "", (ber_len_t) 0, tag );
  260|  3.04k|	}
  261|       |
  262|     32|	return ber_put_ostring( ber, bv->bv_val, bv->bv_len, tag );
  263|  3.07k|}
ber_put_string:
  270|  7.10k|{
  271|  7.10k|	assert( str != NULL );
  ------------------
  |  Branch (271:2): [True: 0, False: 7.10k]
  |  Branch (271:2): [True: 7.10k, False: 0]
  ------------------
  272|       |
  273|  7.10k|	return ber_put_ostring( ber, str, strlen( str ), tag );
  274|  7.10k|}
ber_put_null:
  312|  1.93k|{
  313|  1.93k|	unsigned char data[TAGBUF_SIZE + 1], *ptr;
  314|       |
  315|  1.93k|	if ( tag == LBER_DEFAULT ) {
  ------------------
  |  |   80|  1.93k|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  |  Branch (315:7): [True: 0, False: 1.93k]
  ------------------
  316|      0|		tag = LBER_NULL;
  ------------------
  |  |   87|      0|#define LBER_NULL			((ber_tag_t) 0x05UL)
  ------------------
  317|      0|	}
  318|       |
  319|  1.93k|	data[sizeof(data) - 1] = 0;			/* length */
  320|  1.93k|	ptr = ber_prepend_tag( &data[sizeof(data) - 1], tag );
  321|       |
  322|  1.93k|	return ber_write( ber, (char *) ptr, &data[sizeof(data)] - ptr, 0 );
  323|  1.93k|}
ber_put_boolean:
  330|  1.56k|{
  331|  1.56k|	unsigned char data[TAGBUF_SIZE + 2], *ptr;
  332|       |
  333|  1.56k|	if ( tag == LBER_DEFAULT )
  ------------------
  |  |   80|  1.56k|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  |  Branch (333:7): [True: 1.56k, False: 1]
  ------------------
  334|  1.56k|		tag = LBER_BOOLEAN;
  ------------------
  |  |   83|  1.56k|#define LBER_BOOLEAN		((ber_tag_t) 0x01UL)
  ------------------
  335|       |
  336|  1.56k|	data[sizeof(data) - 1] = boolval ? 0xff : 0;
  ------------------
  |  Branch (336:27): [True: 1, False: 1.56k]
  ------------------
  337|  1.56k|	data[sizeof(data) - 2] = 1;			/* length */
  338|  1.56k|	ptr = ber_prepend_tag( &data[sizeof(data) - 2], tag );
  339|       |
  340|  1.56k|	return ber_write( ber, (char *) ptr, &data[sizeof(data)] - ptr, 0 );
  341|  1.56k|}
ber_start_seq:
  415|  14.0k|{
  416|  14.0k|	if ( tag == LBER_DEFAULT ) {
  ------------------
  |  |   80|  14.0k|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  |  Branch (416:7): [True: 8.67k, False: 5.34k]
  ------------------
  417|  8.67k|		tag = LBER_SEQUENCE;
  ------------------
  |  |   89|  8.67k|#define LBER_SEQUENCE		((ber_tag_t) 0x30UL)	/* constructed */
  ------------------
  418|  8.67k|	}
  419|       |
  420|  14.0k|	return ber_start_seqorset( ber, tag );
  421|  14.0k|}
ber_printf:
  503|  17.7k|{
  504|  17.7k|	va_list		ap;
  505|  17.7k|	char		*s, **ss;
  506|  17.7k|	struct berval	*bv, **bvp;
  507|  17.7k|	int		rc;
  508|  17.7k|	ber_int_t	i;
  509|  17.7k|	ber_len_t	len;
  510|       |
  511|  17.7k|	assert( ber != NULL );
  ------------------
  |  Branch (511:2): [True: 0, False: 17.7k]
  |  Branch (511:2): [True: 17.7k, False: 0]
  ------------------
  512|  17.7k|	assert( fmt != NULL );
  ------------------
  |  Branch (512:2): [True: 0, False: 17.7k]
  |  Branch (512:2): [True: 17.7k, False: 0]
  ------------------
  513|  17.7k|	assert( LBER_VALID( ber ) );
  ------------------
  |  Branch (513:2): [True: 0, False: 17.7k]
  |  Branch (513:2): [True: 17.7k, False: 0]
  ------------------
  514|       |
  515|  17.7k|	va_start( ap, fmt );
  516|       |
  517|   100k|	for ( rc = 0; *fmt && rc != -1; fmt++ ) {
  ------------------
  |  Branch (517:16): [True: 82.6k, False: 17.7k]
  |  Branch (517:24): [True: 82.6k, False: 0]
  ------------------
  518|  82.6k|		switch ( *fmt ) {
  519|      0|		case '!': { /* hook */
  ------------------
  |  Branch (519:3): [True: 0, False: 82.6k]
  ------------------
  520|      0|				BEREncodeCallback *f;
  521|      0|				void *p;
  522|       |
  523|      0|				ber->ber_usertag = 0;
  524|       |
  525|      0|				f = va_arg( ap, BEREncodeCallback * );
  526|      0|				p = va_arg( ap, void * );
  527|      0|				rc = (*f)( ber, p );
  528|       |
  529|      0|				if ( ber->ber_usertag ) {
  ------------------
  |  Branch (529:10): [True: 0, False: 0]
  ------------------
  530|      0|					goto next;
  531|      0|				}
  532|      0|			} break;
  533|       |
  534|  1.56k|		case 'b':	/* boolean */
  ------------------
  |  Branch (534:3): [True: 1.56k, False: 81.0k]
  ------------------
  535|  1.56k|			i = va_arg( ap, ber_int_t );
  536|  1.56k|			rc = ber_put_boolean( ber, i, ber->ber_tag );
  537|  1.56k|			break;
  538|       |
  539|  14.3k|		case 'i':	/* int */
  ------------------
  |  Branch (539:3): [True: 14.3k, False: 68.2k]
  ------------------
  540|  14.3k|			i = va_arg( ap, ber_int_t );
  541|  14.3k|			rc = ber_put_int( ber, i, ber->ber_tag );
  542|  14.3k|			break;
  543|       |
  544|  3.12k|		case 'e':	/* enumeration */
  ------------------
  |  Branch (544:3): [True: 3.12k, False: 79.5k]
  ------------------
  545|  3.12k|			i = va_arg( ap, ber_int_t );
  546|  3.12k|			rc = ber_put_enum( ber, i, ber->ber_tag );
  547|  3.12k|			break;
  548|       |
  549|  1.93k|		case 'n':	/* null */
  ------------------
  |  Branch (549:3): [True: 1.93k, False: 80.7k]
  ------------------
  550|  1.93k|			rc = ber_put_null( ber, ber->ber_tag );
  551|  1.93k|			break;
  552|       |
  553|  11.7k|		case 'N':	/* Debug NULL */
  ------------------
  |  Branch (553:3): [True: 11.7k, False: 70.9k]
  ------------------
  554|  11.7k|			rc = 0;
  555|  11.7k|			if( lber_int_null != 0 ) {
  ------------------
  |  Branch (555:8): [True: 0, False: 11.7k]
  ------------------
  556|       |				/* Insert NULL to ensure peer ignores unknown tags */
  557|      0|				rc = ber_put_null( ber, lber_int_null );
  558|      0|			}
  559|  11.7k|			break;
  560|       |
  561|    290|		case 'o':	/* octet string (non-null terminated) */
  ------------------
  |  Branch (561:3): [True: 290, False: 82.3k]
  ------------------
  562|    290|			s = va_arg( ap, char * );
  563|    290|			len = va_arg( ap, ber_len_t );
  564|    290|			rc = ber_put_ostring( ber, s, len, ber->ber_tag );
  565|    290|			break;
  566|       |
  567|  3.07k|		case 'O':	/* berval octet string */
  ------------------
  |  Branch (567:3): [True: 3.07k, False: 79.5k]
  ------------------
  568|  3.07k|			bv = va_arg( ap, struct berval * );
  569|  3.07k|			if( bv == NULL ) break;
  ------------------
  |  Branch (569:8): [True: 0, False: 3.07k]
  ------------------
  570|  3.07k|			rc = ber_put_berval( ber, bv, ber->ber_tag );
  571|  3.07k|			break;
  572|       |
  573|  5.96k|		case 's':	/* string */
  ------------------
  |  Branch (573:3): [True: 5.96k, False: 76.6k]
  ------------------
  574|  5.96k|			s = va_arg( ap, char * );
  575|  5.96k|			rc = ber_put_string( ber, s, ber->ber_tag );
  576|  5.96k|			break;
  577|       |
  578|      0|		case 'B':	/* bit string */
  ------------------
  |  Branch (578:3): [True: 0, False: 82.6k]
  ------------------
  579|      0|		case 'X':	/* bit string (deprecated) */
  ------------------
  |  Branch (579:3): [True: 0, False: 82.6k]
  ------------------
  580|      0|			s = va_arg( ap, char * );
  581|      0|			len = va_arg( ap, ber_len_t );	/* in bits */
  582|      0|			rc = ber_put_bitstring( ber, s, len, ber->ber_tag );
  583|      0|			break;
  584|       |
  585|  12.4k|		case 't':	/* tag for the next element */
  ------------------
  |  Branch (585:3): [True: 12.4k, False: 70.2k]
  ------------------
  586|  12.4k|			ber->ber_tag = va_arg( ap, ber_tag_t );
  587|  12.4k|			goto next;
  588|       |
  589|  1.18k|		case 'v':	/* vector of strings */
  ------------------
  |  Branch (589:3): [True: 1.18k, False: 81.4k]
  ------------------
  590|  1.18k|			if ( (ss = va_arg( ap, char ** )) == NULL )
  ------------------
  |  Branch (590:9): [True: 488, False: 701]
  ------------------
  591|    488|				break;
  592|  1.84k|			for ( i = 0; ss[i] != NULL; i++ ) {
  ------------------
  |  Branch (592:17): [True: 1.13k, False: 701]
  ------------------
  593|  1.13k|				if ( (rc = ber_put_string( ber, ss[i],
  ------------------
  |  Branch (593:10): [True: 0, False: 1.13k]
  ------------------
  594|  1.13k|				    ber->ber_tag )) == -1 )
  595|      0|					break;
  596|  1.13k|			}
  597|    701|			break;
  598|       |
  599|      0|		case 'V':	/* sequences of strings + lengths */
  ------------------
  |  Branch (599:3): [True: 0, False: 82.6k]
  ------------------
  600|      0|			if ( (bvp = va_arg( ap, struct berval ** )) == NULL )
  ------------------
  |  Branch (600:9): [True: 0, False: 0]
  ------------------
  601|      0|				break;
  602|      0|			for ( i = 0; bvp[i] != NULL; i++ ) {
  ------------------
  |  Branch (602:17): [True: 0, False: 0]
  ------------------
  603|      0|				if ( (rc = ber_put_berval( ber, bvp[i],
  ------------------
  |  Branch (603:10): [True: 0, False: 0]
  ------------------
  604|      0|				    ber->ber_tag )) == -1 )
  605|      0|					break;
  606|      0|			}
  607|      0|			break;
  608|       |
  609|      0|		case 'W':	/* BerVarray */
  ------------------
  |  Branch (609:3): [True: 0, False: 82.6k]
  ------------------
  610|      0|			if ( (bv = va_arg( ap, BerVarray )) == NULL )
  ------------------
  |  Branch (610:9): [True: 0, False: 0]
  ------------------
  611|      0|				break;
  612|      0|			for ( i = 0; bv[i].bv_val != NULL; i++ ) {
  ------------------
  |  Branch (612:17): [True: 0, False: 0]
  ------------------
  613|      0|				if ( (rc = ber_put_berval( ber, &bv[i],
  ------------------
  |  Branch (613:10): [True: 0, False: 0]
  ------------------
  614|      0|				    ber->ber_tag )) == -1 )
  615|      0|					break;
  616|      0|			}
  617|      0|			break;
  618|       |
  619|  14.0k|		case '{':	/* begin sequence */
  ------------------
  |  Branch (619:3): [True: 14.0k, False: 68.6k]
  ------------------
  620|  14.0k|			rc = ber_start_seq( ber, ber->ber_tag );
  621|  14.0k|			break;
  622|       |
  623|  12.9k|		case '}':	/* end sequence */
  ------------------
  |  Branch (623:3): [True: 12.9k, False: 69.7k]
  ------------------
  624|  12.9k|			rc = ber_put_seqorset( ber );
  625|  12.9k|			break;
  626|       |
  627|      0|		case '[':	/* begin set */
  ------------------
  |  Branch (627:3): [True: 0, False: 82.6k]
  ------------------
  628|      0|			rc = ber_start_set( ber, ber->ber_tag );
  629|      0|			break;
  630|       |
  631|     19|		case ']':	/* end set */
  ------------------
  |  Branch (631:3): [True: 19, False: 82.6k]
  ------------------
  632|     19|			rc = ber_put_seqorset( ber );
  633|     19|			break;
  634|       |
  635|      0|		default:
  ------------------
  |  Branch (635:3): [True: 0, False: 82.6k]
  ------------------
  636|      0|			if( ber->ber_debug ) {
  ------------------
  |  |   81|      0|#define ber_debug		ber_opts.lbo_debug
  ------------------
  |  Branch (636:8): [True: 0, False: 0]
  ------------------
  637|      0|				ber_log_printf( LDAP_DEBUG_ANY, ber->ber_debug,
  ------------------
  |  |  173|      0|#define ber_log_printf ber_pvt_log_printf
  ------------------
              				ber_log_printf( LDAP_DEBUG_ANY, ber->ber_debug,
  ------------------
  |  |  126|      0|#define LDAP_DEBUG_ANY		(-1)
  ------------------
              				ber_log_printf( LDAP_DEBUG_ANY, ber->ber_debug,
  ------------------
  |  |   81|      0|#define ber_debug		ber_opts.lbo_debug
  ------------------
  638|      0|					"ber_printf: unknown fmt %c\n", *fmt );
  639|      0|			}
  640|      0|			rc = -1;
  641|      0|			break;
  642|  82.6k|		}
  643|       |
  644|  70.2k|		ber->ber_tag = LBER_DEFAULT;
  ------------------
  |  |   80|  70.2k|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  645|  82.6k|	next:;
  646|  82.6k|	}
  647|       |
  648|  17.7k|	va_end( ap );
  649|       |
  650|  17.7k|	return rc;
  651|  17.7k|}
encode.c:ber_put_int_or_enum:
  174|  17.4k|{
  175|  17.4k|	ber_uint_t unum;
  176|  17.4k|	unsigned char sign, data[TAGBUF_SIZE+1 + OCTET_SIZE(ber_int_t)], *ptr;
  177|       |
  178|  17.4k|	sign = 0;
  179|  17.4k|	unum = num;	/* Bit fiddling should be done with unsigned values */
  180|  17.4k|	if ( num < 0 ) {
  ------------------
  |  Branch (180:7): [True: 0, False: 17.4k]
  ------------------
  181|      0|		sign = 0xffU;
  182|      0|		unum = ~unum;
  183|      0|	}
  184|  17.4k|	for ( ptr = &data[sizeof(data) - 1] ;; unum >>= 8 ) {
  185|  17.4k|		*ptr-- = (sign ^ (unsigned char) unum) & 0xffU;
  186|  17.4k|		if ( unum < 0x80 )	/* top bit at *ptr is sign bit */
  ------------------
  |  Branch (186:8): [True: 17.4k, False: 0]
  ------------------
  187|  17.4k|			break;
  188|  17.4k|	}
  189|       |
  190|  17.4k|	*ptr = (unsigned char) (&data[sizeof(data) - 1] - ptr); /* length */
  191|  17.4k|	ptr = ber_prepend_tag( ptr, tag );
  192|       |
  193|  17.4k|	return ber_write( ber, (char *) ptr, &data[sizeof(data)] - ptr, 0 );
  194|  17.4k|}
encode.c:ber_prepend_len:
   88|  23.4k|{
   89|       |	/*
   90|       |	 * short len if it's less than 128 - one byte giving the len,
   91|       |	 * with bit 8 0.
   92|       |	 * long len otherwise - one byte with bit 8 set, giving the
   93|       |	 * length of the length, followed by the length itself.
   94|       |	 */
   95|       |
   96|  23.4k|	*--ptr = (unsigned char) len & 0xffU;
   97|       |
   98|  23.4k|	if ( len >= 0x80 ) {
  ------------------
  |  Branch (98:7): [True: 242, False: 23.1k]
  ------------------
   99|    242|		unsigned char *endptr = ptr--;
  100|       |
  101|    381|		while ( (len >>= 8) != 0 ) {
  ------------------
  |  Branch (101:11): [True: 139, False: 242]
  ------------------
  102|    139|			*ptr-- = (unsigned char) len & 0xffU;
  103|    139|		}
  104|    242|		*ptr = (unsigned char) (endptr - ptr) + 0x80U;
  105|    242|	}
  106|       |
  107|  23.4k|	return ptr;
  108|  23.4k|}
encode.c:ber_prepend_tag:
   77|  45.4k|{
   78|  45.4k|	do {
   79|  45.4k|		*--ptr = (unsigned char) tag & 0xffU;
   80|  45.4k|	} while ( (tag >>= 8) != 0 );
  ------------------
  |  Branch (80:12): [True: 0, False: 45.4k]
  ------------------
   81|       |
   82|  45.4k|	return ptr;
   83|  45.4k|}
encode.c:ber_start_seqorset:
  363|  14.0k|{
  364|       |	/*
  365|       |	 * Write the tag and SOS_LENLEN octets reserved for length, to ber.
  366|       |	 * For now, length octets = (tag length, previous ber_sos_inner).
  367|       |	 *
  368|       |	 * Update ber_sos_inner and the write-cursor ber_sos_ptr.  ber_ptr
  369|       |	 * will not move until the outermost sequence or set is complete.
  370|       |	 */
  371|       |
  372|  14.0k|	Seqorset_header	header;
  373|  14.0k|	unsigned char	*headptr;
  374|  14.0k|	ber_len_t		taglen, headlen;
  375|  14.0k|	char			*dest, **p;
  376|       |
  377|  14.0k|	assert( ber != NULL );
  ------------------
  |  Branch (377:2): [True: 0, False: 14.0k]
  |  Branch (377:2): [True: 14.0k, False: 0]
  ------------------
  378|  14.0k|	assert( LBER_VALID( ber ) );
  ------------------
  |  Branch (378:2): [True: 0, False: 14.0k]
  |  Branch (378:2): [True: 14.0k, False: 0]
  ------------------
  379|       |
  380|  14.0k|	if ( ber->ber_sos_ptr == NULL ) {	/* outermost sequence/set? */
  ------------------
  |  Branch (380:7): [True: 7.40k, False: 6.61k]
  ------------------
  381|  7.40k|		header.next_sos.offset = 0;
  382|  7.40k|		p = &ber->ber_ptr;
  383|  7.40k|	} else {
  384|  6.61k|		if ( (ber_len_t) -1 > (ber_elem_size_t) -1 ) {
  ------------------
  |  Branch (384:8): [True: 6.61k, Folded]
  ------------------
  385|  6.61k|			if ( ber->ber_sos_inner > (ber_elem_size_t) -1 )
  ------------------
  |  |  119|  6.61k|#	define		ber_sos_inner	ber_len /* reused for binary compat */
  ------------------
  |  Branch (385:9): [True: 0, False: 6.61k]
  ------------------
  386|      0|				return -1;
  387|  6.61k|		}
  388|  6.61k|		header.next_sos.offset = ber->ber_sos_inner;
  ------------------
  |  |  119|  6.61k|#	define		ber_sos_inner	ber_len /* reused for binary compat */
  ------------------
  389|  6.61k|		p = &ber->ber_sos_ptr;
  390|  6.61k|	}
  391|  14.0k|	headptr = ber_prepend_tag( SOS_TAG_END(header), tag );
  ------------------
  |  |  355|  14.0k|#	define SOS_TAG_END(header) ((unsigned char *) &(header).next_sos - 1)
  ------------------
  392|  14.0k|	*SOS_TAG_END(header) = taglen = SOS_TAG_END(header) - headptr;
  ------------------
  |  |  355|  14.0k|#	define SOS_TAG_END(header) ((unsigned char *) &(header).next_sos - 1)
  ------------------
              	*SOS_TAG_END(header) = taglen = SOS_TAG_END(header) - headptr;
  ------------------
  |  |  355|  14.0k|#	define SOS_TAG_END(header) ((unsigned char *) &(header).next_sos - 1)
  ------------------
  393|  14.0k|	headlen = taglen + SOS_LENLEN;
  ------------------
  |  |  345|  14.0k|#define SOS_LENLEN (1 + (sizeof(ber_elem_size_t) > MAXINT_BERSIZE_OCTETS ? \
  |  |  ------------------
  |  |  |  |   70|  14.0k|#define MAXINT_BERSIZE_OCTETS 4
  |  |  ------------------
  |  |  |  Branch (345:26): [Folded, False: 14.0k]
  |  |  ------------------
  |  |  346|  14.0k|		(ber_len_t) sizeof(ber_elem_size_t) : MAXINT_BERSIZE_OCTETS))
  |  |  ------------------
  |  |  |  |   70|  14.0k|#define MAXINT_BERSIZE_OCTETS 4
  |  |  ------------------
  ------------------
  394|       |
  395|       |	/* As ber_write(,headptr,headlen,) except update ber_sos_ptr, not *p */
  396|  14.0k|	if ( headlen > (ber_len_t) (ber->ber_end - *p) ) {
  ------------------
  |  Branch (396:7): [True: 7.39k, False: 6.62k]
  ------------------
  397|  7.39k|		if ( ber_realloc( ber, headlen ) != 0 )
  ------------------
  |  Branch (397:8): [True: 0, False: 7.39k]
  ------------------
  398|      0|			return -1;
  399|  7.39k|	}
  400|  14.0k|	dest = *p;
  401|  14.0k|	AC_MEMCPY( dest, headptr, headlen );
  ------------------
  |  |   86|  14.0k|#define AC_MEMCPY( d, s, n ) (SAFEMEMCPY((d),(s),(n)))
  |  |  ------------------
  |  |  |  |   77|  14.0k|#		define SAFEMEMCPY( d, s, n ) 	memmove((d), (s), (n))
  |  |  ------------------
  ------------------
  402|  14.0k|	ber->ber_sos_ptr = dest + headlen;
  403|       |
  404|  14.0k|	ber->ber_sos_inner = dest + taglen - ber->ber_buf;
  ------------------
  |  |  119|  14.0k|#	define		ber_sos_inner	ber_len /* reused for binary compat */
  ------------------
  405|       |
  406|       |	/*
  407|       |	 * Do not return taglen + SOS_LENLEN here - then ber_put_seqorset()
  408|       |	 * should return lenlen - SOS_LENLEN + len, which can be < 0.
  409|       |	 */
  410|  14.0k|	return 0;
  411|  14.0k|}
encode.c:ber_put_seqorset:
  436|  12.9k|{
  437|  12.9k|	Seqorset_header	header;
  438|  12.9k|	unsigned char	*lenptr;	/* length octets in the sequence/set */
  439|  12.9k|	ber_len_t		len;		/* length(contents) */
  440|  12.9k|	ber_len_t		xlen;		/* len + length(length) */
  441|       |
  442|  12.9k|	assert( ber != NULL );
  ------------------
  |  Branch (442:2): [True: 0, False: 12.9k]
  |  Branch (442:2): [True: 12.9k, False: 0]
  ------------------
  443|  12.9k|	assert( LBER_VALID( ber ) );
  ------------------
  |  Branch (443:2): [True: 0, False: 12.9k]
  |  Branch (443:2): [True: 12.9k, False: 0]
  ------------------
  444|       |
  445|  12.9k|	if ( ber->ber_sos_ptr == NULL ) return -1;
  ------------------
  |  Branch (445:7): [True: 2, False: 12.9k]
  ------------------
  446|       |
  447|  12.9k|	lenptr = (unsigned char *) ber->ber_buf + ber->ber_sos_inner;
  ------------------
  |  |  119|  12.9k|#	define		ber_sos_inner	ber_len /* reused for binary compat */
  ------------------
  448|  12.9k|	xlen = ber->ber_sos_ptr - (char *) lenptr;
  449|  12.9k|	if ( xlen > MAXINT_BERSIZE + SOS_LENLEN ) {
  ------------------
  |  |   69|  12.9k|	(INT_MAX>0xffffffffUL ? (ber_len_t) 0xffffffffUL : INT_MAX-HEADER_SIZE)
  |  |  ------------------
  |  |  |  |   49|  25.9k|#define HEADER_SIZE (TAGBUF_SIZE + LENBUF_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  12.9k|#define TAGBUF_SIZE OCTET_SIZE(ber_tag_t)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  12.9k|#define OCTET_SIZE(type) ((ber_len_t) (sizeof(type)*CHAR_BIT + 7) / 8)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define HEADER_SIZE (TAGBUF_SIZE + LENBUF_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   48|  12.9k|#define LENBUF_SIZE (1 + OCTET_SIZE(ber_len_t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  12.9k|#define OCTET_SIZE(type) ((ber_len_t) (sizeof(type)*CHAR_BIT + 7) / 8)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (69:3): [Folded, False: 12.9k]
  |  |  ------------------
  ------------------
              	if ( xlen > MAXINT_BERSIZE + SOS_LENLEN ) {
  ------------------
  |  |  345|  12.9k|#define SOS_LENLEN (1 + (sizeof(ber_elem_size_t) > MAXINT_BERSIZE_OCTETS ? \
  |  |  ------------------
  |  |  |  |   70|  12.9k|#define MAXINT_BERSIZE_OCTETS 4
  |  |  ------------------
  |  |  |  Branch (345:26): [Folded, False: 12.9k]
  |  |  ------------------
  |  |  346|  12.9k|		(ber_len_t) sizeof(ber_elem_size_t) : MAXINT_BERSIZE_OCTETS))
  |  |  ------------------
  |  |  |  |   70|  12.9k|#define MAXINT_BERSIZE_OCTETS 4
  |  |  ------------------
  ------------------
  |  Branch (449:7): [True: 0, False: 12.9k]
  ------------------
  450|      0|		return -1;
  451|      0|	}
  452|       |
  453|       |	/* Extract sequence/set information from length octets */
  454|  12.9k|	memcpy( SOS_TAG_END(header), lenptr, SOS_LENLEN );
  ------------------
  |  |  355|  12.9k|#	define SOS_TAG_END(header) ((unsigned char *) &(header).next_sos - 1)
  ------------------
              	memcpy( SOS_TAG_END(header), lenptr, SOS_LENLEN );
  ------------------
  |  |  345|  12.9k|#define SOS_LENLEN (1 + (sizeof(ber_elem_size_t) > MAXINT_BERSIZE_OCTETS ? \
  |  |  ------------------
  |  |  |  |   70|  12.9k|#define MAXINT_BERSIZE_OCTETS 4
  |  |  ------------------
  |  |  |  Branch (345:26): [Folded, False: 12.9k]
  |  |  ------------------
  |  |  346|  12.9k|		(ber_len_t) sizeof(ber_elem_size_t) : MAXINT_BERSIZE_OCTETS))
  |  |  ------------------
  |  |  |  |   70|  12.9k|#define MAXINT_BERSIZE_OCTETS 4
  |  |  ------------------
  ------------------
  455|       |
  456|       |	/* Store length, and close gap of leftover reserved length octets */
  457|  12.9k|	len = xlen - SOS_LENLEN;
  ------------------
  |  |  345|  12.9k|#define SOS_LENLEN (1 + (sizeof(ber_elem_size_t) > MAXINT_BERSIZE_OCTETS ? \
  |  |  ------------------
  |  |  |  |   70|  12.9k|#define MAXINT_BERSIZE_OCTETS 4
  |  |  ------------------
  |  |  |  Branch (345:26): [Folded, False: 12.9k]
  |  |  ------------------
  |  |  346|  12.9k|		(ber_len_t) sizeof(ber_elem_size_t) : MAXINT_BERSIZE_OCTETS))
  |  |  ------------------
  |  |  |  |   70|  12.9k|#define MAXINT_BERSIZE_OCTETS 4
  |  |  ------------------
  ------------------
  458|  12.9k|	if ( !(ber->ber_options & LBER_USE_DER) ) {
  ------------------
  |  |   80|  12.9k|#define ber_options		ber_opts.lbo_options
  ------------------
              	if ( !(ber->ber_options & LBER_USE_DER) ) {
  ------------------
  |  |   93|  12.9k|#define LBER_USE_DER		0x01
  ------------------
  |  Branch (458:7): [True: 0, False: 12.9k]
  ------------------
  459|      0|		int i;
  460|      0|		lenptr[0] = SOS_LENLEN - 1 + 0x80; /* length(length)-1 */
  ------------------
  |  |  345|      0|#define SOS_LENLEN (1 + (sizeof(ber_elem_size_t) > MAXINT_BERSIZE_OCTETS ? \
  |  |  ------------------
  |  |  |  |   70|      0|#define MAXINT_BERSIZE_OCTETS 4
  |  |  ------------------
  |  |  |  Branch (345:26): [Folded, False: 0]
  |  |  ------------------
  |  |  346|      0|		(ber_len_t) sizeof(ber_elem_size_t) : MAXINT_BERSIZE_OCTETS))
  |  |  ------------------
  |  |  |  |   70|      0|#define MAXINT_BERSIZE_OCTETS 4
  |  |  ------------------
  ------------------
  461|      0|		for( i = SOS_LENLEN; --i > 0; len >>= 8 ) {
  ------------------
  |  |  345|      0|#define SOS_LENLEN (1 + (sizeof(ber_elem_size_t) > MAXINT_BERSIZE_OCTETS ? \
  |  |  ------------------
  |  |  |  |   70|      0|#define MAXINT_BERSIZE_OCTETS 4
  |  |  ------------------
  |  |  |  Branch (345:26): [Folded, False: 0]
  |  |  ------------------
  |  |  346|      0|		(ber_len_t) sizeof(ber_elem_size_t) : MAXINT_BERSIZE_OCTETS))
  |  |  ------------------
  |  |  |  |   70|      0|#define MAXINT_BERSIZE_OCTETS 4
  |  |  ------------------
  ------------------
  |  Branch (461:24): [True: 0, False: 0]
  ------------------
  462|      0|			lenptr[i] = len & 0xffU;
  463|      0|		}
  464|  12.9k|	} else {
  465|  12.9k|		unsigned char *p = ber_prepend_len( lenptr + SOS_LENLEN, len );
  ------------------
  |  |  345|  12.9k|#define SOS_LENLEN (1 + (sizeof(ber_elem_size_t) > MAXINT_BERSIZE_OCTETS ? \
  |  |  ------------------
  |  |  |  |   70|  12.9k|#define MAXINT_BERSIZE_OCTETS 4
  |  |  ------------------
  |  |  |  Branch (345:26): [Folded, False: 12.9k]
  |  |  ------------------
  |  |  346|  12.9k|		(ber_len_t) sizeof(ber_elem_size_t) : MAXINT_BERSIZE_OCTETS))
  |  |  ------------------
  |  |  |  |   70|  12.9k|#define MAXINT_BERSIZE_OCTETS 4
  |  |  ------------------
  ------------------
  466|  12.9k|		ber_len_t unused = p - lenptr;
  467|  12.9k|		if ( unused != 0 ) {
  ------------------
  |  Branch (467:8): [True: 12.9k, False: 0]
  ------------------
  468|       |			/* length(length) < the reserved SOS_LENLEN bytes */
  469|  12.9k|			xlen -= unused;
  470|  12.9k|			AC_MEMCPY( lenptr, p, xlen );
  ------------------
  |  |   86|  12.9k|#define AC_MEMCPY( d, s, n ) (SAFEMEMCPY((d),(s),(n)))
  |  |  ------------------
  |  |  |  |   77|  12.9k|#		define SAFEMEMCPY( d, s, n ) 	memmove((d), (s), (n))
  |  |  ------------------
  ------------------
  471|  12.9k|			ber->ber_sos_ptr = (char *) lenptr + xlen;
  472|  12.9k|		}
  473|  12.9k|	}
  474|       |
  475|  12.9k|	ber->ber_sos_inner = header.next_sos.offset;
  ------------------
  |  |  119|  12.9k|#	define		ber_sos_inner	ber_len /* reused for binary compat */
  ------------------
  476|  12.9k|	if ( header.next_sos.offset == 0 ) { /* outermost sequence/set? */
  ------------------
  |  Branch (476:7): [True: 7.03k, False: 5.92k]
  ------------------
  477|       |		/* The ber_ptr is at the set/seq start - move it to the end */
  478|  7.03k|		ber->ber_ptr = ber->ber_sos_ptr;
  479|  7.03k|		ber->ber_sos_ptr = NULL;
  480|  7.03k|	}
  481|       |
  482|  12.9k|	return xlen + *SOS_TAG_END(header); /* lenlen + len + taglen */
  ------------------
  |  |  355|  12.9k|#	define SOS_TAG_END(header) ((unsigned char *) &(header).next_sos - 1)
  ------------------
  483|  12.9k|}

ber_write:
  104|  41.9k|{
  105|  41.9k|	char **p;
  106|       |
  107|  41.9k|	assert( ber != NULL );
  ------------------
  |  Branch (107:2): [True: 0, False: 41.9k]
  |  Branch (107:2): [True: 41.9k, False: 0]
  ------------------
  108|  41.9k|	assert( buf != NULL );
  ------------------
  |  Branch (108:2): [True: 0, False: 41.9k]
  |  Branch (108:2): [True: 41.9k, False: 0]
  ------------------
  109|  41.9k|	assert( LBER_VALID( ber ) );
  ------------------
  |  Branch (109:2): [True: 0, False: 41.9k]
  |  Branch (109:2): [True: 41.9k, False: 0]
  ------------------
  110|       |
  111|  41.9k|	if ( zero != 0 ) {
  ------------------
  |  Branch (111:7): [True: 0, False: 41.9k]
  ------------------
  112|      0|		ber_log_printf( LDAP_DEBUG_ANY, ber->ber_debug, "%s",
  ------------------
  |  |  173|      0|#define ber_log_printf ber_pvt_log_printf
  ------------------
              		ber_log_printf( LDAP_DEBUG_ANY, ber->ber_debug, "%s",
  ------------------
  |  |  126|      0|#define LDAP_DEBUG_ANY		(-1)
  ------------------
              		ber_log_printf( LDAP_DEBUG_ANY, ber->ber_debug, "%s",
  ------------------
  |  |   81|      0|#define ber_debug		ber_opts.lbo_debug
  ------------------
  113|      0|			"ber_write: nonzero 4th argument not supported\n" );
  114|      0|		return( -1 );
  115|      0|	}
  116|       |
  117|  41.9k|	p = ber->ber_sos_ptr == NULL ? &ber->ber_ptr : &ber->ber_sos_ptr;
  ------------------
  |  Branch (117:6): [True: 0, False: 41.9k]
  ------------------
  118|  41.9k|	if ( len > (ber_len_t) (ber->ber_end - *p) ) {
  ------------------
  |  Branch (118:7): [True: 32, False: 41.8k]
  ------------------
  119|     32|		if ( ber_realloc( ber, len ) != 0 ) return( -1 );
  ------------------
  |  Branch (119:8): [True: 0, False: 32]
  ------------------
  120|     32|	}
  121|  41.9k|	AC_MEMCPY( *p, buf, len );
  ------------------
  |  |   86|  41.9k|#define AC_MEMCPY( d, s, n ) (SAFEMEMCPY((d),(s),(n)))
  |  |  ------------------
  |  |  |  |   77|  41.9k|#		define SAFEMEMCPY( d, s, n ) 	memmove((d), (s), (n))
  |  |  ------------------
  ------------------
  122|  41.9k|	*p += len;
  123|       |
  124|  41.9k|	return( (ber_slen_t) len );
  125|  41.9k|}
ber_realloc:
  130|  7.42k|{
  131|  7.42k|	ber_len_t	total, offset, sos_offset, rw_offset;
  132|  7.42k|	char		*buf;
  133|       |
  134|  7.42k|	assert( ber != NULL );
  ------------------
  |  Branch (134:2): [True: 0, False: 7.42k]
  |  Branch (134:2): [True: 7.42k, False: 0]
  ------------------
  135|  7.42k|	assert( LBER_VALID( ber ) );
  ------------------
  |  Branch (135:2): [True: 0, False: 7.42k]
  |  Branch (135:2): [True: 7.42k, False: 0]
  ------------------
  136|       |
  137|       |	/* leave room for ber_flatten() to \0-terminate ber_buf */
  138|  7.42k|	if ( ++len == 0 ) {
  ------------------
  |  Branch (138:7): [True: 0, False: 7.42k]
  ------------------
  139|      0|		return( -1 );
  140|      0|	}
  141|       |
  142|  7.42k|	total = ber_pvt_ber_total( ber );
  ------------------
  |  |  127|  7.42k|#define ber_pvt_ber_total(ber)		((ber)->ber_end - (ber)->ber_buf)
  ------------------
  143|       |
  144|  7.42k|#define LBER_EXBUFSIZ	4060 /* a few words less than 2^N for binary buddy */
  145|  7.42k|#if defined( LBER_EXBUFSIZ ) && LBER_EXBUFSIZ > 0
  146|  7.42k|# ifndef notdef
  147|       |	/* don't realloc by small amounts */
  148|  7.42k|	total += len < LBER_EXBUFSIZ ? LBER_EXBUFSIZ : len;
  ------------------
  |  |  144|  7.42k|#define LBER_EXBUFSIZ	4060 /* a few words less than 2^N for binary buddy */
  ------------------
              	total += len < LBER_EXBUFSIZ ? LBER_EXBUFSIZ : len;
  ------------------
  |  |  144|  7.39k|#define LBER_EXBUFSIZ	4060 /* a few words less than 2^N for binary buddy */
  ------------------
  |  Branch (148:11): [True: 7.39k, False: 31]
  ------------------
  149|       |# else
  150|       |	{	/* not sure what value this adds.  reduce fragmentation? */
  151|       |		ber_len_t have = (total + (LBER_EXBUFSIZE - 1)) / LBER_EXBUFSIZ;
  152|       |		ber_len_t need = (len + (LBER_EXBUFSIZ - 1)) / LBER_EXBUFSIZ;
  153|       |		total = ( have + need ) * LBER_EXBUFSIZ;
  154|       |	}
  155|       |# endif
  156|       |#else
  157|       |	total += len;	/* realloc just what's needed */
  158|       |#endif
  159|       |
  160|  7.42k|	if ( total < len || total > (ber_len_t)-1 / 2 /* max ber_slen_t */ ) {
  ------------------
  |  Branch (160:7): [True: 0, False: 7.42k]
  |  Branch (160:22): [True: 0, False: 7.42k]
  ------------------
  161|      0|		return( -1 );
  162|      0|	}
  163|       |
  164|  7.42k|	buf = ber->ber_buf;
  165|  7.42k|	offset = ber->ber_ptr - buf;
  166|  7.42k|	sos_offset = ber->ber_sos_ptr ? ber->ber_sos_ptr - buf : 0;
  ------------------
  |  Branch (166:15): [True: 32, False: 7.39k]
  ------------------
  167|       |	/* if ber_sos_ptr != NULL, it is > ber_buf so that sos_offset > 0 */
  168|  7.42k|	rw_offset = ber->ber_rwptr ? ber->ber_rwptr - buf : 0;
  ------------------
  |  Branch (168:14): [True: 0, False: 7.42k]
  ------------------
  169|       |
  170|  7.42k|	buf = (char *) ber_memrealloc_x( buf, total, ber->ber_memctx );
  171|  7.42k|	if ( buf == NULL ) {
  ------------------
  |  Branch (171:7): [True: 0, False: 7.42k]
  ------------------
  172|      0|		return( -1 );
  173|      0|	}
  174|       |
  175|  7.42k|	ber->ber_buf = buf;
  176|  7.42k|	ber->ber_end = buf + total;
  177|  7.42k|	ber->ber_ptr = buf + offset;
  178|  7.42k|	if ( sos_offset )
  ------------------
  |  Branch (178:7): [True: 32, False: 7.39k]
  ------------------
  179|     32|		ber->ber_sos_ptr = buf + sos_offset;
  180|  7.42k|	if ( ber->ber_rwptr )
  ------------------
  |  Branch (180:7): [True: 0, False: 7.42k]
  ------------------
  181|      0|		ber->ber_rwptr = buf + rw_offset;
  182|       |
  183|  7.42k|	return( 0 );
  184|  7.42k|}
ber_free_buf:
  188|  12.3k|{
  189|  12.3k|	assert( LBER_VALID( ber ) );
  ------------------
  |  Branch (189:2): [True: 0, False: 12.3k]
  |  Branch (189:2): [True: 12.3k, False: 0]
  ------------------
  190|       |
  191|  12.3k|	if ( ber->ber_buf) ber_memfree_x( ber->ber_buf, ber->ber_memctx );
  ------------------
  |  Branch (191:7): [True: 10.8k, False: 1.53k]
  ------------------
  192|       |
  193|  12.3k|	ber->ber_buf = NULL;
  194|  12.3k|	ber->ber_sos_ptr = NULL;
  195|  12.3k|	ber->ber_valid = LBER_UNINITIALIZED;
  ------------------
  |  |   79|  12.3k|#define ber_valid		ber_opts.lbo_valid
  ------------------
              	ber->ber_valid = LBER_UNINITIALIZED;
  ------------------
  |  |   68|  12.3k|#define LBER_UNINITIALIZED		0x0
  ------------------
  196|  12.3k|}
ber_free:
  200|  16.2k|{
  201|  16.2k|	if( ber == NULL ) {
  ------------------
  |  Branch (201:6): [True: 195, False: 16.0k]
  ------------------
  202|    195|		LDAP_MEMORY_DEBUG_ASSERT( ber != NULL );
  ------------------
  |  |   54|    195|# define LDAP_MEMORY_DEBUG_ASSERT(expr) ((void) 0)
  ------------------
  203|    195|		return;
  204|    195|	}
  205|       |
  206|  16.0k|	if( freebuf ) ber_free_buf( ber );
  ------------------
  |  Branch (206:6): [True: 12.3k, False: 3.68k]
  ------------------
  207|       |
  208|  16.0k|	ber_memfree_x( (char *) ber, ber->ber_memctx );
  209|  16.0k|}
ber_flush2:
  221|  7.02k|{
  222|  7.02k|	ber_len_t	towrite;
  223|  7.02k|	ber_slen_t	rc;
  224|       |
  225|  7.02k|	assert( sb != NULL );
  ------------------
  |  Branch (225:2): [True: 0, False: 7.02k]
  |  Branch (225:2): [True: 7.02k, False: 0]
  ------------------
  226|  7.02k|	assert( ber != NULL );
  ------------------
  |  Branch (226:2): [True: 0, False: 7.02k]
  |  Branch (226:2): [True: 7.02k, False: 0]
  ------------------
  227|  7.02k|	assert( SOCKBUF_VALID( sb ) );
  ------------------
  |  Branch (227:2): [True: 0, False: 7.02k]
  |  Branch (227:2): [True: 7.02k, False: 0]
  ------------------
  228|  7.02k|	assert( LBER_VALID( ber ) );
  ------------------
  |  Branch (228:2): [True: 0, False: 7.02k]
  |  Branch (228:2): [True: 7.02k, False: 0]
  ------------------
  229|       |
  230|  7.02k|	if ( ber->ber_rwptr == NULL ) {
  ------------------
  |  Branch (230:7): [True: 7.02k, False: 0]
  ------------------
  231|  7.02k|		ber->ber_rwptr = ber->ber_buf;
  232|  7.02k|	}
  233|  7.02k|	towrite = ber->ber_ptr - ber->ber_rwptr;
  234|       |
  235|  7.02k|	if ( sb->sb_debug ) {
  ------------------
  |  |  135|  7.02k|#define	sb_debug		sb_opts.lbo_debug
  ------------------
  |  Branch (235:7): [True: 0, False: 7.02k]
  ------------------
  236|      0|		ber_log_printf( LDAP_DEBUG_TRACE, sb->sb_debug,
  ------------------
  |  |  173|      0|#define ber_log_printf ber_pvt_log_printf
  ------------------
              		ber_log_printf( LDAP_DEBUG_TRACE, sb->sb_debug,
  ------------------
  |  |  107|      0|#define LDAP_DEBUG_TRACE	0x0001
  ------------------
              		ber_log_printf( LDAP_DEBUG_TRACE, sb->sb_debug,
  ------------------
  |  |  135|      0|#define	sb_debug		sb_opts.lbo_debug
  ------------------
  237|      0|			"ber_flush2: %ld bytes to sd %ld%s\n",
  238|      0|			towrite, (long) sb->sb_fd,
  239|      0|			ber->ber_rwptr != ber->ber_buf ?  " (re-flush)" : "" );
  ------------------
  |  Branch (239:4): [True: 0, False: 0]
  ------------------
  240|      0|		ber_log_bprint( LDAP_DEBUG_BER, sb->sb_debug,
  ------------------
  |  |  111|      0|#define LDAP_DEBUG_BER		0x0010
  ------------------
              		ber_log_bprint( LDAP_DEBUG_BER, sb->sb_debug,
  ------------------
  |  |  135|      0|#define	sb_debug		sb_opts.lbo_debug
  ------------------
  241|      0|			ber->ber_rwptr, towrite );
  242|      0|	}
  243|       |
  244|  14.0k|	while ( towrite > 0 ) {
  ------------------
  |  Branch (244:10): [True: 7.02k, False: 7.02k]
  ------------------
  245|       |#ifdef LBER_TRICKLE
  246|       |		sleep(1);
  247|       |		rc = ber_int_sb_write( sb, ber->ber_rwptr, 1 );
  248|       |#else
  249|  7.02k|		rc = ber_int_sb_write( sb, ber->ber_rwptr, towrite );
  250|  7.02k|#endif
  251|  7.02k|		if ( rc <= 0 ) {
  ------------------
  |  Branch (251:8): [True: 0, False: 7.02k]
  ------------------
  252|      0|			if ( freeit & LBER_FLUSH_FREE_ON_ERROR ) ber_free( ber, 1 );
  ------------------
  |  |  478|      0|#define LBER_FLUSH_FREE_ON_ERROR	(0x2)
  ------------------
  |  Branch (252:9): [True: 0, False: 0]
  ------------------
  253|      0|			return -1;
  254|      0|		}
  255|  7.02k|		towrite -= rc;
  256|  7.02k|		ber->ber_rwptr += rc;
  257|  7.02k|	} 
  258|       |
  259|  7.02k|	if ( freeit & LBER_FLUSH_FREE_ON_SUCCESS ) ber_free( ber, 1 );
  ------------------
  |  |  477|  7.02k|#define LBER_FLUSH_FREE_ON_SUCCESS	(0x1)	/* traditional behavior */
  ------------------
  |  Branch (259:7): [True: 2.70k, False: 4.31k]
  ------------------
  260|       |
  261|  7.02k|	return 0;
  262|  7.02k|}
ber_alloc_t:
  266|  16.2k|{
  267|  16.2k|	BerElement	*ber;
  268|       |
  269|  16.2k|	ber = (BerElement *) LBER_CALLOC( 1, sizeof(BerElement) );
  ------------------
  |  |  199|  16.2k|#define LBER_CALLOC(n,s)	ber_memcalloc((n),(s))
  ------------------
  270|       |
  271|  16.2k|	if ( ber == NULL ) {
  ------------------
  |  Branch (271:7): [True: 0, False: 16.2k]
  ------------------
  272|      0|		return NULL;
  273|      0|	}
  274|       |
  275|  16.2k|	ber->ber_valid = LBER_VALID_BERELEMENT;
  ------------------
  |  |   79|  16.2k|#define ber_valid		ber_opts.lbo_valid
  ------------------
              	ber->ber_valid = LBER_VALID_BERELEMENT;
  ------------------
  |  |   70|  16.2k|#define LBER_VALID_BERELEMENT	0x2
  ------------------
  276|  16.2k|	ber->ber_tag = LBER_DEFAULT;
  ------------------
  |  |   80|  16.2k|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  277|  16.2k|	ber->ber_options = options;
  ------------------
  |  |   80|  16.2k|#define ber_options		ber_opts.lbo_options
  ------------------
  278|  16.2k|	ber->ber_debug = ber_int_debug;
  ------------------
  |  |   81|  16.2k|#define ber_debug		ber_opts.lbo_debug
  ------------------
              	ber->ber_debug = ber_int_debug;
  ------------------
  |  |   74|  16.2k|#define ber_int_debug ber_int_options.lbo_debug
  ------------------
  279|       |
  280|  16.2k|	assert( LBER_VALID( ber ) );
  ------------------
  |  Branch (280:2): [True: 0, False: 16.2k]
  |  Branch (280:2): [True: 16.2k, False: 0]
  ------------------
  281|  16.2k|	return ber;
  282|  16.2k|}
ber_dup:
  298|  3.23k|{
  299|  3.23k|	BerElement	*new;
  300|       |
  301|  3.23k|	assert( ber != NULL );
  ------------------
  |  Branch (301:2): [True: 0, False: 3.23k]
  |  Branch (301:2): [True: 3.23k, False: 0]
  ------------------
  302|  3.23k|	assert( LBER_VALID( ber ) );
  ------------------
  |  Branch (302:2): [True: 0, False: 3.23k]
  |  Branch (302:2): [True: 3.23k, False: 0]
  ------------------
  303|       |
  304|  3.23k|	if ( (new = ber_alloc_t( ber->ber_options )) == NULL ) {
  ------------------
  |  |   80|  3.23k|#define ber_options		ber_opts.lbo_options
  ------------------
  |  Branch (304:7): [True: 0, False: 3.23k]
  ------------------
  305|      0|		return NULL;
  306|      0|	}
  307|       |
  308|  3.23k|	*new = *ber;
  309|       |
  310|  3.23k|	assert( LBER_VALID( new ) );
  ------------------
  |  Branch (310:2): [True: 0, False: 3.23k]
  |  Branch (310:2): [True: 3.23k, False: 0]
  ------------------
  311|  3.23k|	return( new );
  312|  3.23k|}
ber_reset:
  455|  4.31k|{
  456|  4.31k|	assert( ber != NULL );
  ------------------
  |  Branch (456:2): [True: 0, False: 4.31k]
  |  Branch (456:2): [True: 4.31k, False: 0]
  ------------------
  457|  4.31k|	assert( LBER_VALID( ber ) );
  ------------------
  |  Branch (457:2): [True: 0, False: 4.31k]
  |  Branch (457:2): [True: 4.31k, False: 0]
  ------------------
  458|       |
  459|  4.31k|	if ( was_writing ) {
  ------------------
  |  Branch (459:7): [True: 4.31k, False: 0]
  ------------------
  460|  4.31k|		ber->ber_end = ber->ber_ptr;
  461|  4.31k|		ber->ber_ptr = ber->ber_buf;
  462|       |
  463|  4.31k|	} else {
  464|      0|		ber->ber_ptr = ber->ber_end;
  465|      0|	}
  466|       |
  467|       |	ber->ber_rwptr = NULL;
  468|  4.31k|}
ber_get_next:
  483|  5.46k|{
  484|  5.46k|	assert( sb != NULL );
  ------------------
  |  Branch (484:2): [True: 0, False: 5.46k]
  |  Branch (484:2): [True: 5.46k, False: 0]
  ------------------
  485|  5.46k|	assert( len != NULL );
  ------------------
  |  Branch (485:2): [True: 0, False: 5.46k]
  |  Branch (485:2): [True: 5.46k, False: 0]
  ------------------
  486|  5.46k|	assert( ber != NULL );
  ------------------
  |  Branch (486:2): [True: 0, False: 5.46k]
  |  Branch (486:2): [True: 5.46k, False: 0]
  ------------------
  487|  5.46k|	assert( SOCKBUF_VALID( sb ) );
  ------------------
  |  Branch (487:2): [True: 0, False: 5.46k]
  |  Branch (487:2): [True: 5.46k, False: 0]
  ------------------
  488|  5.46k|	assert( LBER_VALID( ber ) );
  ------------------
  |  Branch (488:2): [True: 0, False: 5.46k]
  |  Branch (488:2): [True: 5.46k, False: 0]
  ------------------
  489|       |
  490|  5.46k|	if ( ber->ber_debug & LDAP_DEBUG_TRACE ) {
  ------------------
  |  |   81|  5.46k|#define ber_debug		ber_opts.lbo_debug
  ------------------
              	if ( ber->ber_debug & LDAP_DEBUG_TRACE ) {
  ------------------
  |  |  107|  5.46k|#define LDAP_DEBUG_TRACE	0x0001
  ------------------
  |  Branch (490:7): [True: 0, False: 5.46k]
  ------------------
  491|      0|		ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug,
  ------------------
  |  |  173|      0|#define ber_log_printf ber_pvt_log_printf
  ------------------
              		ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug,
  ------------------
  |  |  107|      0|#define LDAP_DEBUG_TRACE	0x0001
  ------------------
              		ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug,
  ------------------
  |  |   81|      0|#define ber_debug		ber_opts.lbo_debug
  ------------------
  492|      0|			"ber_get_next\n" );
  493|      0|	}
  494|       |
  495|       |	/*
  496|       |	 * Any ber element looks like this: tag length contents.
  497|       |	 * Assuming everything's ok, we return the tag byte (we
  498|       |	 * can assume a single byte), return the length in len,
  499|       |	 * and the rest of the undecoded element in buf.
  500|       |	 *
  501|       |	 * Assumptions:
  502|       |	 *	1) small tags (less than 128)
  503|       |	 *	2) definite lengths
  504|       |	 *	3) primitive encodings used whenever possible
  505|       |	 *
  506|       |	 * The code also handles multi-byte tags. The first few bytes
  507|       |	 * of the message are read to check for multi-byte tags and
  508|       |	 * lengths. These bytes are temporarily stored in the ber_tag,
  509|       |	 * ber_len, and ber_usertag fields of the berelement until
  510|       |	 * tag/len parsing is complete. After this parsing, any leftover
  511|       |	 * bytes and the rest of the message are copied into the ber_buf.
  512|       |	 *
  513|       |	 * We expect tag and len to be at most 32 bits wide.
  514|       |	 */
  515|       |
  516|  5.46k|	if (ber->ber_rwptr == NULL) {
  ------------------
  |  Branch (516:6): [True: 5.18k, False: 281]
  ------------------
  517|  5.18k|		assert( ber->ber_buf == NULL );
  ------------------
  |  Branch (517:3): [True: 0, False: 5.18k]
  |  Branch (517:3): [True: 5.18k, False: 0]
  ------------------
  518|  5.18k|		ber->ber_rwptr = (char *) &ber->ber_len-1;
  519|  5.18k|		ber->ber_ptr = ber->ber_rwptr;
  520|  5.18k|		ber->ber_tag = 0;
  521|  5.18k|	}
  522|       |
  523|  9.05k|	while (ber->ber_rwptr > (char *)&ber->ber_tag && ber->ber_rwptr <
  ------------------
  |  Branch (523:9): [True: 7.05k, False: 2.00k]
  |  Branch (523:51): [True: 5.42k, False: 1.63k]
  ------------------
  524|  7.05k|		(char *)&ber->ber_len + LENSIZE*2) {
  ------------------
  |  |  476|  7.05k|#define LENSIZE	4
  ------------------
  525|  5.42k|		ber_slen_t sblen;
  526|  5.42k|		char buf[sizeof(ber->ber_len)-1];
  527|  5.42k|		ber_len_t tlen = 0;
  528|       |
  529|       |		/* The tag & len can be at most 9 bytes; we try to read up to 8 here */
  530|  5.42k|		sock_errset(0);
  ------------------
  |  |   86|  5.42k|#define sock_errset(e)	((void) (errno = (e)))
  ------------------
  531|  5.42k|		sblen=((char *)&ber->ber_len + LENSIZE*2 - 1)-ber->ber_rwptr;
  ------------------
  |  |  476|  5.42k|#define LENSIZE	4
  ------------------
  532|       |		/* Trying to read the last len byte of a 9 byte tag+len */
  533|  5.42k|		if (sblen<1)
  ------------------
  |  Branch (533:7): [True: 35, False: 5.38k]
  ------------------
  534|     35|			sblen = 1;
  535|  5.42k|		sblen=ber_int_sb_read( sb, ber->ber_rwptr, sblen );
  536|  5.42k|		if (sblen<=0) return LBER_DEFAULT;
  ------------------
  |  |   80|    827|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  |  Branch (536:7): [True: 827, False: 4.59k]
  ------------------
  537|  4.59k|		ber->ber_rwptr += sblen;
  538|       |
  539|       |		/* We got at least one byte, try to parse the tag. */
  540|  4.59k|		if (ber->ber_ptr == (char *)&ber->ber_len-1) {
  ------------------
  |  Branch (540:7): [True: 4.58k, False: 9]
  ------------------
  541|  4.58k|			ber_tag_t tag;
  542|  4.58k|			unsigned char *p = (unsigned char *)ber->ber_ptr;
  543|  4.58k|			tag = *p++;
  544|  4.58k|			if ((tag & LBER_BIG_TAG_MASK) == LBER_BIG_TAG_MASK) {
  ------------------
  |  |   71|  4.58k|#define LBER_BIG_TAG_MASK		((ber_tag_t) 0x1fU)
  ------------------
              			if ((tag & LBER_BIG_TAG_MASK) == LBER_BIG_TAG_MASK) {
  ------------------
  |  |   71|  4.58k|#define LBER_BIG_TAG_MASK		((ber_tag_t) 0x1fU)
  ------------------
  |  Branch (544:8): [True: 317, False: 4.26k]
  ------------------
  545|    317|				ber_len_t i;
  546|  1.02k|				for (i=1; (char *)p<ber->ber_rwptr; i++) {
  ------------------
  |  Branch (546:15): [True: 934, False: 89]
  ------------------
  547|    934|					tag <<= 8;
  548|    934|					tag |= *p++;
  549|    934|					if (!(tag & LBER_MORE_TAG_MASK))
  ------------------
  |  |   72|    934|#define LBER_MORE_TAG_MASK		((ber_tag_t) 0x80U)
  ------------------
  |  Branch (549:10): [True: 227, False: 707]
  ------------------
  550|    227|						break;
  551|       |					/* Is the tag too big? */
  552|    707|					if (i == sizeof(ber_tag_t)-1) {
  ------------------
  |  Branch (552:10): [True: 1, False: 706]
  ------------------
  553|      1|						sock_errset(ERANGE);
  ------------------
  |  |   86|      1|#define sock_errset(e)	((void) (errno = (e)))
  ------------------
  554|      1|						return LBER_DEFAULT;
  ------------------
  |  |   80|      1|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  555|      1|					}
  556|    707|				}
  557|       |				/* Did we run out of bytes? */
  558|    316|				if ((char *)p == ber->ber_rwptr) {
  ------------------
  |  Branch (558:9): [True: 126, False: 190]
  ------------------
  559|    126|					sock_errset(EWOULDBLOCK);
  ------------------
  |  |   86|    126|#define sock_errset(e)	((void) (errno = (e)))
  ------------------
  560|    126|					return LBER_DEFAULT;
  ------------------
  |  |   80|    126|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  561|    126|				}
  562|    316|			}
  563|  4.45k|			ber->ber_tag = tag;
  564|  4.45k|			ber->ber_ptr = (char *)p;
  565|  4.45k|		}
  566|       |
  567|  4.46k|		if ( ber->ber_ptr == ber->ber_rwptr ) {
  ------------------
  |  Branch (567:8): [True: 475, False: 3.99k]
  ------------------
  568|    475|			sock_errset(EWOULDBLOCK);
  ------------------
  |  |   86|    475|#define sock_errset(e)	((void) (errno = (e)))
  ------------------
  569|    475|			return LBER_DEFAULT;
  ------------------
  |  |   80|    475|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  570|    475|		}
  571|       |
  572|       |		/* Now look for the length */
  573|  3.99k|		if (*ber->ber_ptr & 0x80) {	/* multi-byte */
  ------------------
  |  Branch (573:7): [True: 227, False: 3.76k]
  ------------------
  574|    227|			int i;
  575|    227|			unsigned char *p = (unsigned char *)ber->ber_ptr;
  576|    227|			int llen = *p++ & 0x7f;
  577|    227|			if (llen > LENSIZE) {
  ------------------
  |  |  476|    227|#define LENSIZE	4
  ------------------
  |  Branch (577:8): [True: 100, False: 127]
  ------------------
  578|    100|				sock_errset(ERANGE);
  ------------------
  |  |   86|    100|#define sock_errset(e)	((void) (errno = (e)))
  ------------------
  579|    100|				return LBER_DEFAULT;
  ------------------
  |  |   80|    100|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  580|    100|			}
  581|       |			/* Not enough bytes? */
  582|    127|			if (ber->ber_rwptr - (char *)p < llen) {
  ------------------
  |  Branch (582:8): [True: 13, False: 114]
  ------------------
  583|     13|				sock_errset(EWOULDBLOCK);
  ------------------
  |  |   86|     13|#define sock_errset(e)	((void) (errno = (e)))
  ------------------
  584|     13|				return LBER_DEFAULT;
  ------------------
  |  |   80|     13|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  585|     13|			}
  586|    316|			for (i=0; i<llen; i++) {
  ------------------
  |  Branch (586:14): [True: 202, False: 114]
  ------------------
  587|    202|				tlen <<=8;
  588|    202|				tlen |= *p++;
  589|    202|			}
  590|    114|			ber->ber_ptr = (char *)p;
  591|  3.76k|		} else {
  592|  3.76k|			tlen = *(unsigned char *)ber->ber_ptr++;
  593|  3.76k|		}
  594|       |
  595|       |		/* Are there leftover data bytes inside ber->ber_len? */
  596|  3.88k|		if (ber->ber_ptr < (char *)&ber->ber_usertag) {
  ------------------
  |  Branch (596:7): [True: 3.84k, False: 33]
  ------------------
  597|  3.84k|			if (ber->ber_rwptr < (char *)&ber->ber_usertag) {
  ------------------
  |  Branch (597:8): [True: 3.84k, False: 0]
  ------------------
  598|  3.84k|				sblen = ber->ber_rwptr - ber->ber_ptr;
  599|  3.84k|			} else {
  600|      0|				sblen = (char *)&ber->ber_usertag - ber->ber_ptr;
  601|      0|			}
  602|  3.84k|			AC_MEMCPY(buf, ber->ber_ptr, sblen);
  ------------------
  |  |   86|  3.84k|#define AC_MEMCPY( d, s, n ) (SAFEMEMCPY((d),(s),(n)))
  |  |  ------------------
  |  |  |  |   77|  3.84k|#		define SAFEMEMCPY( d, s, n ) 	memmove((d), (s), (n))
  |  |  ------------------
  ------------------
  603|  3.84k|			ber->ber_ptr += sblen;
  604|  3.84k|		} else {
  605|     33|			sblen = 0;
  606|     33|		}
  607|  3.88k|		ber->ber_len = tlen;
  608|       |
  609|       |		/* now fill the buffer. */
  610|       |
  611|       |		/* make sure length is reasonable */
  612|  3.88k|		if ( ber->ber_len == 0 ) {
  ------------------
  |  Branch (612:8): [True: 176, False: 3.70k]
  ------------------
  613|    176|			sock_errset(ERANGE);
  ------------------
  |  |   86|    176|#define sock_errset(e)	((void) (errno = (e)))
  ------------------
  614|    176|			return LBER_DEFAULT;
  ------------------
  |  |   80|    176|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  615|    176|		}
  616|       |
  617|  3.70k|		if ( sb->sb_max_incoming && ber->ber_len > sb->sb_max_incoming ) {
  ------------------
  |  Branch (617:8): [True: 3.70k, False: 0]
  |  Branch (617:31): [True: 31, False: 3.67k]
  ------------------
  618|     31|			ber_log_printf( LDAP_DEBUG_CONNS, ber->ber_debug,
  ------------------
  |  |  173|     31|#define ber_log_printf ber_pvt_log_printf
  ------------------
              			ber_log_printf( LDAP_DEBUG_CONNS, ber->ber_debug,
  ------------------
  |  |  110|     31|#define LDAP_DEBUG_CONNS	0x0008
  ------------------
              			ber_log_printf( LDAP_DEBUG_CONNS, ber->ber_debug,
  ------------------
  |  |   81|     31|#define ber_debug		ber_opts.lbo_debug
  ------------------
  619|     31|				"ber_get_next: sockbuf_max_incoming exceeded "
  620|     31|				"(%ld > %ld)\n", ber->ber_len, sb->sb_max_incoming );
  621|     31|			sock_errset(ERANGE);
  ------------------
  |  |   86|     31|#define sock_errset(e)	((void) (errno = (e)))
  ------------------
  622|     31|			return LBER_DEFAULT;
  ------------------
  |  |   80|     31|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  623|     31|		}
  624|       |
  625|  3.67k|		if (ber->ber_buf==NULL) {
  ------------------
  |  Branch (625:7): [True: 3.67k, False: 0]
  ------------------
  626|  3.67k|			ber_len_t l = ber->ber_rwptr - ber->ber_ptr;
  627|       |			/* ber->ber_ptr is always <= ber->ber->ber_rwptr.
  628|       |			 * make sure ber->ber_len agrees with what we've
  629|       |			 * already read.
  630|       |			 */
  631|  3.67k|			if ( ber->ber_len < sblen + l ) {
  ------------------
  |  Branch (631:9): [True: 17, False: 3.65k]
  ------------------
  632|     17|				sock_errset(ERANGE);
  ------------------
  |  |   86|     17|#define sock_errset(e)	((void) (errno = (e)))
  ------------------
  633|     17|				return LBER_DEFAULT;
  ------------------
  |  |   80|     17|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  634|     17|			}
  635|  3.65k|			ber->ber_buf = (char *) ber_memalloc_x( ber->ber_len + 1, ber->ber_memctx );
  636|  3.65k|			if (ber->ber_buf==NULL) {
  ------------------
  |  Branch (636:8): [True: 0, False: 3.65k]
  ------------------
  637|      0|				return LBER_DEFAULT;
  ------------------
  |  |   80|      0|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  638|      0|			}
  639|  3.65k|			ber->ber_end = ber->ber_buf + ber->ber_len;
  640|  3.65k|			if (sblen) {
  ------------------
  |  Branch (640:8): [True: 3.55k, False: 105]
  ------------------
  641|  3.55k|				AC_MEMCPY(ber->ber_buf, buf, sblen);
  ------------------
  |  |   86|  3.55k|#define AC_MEMCPY( d, s, n ) (SAFEMEMCPY((d),(s),(n)))
  |  |  ------------------
  |  |  |  |   77|  3.55k|#		define SAFEMEMCPY( d, s, n ) 	memmove((d), (s), (n))
  |  |  ------------------
  ------------------
  642|  3.55k|			}
  643|  3.65k|			if (l > 0) {
  ------------------
  |  Branch (643:8): [True: 0, False: 3.65k]
  ------------------
  644|      0|				AC_MEMCPY(ber->ber_buf + sblen, ber->ber_ptr, l);
  ------------------
  |  |   86|      0|#define AC_MEMCPY( d, s, n ) (SAFEMEMCPY((d),(s),(n)))
  |  |  ------------------
  |  |  |  |   77|      0|#		define SAFEMEMCPY( d, s, n ) 	memmove((d), (s), (n))
  |  |  ------------------
  ------------------
  645|      0|				sblen += l;
  646|      0|			}
  647|  3.65k|			*ber->ber_end = '\0';
  648|  3.65k|			ber->ber_ptr = ber->ber_buf;
  649|  3.65k|			ber->ber_usertag = 0;
  650|  3.65k|			if ((ber_len_t)sblen == ber->ber_len) {
  ------------------
  |  Branch (650:8): [True: 65, False: 3.59k]
  ------------------
  651|     65|				goto done;
  652|     65|			}
  653|  3.59k|			ber->ber_rwptr = ber->ber_buf + sblen;
  654|  3.59k|		}
  655|  3.67k|	}
  656|       |
  657|  3.63k|	if ((ber->ber_rwptr>=ber->ber_buf) && (ber->ber_rwptr<ber->ber_end)) {
  ------------------
  |  Branch (657:6): [True: 3.63k, False: 0]
  |  Branch (657:40): [True: 3.63k, False: 1]
  ------------------
  658|  3.63k|		ber_slen_t res;
  659|  3.63k|		ber_slen_t to_go;
  660|       |		
  661|  3.63k|		to_go = ber->ber_end - ber->ber_rwptr;
  662|       |		/* unsigned/signed overflow */
  663|  3.63k|		if (to_go<0) return LBER_DEFAULT;
  ------------------
  |  |   80|      0|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  |  Branch (663:7): [True: 0, False: 3.63k]
  ------------------
  664|       |		
  665|  3.63k|		sock_errset(0);
  ------------------
  |  |   86|  3.63k|#define sock_errset(e)	((void) (errno = (e)))
  ------------------
  666|  3.63k|		res = ber_int_sb_read( sb, ber->ber_rwptr, to_go );
  667|  3.63k|		if (res<=0) return LBER_DEFAULT;
  ------------------
  |  |   80|    221|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  |  Branch (667:7): [True: 221, False: 3.41k]
  ------------------
  668|  3.41k|		ber->ber_rwptr+=res;
  669|       |		
  670|  3.41k|		if (res<to_go) {
  ------------------
  |  Branch (670:7): [True: 108, False: 3.30k]
  ------------------
  671|    108|			sock_errset(EWOULDBLOCK);
  ------------------
  |  |   86|    108|#define sock_errset(e)	((void) (errno = (e)))
  ------------------
  672|    108|			return LBER_DEFAULT;
  ------------------
  |  |   80|    108|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  673|    108|		}
  674|  3.37k|done:
  675|  3.37k|		ber->ber_rwptr = NULL;
  676|  3.37k|		*len = ber->ber_len;
  677|  3.37k|		if ( ber->ber_debug ) {
  ------------------
  |  |   81|  3.37k|#define ber_debug		ber_opts.lbo_debug
  ------------------
  |  Branch (677:8): [True: 0, False: 3.37k]
  ------------------
  678|      0|			ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug,
  ------------------
  |  |  173|      0|#define ber_log_printf ber_pvt_log_printf
  ------------------
              			ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug,
  ------------------
  |  |  107|      0|#define LDAP_DEBUG_TRACE	0x0001
  ------------------
              			ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug,
  ------------------
  |  |   81|      0|#define ber_debug		ber_opts.lbo_debug
  ------------------
  679|      0|				"ber_get_next: tag 0x%lx len %ld contents:\n",
  680|      0|				ber->ber_tag, ber->ber_len );
  681|      0|			ber_log_dump( LDAP_DEBUG_BER, ber->ber_debug, ber, 1 );
  ------------------
  |  |  111|      0|#define LDAP_DEBUG_BER		0x0010
  ------------------
              			ber_log_dump( LDAP_DEBUG_BER, ber->ber_debug, ber, 1 );
  ------------------
  |  |   81|      0|#define ber_debug		ber_opts.lbo_debug
  ------------------
  682|      0|		}
  683|  3.37k|		return (ber->ber_tag);
  684|  3.41k|	}
  685|       |
  686|       |	/* invalid input */
  687|      1|	return LBER_DEFAULT;
  ------------------
  |  |   80|      1|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  688|  3.63k|}

ber_memfree_x:
  127|   182k|{
  128|   182k|	if( p == NULL ) {
  ------------------
  |  Branch (128:6): [True: 304, False: 182k]
  ------------------
  129|    304|		return;
  130|    304|	}
  131|       |
  132|   182k|	BER_MEM_VALID( p );
  133|       |
  134|   182k|	if( ber_int_memory_fns == NULL || ctx == NULL ) {
  ------------------
  |  Branch (134:6): [True: 182k, False: 0]
  |  Branch (134:36): [True: 0, False: 0]
  ------------------
  135|       |#ifdef LDAP_MEMORY_DEBUG
  136|       |		struct ber_mem_hdr *mh = (struct ber_mem_hdr *)
  137|       |			((char *)p - sizeof(struct ber_mem_hdr));
  138|       |		assert( mh->bm_top == LBER_MEM_JUNK);
  139|       |		assert( testdatatop( mh));
  140|       |		assert( testend( (char *)&mh[1] + mh->bm_length) );
  141|       |		ber_int_meminuse -= mh->bm_length;
  142|       |
  143|       |#ifdef LDAP_MEMORY_TRACE
  144|       |		fprintf(stderr, "0x%08lx 0x%08lx -f- %ld ber_memfree %ld\n",
  145|       |			(long)mh->bm_sequence, (long)mh, (long)mh->bm_length,
  146|       |			ber_int_meminuse);
  147|       |#endif
  148|       |		/* Fill the free space with poison */
  149|       |		memset( mh, 0xff, mh->bm_length + sizeof(struct ber_mem_hdr) + sizeof(ber_int_t));
  150|       |		free( mh );
  151|       |#else
  152|   182k|		free( p );
  153|   182k|#endif
  154|   182k|		return;
  155|   182k|	}
  156|       |
  157|   182k|	assert( ber_int_memory_fns->bmf_free != 0 );
  ------------------
  |  Branch (157:2): [True: 0, False: 0]
  |  Branch (157:2): [True: 0, False: 0]
  ------------------
  158|       |
  159|      0|	(*ber_int_memory_fns->bmf_free)( p, ctx );
  160|      0|}
ber_memfree:
  164|  24.9k|{
  165|       |	ber_memfree_x(p, NULL);
  166|  24.9k|}
ber_memvfree_x:
  170|  2.48k|{
  171|  2.48k|	int	i;
  172|       |
  173|  2.48k|	if( vec == NULL ) {
  ------------------
  |  Branch (173:6): [True: 13, False: 2.46k]
  ------------------
  174|     13|		return;
  175|     13|	}
  176|       |
  177|  2.46k|	BER_MEM_VALID( vec );
  178|       |
  179|  6.32k|	for ( i = 0; vec[i] != NULL; i++ ) {
  ------------------
  |  Branch (179:15): [True: 3.85k, False: 2.46k]
  ------------------
  180|  3.85k|		ber_memfree_x( vec[i], ctx );
  181|  3.85k|	}
  182|       |
  183|  2.46k|	ber_memfree_x( vec, ctx );
  184|  2.46k|}
ber_memalloc_x:
  194|   129k|{
  195|   129k|	void *new;
  196|       |
  197|   129k|	if( s == 0 ) {
  ------------------
  |  Branch (197:6): [True: 0, False: 129k]
  ------------------
  198|      0|		LDAP_MEMORY_DEBUG_ASSERT( s != 0 );
  ------------------
  |  |   54|      0|# define LDAP_MEMORY_DEBUG_ASSERT(expr) ((void) 0)
  ------------------
  199|      0|		return NULL;
  200|      0|	}
  201|       |
  202|   129k|	if( ber_int_memory_fns == NULL || ctx == NULL ) {
  ------------------
  |  Branch (202:6): [True: 129k, False: 0]
  |  Branch (202:36): [True: 0, False: 0]
  ------------------
  203|       |#ifdef LDAP_MEMORY_DEBUG
  204|       |		new = malloc(s + sizeof(struct ber_mem_hdr) + sizeof( ber_int_t));
  205|       |		if( new )
  206|       |		{
  207|       |		struct ber_mem_hdr *mh = new;
  208|       |		mh->bm_top = LBER_MEM_JUNK;
  209|       |		mh->bm_length = s;
  210|       |		setdatatop( mh);
  211|       |		setend( (char *)&mh[1] + mh->bm_length );
  212|       |
  213|       |		ber_int_meminuse += mh->bm_length;	/* Count mem inuse */
  214|       |
  215|       |#ifdef LDAP_MEMORY_TRACE
  216|       |		mh->bm_sequence = sequence++;
  217|       |		fprintf(stderr, "0x%08lx 0x%08lx -a- %ld ber_memalloc %ld\n",
  218|       |			(long)mh->bm_sequence, (long)mh, (long)mh->bm_length,
  219|       |			ber_int_meminuse);
  220|       |#endif
  221|       |		/* poison new memory */
  222|       |		memset( (char *)&mh[1], 0xff, s);
  223|       |
  224|       |		BER_MEM_VALID( &mh[1] );
  225|       |		new = &mh[1];
  226|       |		}
  227|       |#else
  228|   129k|		new = malloc( s );
  229|   129k|#endif
  230|   129k|	} else {
  231|      0|		new = (*ber_int_memory_fns->bmf_malloc)( s, ctx );
  232|      0|	}
  233|       |
  234|   129k|	if( new == NULL ) {
  ------------------
  |  Branch (234:6): [True: 0, False: 129k]
  ------------------
  235|      0|		ber_errno = LBER_ERROR_MEMORY;
  ------------------
  |  |  683|      0|#define ber_errno (*(ber_errno_addr)())
  ------------------
              		ber_errno = LBER_ERROR_MEMORY;
  ------------------
  |  |  687|      0|#define LBER_ERROR_MEMORY	0x2
  ------------------
  236|      0|	}
  237|       |
  238|   129k|	return new;
  239|   129k|}
ber_memalloc:
  243|  21.2k|{
  244|       |	return ber_memalloc_x( s, NULL );
  245|  21.2k|}
ber_memcalloc_x:
  249|  52.7k|{
  250|  52.7k|	void *new;
  251|       |
  252|  52.7k|	if( n == 0 || s == 0 ) {
  ------------------
  |  Branch (252:6): [True: 0, False: 52.7k]
  |  Branch (252:16): [True: 0, False: 52.7k]
  ------------------
  253|      0|		LDAP_MEMORY_DEBUG_ASSERT( n != 0 && s != 0);
  ------------------
  |  |   54|      0|# define LDAP_MEMORY_DEBUG_ASSERT(expr) ((void) 0)
  ------------------
  254|      0|		return NULL;
  255|      0|	}
  256|       |
  257|  52.7k|	if( ber_int_memory_fns == NULL || ctx == NULL ) {
  ------------------
  |  Branch (257:6): [True: 52.7k, False: 0]
  |  Branch (257:36): [True: 0, False: 0]
  ------------------
  258|       |#ifdef LDAP_MEMORY_DEBUG
  259|       |		new = n < (-sizeof(struct ber_mem_hdr) - sizeof(ber_int_t)) / s
  260|       |			? calloc(1, n*s + sizeof(struct ber_mem_hdr) + sizeof(ber_int_t))
  261|       |			: NULL;
  262|       |		if( new )
  263|       |		{
  264|       |		struct ber_mem_hdr *mh = new;
  265|       |
  266|       |		mh->bm_top = LBER_MEM_JUNK;
  267|       |		mh->bm_length = n*s;
  268|       |		setdatatop( mh);
  269|       |		setend( (char *)&mh[1] + mh->bm_length );
  270|       |
  271|       |		ber_int_meminuse += mh->bm_length;
  272|       |
  273|       |#ifdef LDAP_MEMORY_TRACE
  274|       |		mh->bm_sequence = sequence++;
  275|       |		fprintf(stderr, "0x%08lx 0x%08lx -a- %ld ber_memcalloc %ld\n",
  276|       |			(long)mh->bm_sequence, (long)mh, (long)mh->bm_length,
  277|       |			ber_int_meminuse);
  278|       |#endif
  279|       |		BER_MEM_VALID( &mh[1] );
  280|       |		new = &mh[1];
  281|       |		}
  282|       |#else
  283|  52.7k|		new = calloc( n, s );
  284|  52.7k|#endif
  285|       |
  286|  52.7k|	} else {
  287|      0|		new = (*ber_int_memory_fns->bmf_calloc)( n, s, ctx );
  288|      0|	}
  289|       |
  290|  52.7k|	if( new == NULL ) {
  ------------------
  |  Branch (290:6): [True: 0, False: 52.7k]
  ------------------
  291|      0|		ber_errno = LBER_ERROR_MEMORY;
  ------------------
  |  |  683|      0|#define ber_errno (*(ber_errno_addr)())
  ------------------
              		ber_errno = LBER_ERROR_MEMORY;
  ------------------
  |  |  687|      0|#define LBER_ERROR_MEMORY	0x2
  ------------------
  292|      0|	}
  293|       |
  294|  52.7k|	return new;
  295|  52.7k|}
ber_memcalloc:
  299|  19.6k|{
  300|       |	return ber_memcalloc_x( n, s, NULL );
  301|  19.6k|}
ber_memrealloc_x:
  305|  8.19k|{
  306|  8.19k|	void *new = NULL;
  307|       |
  308|       |	/* realloc(NULL,s) -> malloc(s) */
  309|  8.19k|	if( p == NULL ) {
  ------------------
  |  Branch (309:6): [True: 8.16k, False: 32]
  ------------------
  310|  8.16k|		return ber_memalloc_x( s, ctx );
  311|  8.16k|	}
  312|       |	
  313|       |	/* realloc(p,0) -> free(p) */
  314|     32|	if( s == 0 ) {
  ------------------
  |  Branch (314:6): [True: 0, False: 32]
  ------------------
  315|      0|		ber_memfree_x( p, ctx );
  316|      0|		return NULL;
  317|      0|	}
  318|       |
  319|     32|	BER_MEM_VALID( p );
  320|       |
  321|     32|	if( ber_int_memory_fns == NULL || ctx == NULL ) {
  ------------------
  |  Branch (321:6): [True: 32, False: 0]
  |  Branch (321:36): [True: 0, False: 0]
  ------------------
  322|       |#ifdef LDAP_MEMORY_DEBUG
  323|       |		ber_int_t oldlen;
  324|       |		struct ber_mem_hdr *mh = (struct ber_mem_hdr *)
  325|       |			((char *)p - sizeof(struct ber_mem_hdr));
  326|       |		assert( mh->bm_top == LBER_MEM_JUNK);
  327|       |		assert( testdatatop( mh));
  328|       |		assert( testend( (char *)&mh[1] + mh->bm_length) );
  329|       |		oldlen = mh->bm_length;
  330|       |
  331|       |		p = realloc( mh, s + sizeof(struct ber_mem_hdr) + sizeof(ber_int_t) );
  332|       |		if( p == NULL ) {
  333|       |			ber_errno = LBER_ERROR_MEMORY;
  334|       |			return NULL;
  335|       |		}
  336|       |
  337|       |			mh = p;
  338|       |		mh->bm_length = s;
  339|       |		setend( (char *)&mh[1] + mh->bm_length );
  340|       |		if( s > oldlen ) {
  341|       |			/* poison any new memory */
  342|       |			memset( (char *)&mh[1] + oldlen, 0xff, s - oldlen);
  343|       |		}
  344|       |
  345|       |		assert( mh->bm_top == LBER_MEM_JUNK);
  346|       |		assert( testdatatop( mh));
  347|       |
  348|       |		ber_int_meminuse += s - oldlen;
  349|       |#ifdef LDAP_MEMORY_TRACE
  350|       |		fprintf(stderr, "0x%08lx 0x%08lx -a- %ld ber_memrealloc %ld\n",
  351|       |			(long)mh->bm_sequence, (long)mh, (long)mh->bm_length,
  352|       |			ber_int_meminuse);
  353|       |#endif
  354|       |			BER_MEM_VALID( &mh[1] );
  355|       |		return &mh[1];
  356|       |#else
  357|     32|		new = realloc( p, s );
  358|     32|#endif
  359|     32|	} else {
  360|      0|		new = (*ber_int_memory_fns->bmf_realloc)( p, s, ctx );
  361|      0|	}
  362|       |
  363|     32|	if( new == NULL ) {
  ------------------
  |  Branch (363:6): [True: 0, False: 32]
  ------------------
  364|      0|		ber_errno = LBER_ERROR_MEMORY;
  ------------------
  |  |  683|      0|#define ber_errno (*(ber_errno_addr)())
  ------------------
              		ber_errno = LBER_ERROR_MEMORY;
  ------------------
  |  |  687|      0|#define LBER_ERROR_MEMORY	0x2
  ------------------
  365|      0|	}
  366|       |
  367|     32|	return new;
  368|     32|}
ber_memrealloc:
  372|    769|{
  373|       |	return ber_memrealloc_x( p, s, NULL );
  374|    769|}
ber_bvfree_x:
  378|      4|{
  379|      4|	if( bv == NULL ) {
  ------------------
  |  Branch (379:6): [True: 0, False: 4]
  ------------------
  380|      0|		return;
  381|      0|	}
  382|       |
  383|      4|	BER_MEM_VALID( bv );
  384|       |
  385|      4|	if ( bv->bv_val != NULL ) {
  ------------------
  |  Branch (385:7): [True: 4, False: 0]
  ------------------
  386|      4|		ber_memfree_x( bv->bv_val, ctx );
  387|      4|	}
  388|       |
  389|      4|	ber_memfree_x( (char *) bv, ctx );
  390|      4|}
ber_bvfree:
  394|      4|{
  395|       |	ber_bvfree_x( bv, NULL );
  396|      4|}
ber_str2bv_x:
  542|    107|{
  543|    107|	struct berval *new;
  544|       |
  545|    107|	if( s == NULL ) {
  ------------------
  |  Branch (545:6): [True: 0, False: 107]
  ------------------
  546|      0|		ber_errno = LBER_ERROR_PARAM;
  ------------------
  |  |  683|      0|#define ber_errno (*(ber_errno_addr)())
  ------------------
              		ber_errno = LBER_ERROR_PARAM;
  ------------------
  |  |  686|      0|#define LBER_ERROR_PARAM	0x1
  ------------------
  547|      0|		return NULL;
  548|      0|	}
  549|       |
  550|    107|	if( bv ) {
  ------------------
  |  Branch (550:6): [True: 107, False: 0]
  ------------------
  551|    107|		new = bv;
  552|    107|	} else {
  553|      0|		if(( new = ber_memalloc_x( sizeof(struct berval), ctx )) == NULL ) {
  ------------------
  |  Branch (553:6): [True: 0, False: 0]
  ------------------
  554|      0|			return NULL;
  555|      0|		}
  556|      0|	}
  557|       |
  558|    107|	new->bv_len = len ? len : strlen( s );
  ------------------
  |  Branch (558:16): [True: 0, False: 107]
  ------------------
  559|    107|	if ( dup ) {
  ------------------
  |  Branch (559:7): [True: 0, False: 107]
  ------------------
  560|      0|		if ( (new->bv_val = ber_memalloc_x( new->bv_len+1, ctx )) == NULL ) {
  ------------------
  |  Branch (560:8): [True: 0, False: 0]
  ------------------
  561|      0|			if ( !bv )
  ------------------
  |  Branch (561:9): [True: 0, False: 0]
  ------------------
  562|      0|				ber_memfree_x( new, ctx );
  563|      0|			return NULL;
  564|      0|		}
  565|       |
  566|      0|		AC_MEMCPY( new->bv_val, s, new->bv_len );
  ------------------
  |  |   86|      0|#define AC_MEMCPY( d, s, n ) (SAFEMEMCPY((d),(s),(n)))
  |  |  ------------------
  |  |  |  |   77|      0|#		define SAFEMEMCPY( d, s, n ) 	memmove((d), (s), (n))
  |  |  ------------------
  ------------------
  567|      0|		new->bv_val[new->bv_len] = '\0';
  568|    107|	} else {
  569|    107|		new->bv_val = (char *) s;
  570|    107|	}
  571|       |
  572|    107|	return( new );
  573|    107|}
ber_str2bv:
  578|    107|{
  579|       |	return ber_str2bv_x( s, len, dup, bv, NULL );
  580|    107|}
ber_strdup_x:
  629|  80.5k|{
  630|  80.5k|	char    *p;
  631|  80.5k|	size_t	len;
  632|       |	
  633|       |#ifdef LDAP_MEMORY_DEBUG
  634|       |	assert(s != NULL);			/* bv damn better point to something */
  635|       |#endif
  636|       |
  637|  80.5k|	if( s == NULL ) {
  ------------------
  |  Branch (637:6): [True: 0, False: 80.5k]
  ------------------
  638|      0|		ber_errno = LBER_ERROR_PARAM;
  ------------------
  |  |  683|      0|#define ber_errno (*(ber_errno_addr)())
  ------------------
              		ber_errno = LBER_ERROR_PARAM;
  ------------------
  |  |  686|      0|#define LBER_ERROR_PARAM	0x1
  ------------------
  639|      0|		return NULL;
  640|      0|	}
  641|       |
  642|  80.5k|	len = strlen( s ) + 1;
  643|  80.5k|	if ( (p = ber_memalloc_x( len, ctx )) != NULL ) {
  ------------------
  |  Branch (643:7): [True: 80.5k, False: 0]
  ------------------
  644|  80.5k|		AC_MEMCPY( p, s, len );
  ------------------
  |  |   86|  80.5k|#define AC_MEMCPY( d, s, n ) (SAFEMEMCPY((d),(s),(n)))
  |  |  ------------------
  |  |  |  |   77|  80.5k|#		define SAFEMEMCPY( d, s, n ) 	memmove((d), (s), (n))
  |  |  ------------------
  ------------------
  645|  80.5k|	}
  646|       |
  647|  80.5k|	return p;
  648|  80.5k|}

ber_set_option:
  127|    440|{
  128|    440|	BerElement *ber;
  129|    440|	Sockbuf *sb;
  130|       |
  131|    440|	if(invalue == NULL) {
  ------------------
  |  Branch (131:5): [True: 0, False: 440]
  ------------------
  132|       |		/* no place to set from */
  133|      0|		ber_errno = LBER_ERROR_PARAM;
  ------------------
  |  |  683|      0|#define ber_errno (*(ber_errno_addr)())
  ------------------
              		ber_errno = LBER_ERROR_PARAM;
  ------------------
  |  |  686|      0|#define LBER_ERROR_PARAM	0x1
  ------------------
  134|      0|		return LBER_OPT_ERROR;
  ------------------
  |  |  169|      0|#define LBER_OPT_ERROR		(-1)
  ------------------
  135|      0|	}
  136|       |
  137|    440|	if(item == NULL) {
  ------------------
  |  Branch (137:5): [True: 0, False: 440]
  ------------------
  138|      0|		switch ( option ) {
  ------------------
  |  Branch (138:12): [True: 0, False: 0]
  ------------------
  139|      0|		case LBER_OPT_BER_DEBUG:
  ------------------
  |  |   97|      0|#define LBER_OPT_BER_DEBUG				0x02
  ------------------
  |  Branch (139:3): [True: 0, False: 0]
  ------------------
  140|      0|			ber_int_debug = * (const int *) invalue;
  ------------------
  |  |   74|      0|#define ber_int_debug ber_int_options.lbo_debug
  ------------------
  141|      0|			return LBER_OPT_SUCCESS;
  ------------------
  |  |  168|      0|#define LBER_OPT_SUCCESS	(0)
  ------------------
  142|       |
  143|      0|		case LBER_OPT_LOG_PRINT_FN:
  ------------------
  |  |  108|      0|#define LBER_OPT_LOG_PRINT_FN	0x8001
  ------------------
  |  Branch (143:3): [True: 0, False: 0]
  ------------------
  144|      0|			ber_pvt_log_print = (BER_LOG_PRINT_FN) invalue;
  145|      0|			return LBER_OPT_SUCCESS;
  ------------------
  |  |  168|      0|#define LBER_OPT_SUCCESS	(0)
  ------------------
  146|       |
  147|      0|		case LBER_OPT_LOG_PRINT_FILE:
  ------------------
  |  |  111|      0|#define LBER_OPT_LOG_PRINT_FILE		0x8004
  ------------------
  |  Branch (147:3): [True: 0, False: 0]
  ------------------
  148|      0|			ber_pvt_err_file = (void *) invalue;
  149|      0|			return LBER_OPT_SUCCESS;
  ------------------
  |  |  168|      0|#define LBER_OPT_SUCCESS	(0)
  ------------------
  150|       |
  151|      0|		case LBER_OPT_MEMORY_INUSE:
  ------------------
  |  |  114|      0|#define LBER_OPT_MEMORY_INUSE		0x8005	/* for memory debugging */
  ------------------
  |  Branch (151:3): [True: 0, False: 0]
  ------------------
  152|       |			/* The memory inuse is a global variable on kernel implementations.
  153|       |			 * This means that memory debug is shared by all LDAP processes
  154|       |			 * so for this variable to have much meaning, only one LDAP process
  155|       |			 * should be running and memory inuse should be initialized to zero
  156|       |			 * using the lber_set_option() function during startup.
  157|       |			 * The counter is not accurate for multithreaded applications.
  158|       |			 */
  159|       |#ifdef LDAP_MEMORY_DEBUG
  160|       |			ber_int_meminuse = * (int *) invalue;
  161|       |			return LBER_OPT_SUCCESS;
  162|       |#else
  163|      0|			return LBER_OPT_ERROR;
  ------------------
  |  |  169|      0|#define LBER_OPT_ERROR		(-1)
  ------------------
  164|      0|#endif
  165|      0|		case LBER_OPT_MEMORY_FNS:
  ------------------
  |  |  109|      0|#define LBER_OPT_MEMORY_FNS		0x8002
  ------------------
  |  Branch (165:3): [True: 0, False: 0]
  ------------------
  166|      0|			if ( ber_int_memory_fns == NULL )
  ------------------
  |  Branch (166:9): [True: 0, False: 0]
  ------------------
  167|      0|			{
  168|      0|				const BerMemoryFunctions *f =
  169|      0|					(const BerMemoryFunctions *) invalue;
  170|       |				/* make sure all functions are provided */
  171|      0|				if(!( f->bmf_malloc && f->bmf_calloc
  ------------------
  |  Branch (171:11): [True: 0, False: 0]
  |  Branch (171:28): [True: 0, False: 0]
  ------------------
  172|      0|					&& f->bmf_realloc && f->bmf_free ))
  ------------------
  |  Branch (172:9): [True: 0, False: 0]
  |  Branch (172:27): [True: 0, False: 0]
  ------------------
  173|      0|				{
  174|      0|					ber_errno = LBER_ERROR_PARAM;
  ------------------
  |  |  683|      0|#define ber_errno (*(ber_errno_addr)())
  ------------------
              					ber_errno = LBER_ERROR_PARAM;
  ------------------
  |  |  686|      0|#define LBER_ERROR_PARAM	0x1
  ------------------
  175|      0|					return LBER_OPT_ERROR;
  ------------------
  |  |  169|      0|#define LBER_OPT_ERROR		(-1)
  ------------------
  176|      0|				}
  177|       |
  178|      0|				ber_int_memory_fns = &ber_int_memory_fns_datum;
  179|       |
  180|      0|				AC_MEMCPY(ber_int_memory_fns, f,
  ------------------
  |  |   86|      0|#define AC_MEMCPY( d, s, n ) (SAFEMEMCPY((d),(s),(n)))
  |  |  ------------------
  |  |  |  |   77|      0|#		define SAFEMEMCPY( d, s, n ) 	memmove((d), (s), (n))
  |  |  ------------------
  ------------------
  181|      0|					 sizeof(BerMemoryFunctions));
  182|       |
  183|      0|				return LBER_OPT_SUCCESS;
  ------------------
  |  |  168|      0|#define LBER_OPT_SUCCESS	(0)
  ------------------
  184|      0|			}
  185|      0|			break;
  186|       |
  187|      0|		case LBER_OPT_LOG_PROC:
  ------------------
  |  |  115|      0|#define LBER_OPT_LOG_PROC           0x8006  /* for external logging function */
  ------------------
  |  Branch (187:3): [True: 0, False: 0]
  ------------------
  188|      0|			ber_int_log_proc = (BER_LOG_FN)invalue;
  189|      0|			return LBER_OPT_SUCCESS;
  ------------------
  |  |  168|      0|#define LBER_OPT_SUCCESS	(0)
  ------------------
  190|      0|		}
  191|       |
  192|      0|		ber_errno = LBER_ERROR_PARAM;
  ------------------
  |  |  683|      0|#define ber_errno (*(ber_errno_addr)())
  ------------------
              		ber_errno = LBER_ERROR_PARAM;
  ------------------
  |  |  686|      0|#define LBER_ERROR_PARAM	0x1
  ------------------
  193|      0|		return LBER_OPT_ERROR;
  ------------------
  |  |  169|      0|#define LBER_OPT_ERROR		(-1)
  ------------------
  194|      0|	}
  195|       |
  196|    440|	ber = item;
  197|    440|	sb = item;
  198|       |
  199|    440|	switch(option) {
  200|      0|	case LBER_OPT_BER_OPTIONS:
  ------------------
  |  |   96|      0|#define LBER_OPT_BER_OPTIONS			0x01
  ------------------
  |  Branch (200:2): [True: 0, False: 440]
  ------------------
  201|      0|		assert( LBER_VALID( ber ) );
  ------------------
  |  Branch (201:3): [True: 0, False: 0]
  |  Branch (201:3): [True: 0, False: 0]
  ------------------
  202|      0|		ber->ber_options = * (const int *) invalue;
  ------------------
  |  |   80|      0|#define ber_options		ber_opts.lbo_options
  ------------------
  203|      0|		return LBER_OPT_SUCCESS;
  ------------------
  |  |  168|      0|#define LBER_OPT_SUCCESS	(0)
  ------------------
  204|       |
  205|      0|	case LBER_OPT_BER_DEBUG:
  ------------------
  |  |   97|      0|#define LBER_OPT_BER_DEBUG				0x02
  ------------------
  |  Branch (205:2): [True: 0, False: 440]
  ------------------
  206|      0|		assert( LBER_VALID( ber ) );
  ------------------
  |  Branch (206:3): [True: 0, False: 0]
  |  Branch (206:3): [True: 0, False: 0]
  ------------------
  207|      0|		ber->ber_debug = * (const int *) invalue;
  ------------------
  |  |   81|      0|#define ber_debug		ber_opts.lbo_debug
  ------------------
  208|      0|		return LBER_OPT_SUCCESS;
  ------------------
  |  |  168|      0|#define LBER_OPT_SUCCESS	(0)
  ------------------
  209|       |
  210|    440|	case LBER_OPT_BER_REMAINING_BYTES:
  ------------------
  |  |   98|    440|#define LBER_OPT_BER_REMAINING_BYTES	0x03
  ------------------
  |  Branch (210:2): [True: 440, False: 0]
  ------------------
  211|    440|		assert( LBER_VALID( ber ) );
  ------------------
  |  Branch (211:3): [True: 0, False: 440]
  |  Branch (211:3): [True: 440, False: 0]
  ------------------
  212|    440|		ber->ber_end = &ber->ber_ptr[* (const ber_len_t *) invalue];
  213|    440|		return LBER_OPT_SUCCESS;
  ------------------
  |  |  168|    440|#define LBER_OPT_SUCCESS	(0)
  ------------------
  214|       |
  215|      0|	case LBER_OPT_BER_TOTAL_BYTES:
  ------------------
  |  |   99|      0|#define LBER_OPT_BER_TOTAL_BYTES		0x04
  ------------------
  |  Branch (215:2): [True: 0, False: 440]
  ------------------
  216|      0|		assert( LBER_VALID( ber ) );
  ------------------
  |  Branch (216:3): [True: 0, False: 0]
  |  Branch (216:3): [True: 0, False: 0]
  ------------------
  217|      0|		ber->ber_end = &ber->ber_buf[* (const ber_len_t *) invalue];
  218|      0|		return LBER_OPT_SUCCESS;
  ------------------
  |  |  168|      0|#define LBER_OPT_SUCCESS	(0)
  ------------------
  219|       |
  220|      0|	case LBER_OPT_BER_BYTES_TO_WRITE:
  ------------------
  |  |  100|      0|#define LBER_OPT_BER_BYTES_TO_WRITE		0x05
  ------------------
  |  Branch (220:2): [True: 0, False: 440]
  ------------------
  221|      0|		assert( LBER_VALID( ber ) );
  ------------------
  |  Branch (221:3): [True: 0, False: 0]
  |  Branch (221:3): [True: 0, False: 0]
  ------------------
  222|      0|		ber->ber_ptr = &ber->ber_buf[* (const ber_len_t *) invalue];
  223|      0|		return LBER_OPT_SUCCESS;
  ------------------
  |  |  168|      0|#define LBER_OPT_SUCCESS	(0)
  ------------------
  224|       |
  225|      0|	case LBER_OPT_BER_MEMCTX:
  ------------------
  |  |  101|      0|#define LBER_OPT_BER_MEMCTX				0x06
  ------------------
  |  Branch (225:2): [True: 0, False: 440]
  ------------------
  226|      0|		assert( LBER_VALID( ber ) );
  ------------------
  |  Branch (226:3): [True: 0, False: 0]
  |  Branch (226:3): [True: 0, False: 0]
  ------------------
  227|      0|		ber->ber_memctx = *(void **)invalue;
  228|      0|		return LBER_OPT_SUCCESS;
  ------------------
  |  |  168|      0|#define LBER_OPT_SUCCESS	(0)
  ------------------
  229|       |
  230|      0|	default:
  ------------------
  |  Branch (230:2): [True: 0, False: 440]
  ------------------
  231|       |		/* bad param */
  232|      0|		ber_errno = LBER_ERROR_PARAM;
  ------------------
  |  |  683|      0|#define ber_errno (*(ber_errno_addr)())
  ------------------
              		ber_errno = LBER_ERROR_PARAM;
  ------------------
  |  |  686|      0|#define LBER_ERROR_PARAM	0x1
  ------------------
  233|      0|		break;
  234|    440|	}
  235|       |
  236|      0|	return LBER_OPT_ERROR;
  ------------------
  |  |  169|      0|#define LBER_OPT_ERROR		(-1)
  ------------------
  237|    440|}

ber_sockbuf_alloc:
   57|  3.39k|{
   58|  3.39k|	Sockbuf			*sb;
   59|       |
   60|  3.39k|	sb = LBER_CALLOC( 1, sizeof( Sockbuf ) );
  ------------------
  |  |  199|  3.39k|#define LBER_CALLOC(n,s)	ber_memcalloc((n),(s))
  ------------------
   61|       |
   62|  3.39k|	if( sb == NULL ) return NULL;
  ------------------
  |  Branch (62:6): [True: 0, False: 3.39k]
  ------------------
   63|       |
   64|  3.39k|	ber_int_sb_init( sb );
   65|  3.39k|	return sb;
   66|  3.39k|}
ber_sockbuf_ctrl:
   84|  45.0k|{
   85|  45.0k|	Sockbuf_IO_Desc		*p;
   86|  45.0k|	int			ret = 0;
   87|       |
   88|  45.0k|	assert( sb != NULL );
  ------------------
  |  Branch (88:2): [True: 0, False: 45.0k]
  |  Branch (88:2): [True: 45.0k, False: 0]
  ------------------
   89|  45.0k|	assert( SOCKBUF_VALID( sb ) );
  ------------------
  |  Branch (89:2): [True: 0, False: 45.0k]
  |  Branch (89:2): [True: 45.0k, False: 0]
  ------------------
   90|       |
   91|  45.0k|	switch ( opt ) {
   92|      0|		case LBER_SB_OPT_HAS_IO:
  ------------------
  |  |  136|      0|#define LBER_SB_OPT_HAS_IO		3
  ------------------
  |  Branch (92:3): [True: 0, False: 45.0k]
  ------------------
   93|      0|			p = sb->sb_iod;
   94|      0|			while ( p && p->sbiod_io != (Sockbuf_IO *)arg ) {
  ------------------
  |  Branch (94:12): [True: 0, False: 0]
  |  Branch (94:17): [True: 0, False: 0]
  ------------------
   95|      0|				p = p->sbiod_next;
   96|      0|			}
   97|       |   
   98|      0|			if ( p ) {
  ------------------
  |  Branch (98:9): [True: 0, False: 0]
  ------------------
   99|      0|				ret = 1;
  100|      0|			}
  101|      0|			break;
  102|       |
  103|  24.5k|		case LBER_SB_OPT_GET_FD:
  ------------------
  |  |  134|  24.5k|#define LBER_SB_OPT_GET_FD		1
  ------------------
  |  Branch (103:3): [True: 24.5k, False: 20.5k]
  ------------------
  104|  24.5k|			if ( arg != NULL ) {
  ------------------
  |  Branch (104:9): [True: 23.7k, False: 769]
  ------------------
  105|  23.7k|				*((ber_socket_t *)arg) = sb->sb_fd;
  106|  23.7k|			}
  107|  24.5k|			ret = ( sb->sb_fd == AC_SOCKET_INVALID ? -1 : 1);
  ------------------
  |  |  163|  24.5k|#	define AC_SOCKET_INVALID	(-1)
  ------------------
  |  Branch (107:12): [True: 0, False: 24.5k]
  ------------------
  108|  24.5k|			break;
  109|       |
  110|  3.39k|		case LBER_SB_OPT_SET_FD:
  ------------------
  |  |  135|  3.39k|#define LBER_SB_OPT_SET_FD		2
  ------------------
  |  Branch (110:3): [True: 3.39k, False: 41.6k]
  ------------------
  111|  3.39k|			sb->sb_fd = *((ber_socket_t *)arg);
  112|  3.39k|			ret = 1;
  113|  3.39k|			break;
  114|       |
  115|      0|		case LBER_SB_OPT_SET_NONBLOCK:
  ------------------
  |  |  137|      0|#define LBER_SB_OPT_SET_NONBLOCK	4
  ------------------
  |  Branch (115:3): [True: 0, False: 45.0k]
  ------------------
  116|      0|			ret = ber_pvt_socket_set_nonblock( sb->sb_fd, arg != NULL)
  ------------------
  |  Branch (116:10): [True: 0, False: 0]
  ------------------
  117|      0|				? -1 : 1;
  118|      0|			break;
  119|       |
  120|      0|		case LBER_SB_OPT_DRAIN: {
  ------------------
  |  |  141|      0|#define LBER_SB_OPT_DRAIN		10
  ------------------
  |  Branch (120:3): [True: 0, False: 45.0k]
  ------------------
  121|       |				/* Drain the data source to enable possible errors (e.g.
  122|       |				 * TLS) to be propagated to the upper layers
  123|       |				 */
  124|      0|				char buf[LBER_MIN_BUFF_SIZE];
  125|       |
  126|      0|				do {
  127|      0|					ret = ber_int_sb_read( sb, buf, sizeof( buf ) );
  128|      0|				} while ( ret == sizeof( buf ) );
  ------------------
  |  Branch (128:15): [True: 0, False: 0]
  ------------------
  129|       |
  130|      0|				ret = 1;
  131|      0|			} break;
  132|       |
  133|      0|		case LBER_SB_OPT_NEEDS_READ:
  ------------------
  |  |  142|      0|#define LBER_SB_OPT_NEEDS_READ		11
  ------------------
  |  Branch (133:3): [True: 0, False: 45.0k]
  ------------------
  134|      0|			ret = ( sb->sb_trans_needs_read ? 1 : 0 );
  ------------------
  |  Branch (134:12): [True: 0, False: 0]
  ------------------
  135|      0|			break;
  136|       |
  137|      0|		case LBER_SB_OPT_NEEDS_WRITE:
  ------------------
  |  |  143|      0|#define LBER_SB_OPT_NEEDS_WRITE		12
  ------------------
  |  Branch (137:3): [True: 0, False: 45.0k]
  ------------------
  138|      0|			ret = ( sb->sb_trans_needs_write ? 1 : 0 );
  ------------------
  |  Branch (138:12): [True: 0, False: 0]
  ------------------
  139|      0|			break;
  140|       |
  141|      0|		case LBER_SB_OPT_GET_MAX_INCOMING:
  ------------------
  |  |  144|      0|#define LBER_SB_OPT_GET_MAX_INCOMING	13
  ------------------
  |  Branch (141:3): [True: 0, False: 45.0k]
  ------------------
  142|      0|			if ( arg != NULL ) {
  ------------------
  |  Branch (142:9): [True: 0, False: 0]
  ------------------
  143|      0|				*((ber_len_t *)arg) = sb->sb_max_incoming;
  144|      0|			}
  145|      0|			ret = 1;
  146|      0|			break;
  147|       |
  148|  3.39k|		case LBER_SB_OPT_SET_MAX_INCOMING:
  ------------------
  |  |  145|  3.39k|#define LBER_SB_OPT_SET_MAX_INCOMING	14
  ------------------
  |  Branch (148:3): [True: 3.39k, False: 41.6k]
  ------------------
  149|  3.39k|			sb->sb_max_incoming = *((ber_len_t *)arg);
  150|  3.39k|			ret = 1;
  151|  3.39k|			break;
  152|       |
  153|      0|		case LBER_SB_OPT_UNGET_BUF:
  ------------------
  |  |  148|      0|#define LBER_SB_OPT_UNGET_BUF	15
  ------------------
  |  Branch (153:3): [True: 0, False: 45.0k]
  ------------------
  154|       |#ifdef LDAP_PF_LOCAL_SENDMSG
  155|       |			sb->sb_ungetlen = ((struct berval *)arg)->bv_len;
  156|       |			if ( sb->sb_ungetlen <= sizeof( sb->sb_ungetbuf )) {
  157|       |				AC_MEMCPY( sb->sb_ungetbuf, ((struct berval *)arg)->bv_val,
  158|       |					sb->sb_ungetlen );
  159|       |				ret = 1;
  160|       |			} else {
  161|       |				sb->sb_ungetlen = 0;
  162|       |				ret = -1;
  163|       |			}
  164|       |#endif
  165|      0|			break;
  166|       |
  167|  13.7k|		default:
  ------------------
  |  Branch (167:3): [True: 13.7k, False: 31.3k]
  ------------------
  168|  13.7k|			ret = sb->sb_iod->sbiod_io->sbi_ctrl( sb->sb_iod, opt, arg );
  169|  13.7k|			break;
  170|  45.0k|   }
  171|       |
  172|  45.0k|	return ret;
  173|  45.0k|}
ber_sockbuf_add_io:
  177|  10.1k|{
  178|  10.1k|	Sockbuf_IO_Desc		*d, *p, **q;
  179|       |   
  180|  10.1k|	assert( sb != NULL );
  ------------------
  |  Branch (180:2): [True: 0, False: 10.1k]
  |  Branch (180:2): [True: 10.1k, False: 0]
  ------------------
  181|  10.1k|	assert( SOCKBUF_VALID( sb ) );
  ------------------
  |  Branch (181:2): [True: 0, False: 10.1k]
  |  Branch (181:2): [True: 10.1k, False: 0]
  ------------------
  182|       |   
  183|  10.1k|	if ( sbio == NULL ) {
  ------------------
  |  Branch (183:7): [True: 0, False: 10.1k]
  ------------------
  184|      0|		return -1;
  185|      0|	}
  186|       |   
  187|  10.1k|	q = &sb->sb_iod;
  188|  10.1k|	p = *q;
  189|  10.1k|	while ( p && p->sbiod_level > layer ) {
  ------------------
  |  Branch (189:10): [True: 6.78k, False: 3.39k]
  |  Branch (189:15): [True: 0, False: 6.78k]
  ------------------
  190|      0|		q = &p->sbiod_next;
  191|      0|		p = *q;
  192|      0|	}
  193|       |   
  194|  10.1k|	d = LBER_MALLOC( sizeof( *d ) );
  ------------------
  |  |  198|  10.1k|#define LBER_MALLOC(s)		ber_memalloc((s))
  ------------------
  195|  10.1k|	if ( d == NULL ) {
  ------------------
  |  Branch (195:7): [True: 0, False: 10.1k]
  ------------------
  196|      0|		return -1;
  197|      0|	}
  198|       |   
  199|  10.1k|	d->sbiod_level = layer;
  200|  10.1k|	d->sbiod_sb = sb;
  201|  10.1k|	d->sbiod_io = sbio;
  202|  10.1k|	memset( &d->sbiod_pvt, '\0', sizeof( d->sbiod_pvt ) );
  203|  10.1k|	d->sbiod_next = p;
  204|  10.1k|	*q = d;
  205|       |
  206|  10.1k|	if ( sbio->sbi_setup != NULL && ( sbio->sbi_setup( d, arg ) < 0 ) ) {
  ------------------
  |  Branch (206:7): [True: 10.1k, False: 0]
  |  Branch (206:34): [True: 0, False: 10.1k]
  ------------------
  207|      0|		return -1;
  208|      0|	}
  209|       |
  210|  10.1k|	return 0;
  211|  10.1k|}
ber_sockbuf_remove_io:
  215|  10.1k|{
  216|  10.1k|	Sockbuf_IO_Desc		*p, **q;
  217|       |
  218|  10.1k|	assert( sb != NULL );
  ------------------
  |  Branch (218:2): [True: 0, False: 10.1k]
  |  Branch (218:2): [True: 10.1k, False: 0]
  ------------------
  219|  10.1k|	assert( SOCKBUF_VALID( sb ) );
  ------------------
  |  Branch (219:2): [True: 0, False: 10.1k]
  |  Branch (219:2): [True: 10.1k, False: 0]
  ------------------
  220|       |   
  221|  10.1k|	if ( sb->sb_iod == NULL ) {
  ------------------
  |  Branch (221:7): [True: 0, False: 10.1k]
  ------------------
  222|      0|		return -1;
  223|      0|	}
  224|       |   
  225|  10.1k|	q = &sb->sb_iod;
  226|  10.1k|	while ( *q != NULL ) {
  ------------------
  |  Branch (226:10): [True: 10.1k, False: 0]
  ------------------
  227|  10.1k|		p = *q;
  228|  10.1k|		if ( layer == p->sbiod_level && p->sbiod_io == sbio ) {
  ------------------
  |  Branch (228:8): [True: 10.1k, False: 0]
  |  Branch (228:35): [True: 10.1k, False: 0]
  ------------------
  229|  10.1k|			if ( p->sbiod_io->sbi_remove != NULL &&
  ------------------
  |  Branch (229:9): [True: 6.78k, False: 3.39k]
  ------------------
  230|  6.78k|				p->sbiod_io->sbi_remove( p ) < 0 )
  ------------------
  |  Branch (230:5): [True: 0, False: 6.78k]
  ------------------
  231|      0|			{
  232|      0|				return -1;
  233|      0|			}
  234|  10.1k|			*q = p->sbiod_next;
  235|  10.1k|			LBER_FREE( p );
  ------------------
  |  |  201|  10.1k|#define LBER_FREE(p)		ber_memfree((p))	
  ------------------
  236|  10.1k|			break;
  237|  10.1k|		}
  238|      0|		q = &p->sbiod_next;
  239|      0|	}
  240|       |
  241|  10.1k|	return 0;
  242|  10.1k|}
ber_int_sb_init:
  359|  6.78k|{
  360|  6.78k|	assert( sb != NULL);
  ------------------
  |  Branch (360:2): [True: 0, False: 6.78k]
  |  Branch (360:2): [True: 6.78k, False: 0]
  ------------------
  361|       |
  362|  6.78k|	sb->sb_valid=LBER_VALID_SOCKBUF;
  ------------------
  |  |  133|  6.78k|#define	sb_valid		sb_opts.lbo_valid
  ------------------
              	sb->sb_valid=LBER_VALID_SOCKBUF;
  ------------------
  |  |   71|  6.78k|#define LBER_VALID_SOCKBUF		0x3
  ------------------
  363|  6.78k|	sb->sb_options = 0;
  ------------------
  |  |  134|  6.78k|#define	sb_options		sb_opts.lbo_options
  ------------------
  364|  6.78k|	sb->sb_debug = ber_int_debug;
  ------------------
  |  |  135|  6.78k|#define	sb_debug		sb_opts.lbo_debug
  ------------------
              	sb->sb_debug = ber_int_debug;
  ------------------
  |  |   74|  6.78k|#define ber_int_debug ber_int_options.lbo_debug
  ------------------
  365|  6.78k|	sb->sb_fd = AC_SOCKET_INVALID;
  ------------------
  |  |  163|  6.78k|#	define AC_SOCKET_INVALID	(-1)
  ------------------
  366|  6.78k|	sb->sb_iod = NULL;
  367|  6.78k|	sb->sb_trans_needs_read = 0;
  368|  6.78k|	sb->sb_trans_needs_write = 0;
  369|       |   
  370|  6.78k|	assert( SOCKBUF_VALID( sb ) );
  ------------------
  |  Branch (370:2): [True: 0, False: 6.78k]
  |  Branch (370:2): [True: 6.78k, False: 0]
  ------------------
  371|  6.78k|	return 0;
  372|  6.78k|}
ber_int_sb_close:
  376|  3.39k|{
  377|  3.39k|	Sockbuf_IO_Desc		*p;
  378|       |
  379|  3.39k|	assert( sb != NULL);
  ------------------
  |  Branch (379:2): [True: 0, False: 3.39k]
  |  Branch (379:2): [True: 3.39k, False: 0]
  ------------------
  380|       |   
  381|  3.39k|	p = sb->sb_iod;
  382|  13.5k|	while ( p ) {
  ------------------
  |  Branch (382:10): [True: 10.1k, False: 3.39k]
  ------------------
  383|  10.1k|		if ( p->sbiod_io->sbi_close && p->sbiod_io->sbi_close( p ) < 0 ) {
  ------------------
  |  Branch (383:8): [True: 3.39k, False: 6.78k]
  |  Branch (383:34): [True: 0, False: 3.39k]
  ------------------
  384|      0|			return -1;
  385|      0|		}
  386|  10.1k|		p = p->sbiod_next;
  387|  10.1k|	}
  388|       |   
  389|  3.39k|	sb->sb_fd = AC_SOCKET_INVALID;
  ------------------
  |  |  163|  3.39k|#	define AC_SOCKET_INVALID	(-1)
  ------------------
  390|       |   
  391|  3.39k|	return 0;
  392|  3.39k|}
ber_int_sb_destroy:
  396|  3.39k|{
  397|  3.39k|	Sockbuf_IO_Desc		*p;
  398|       |
  399|  3.39k|	assert( sb != NULL);
  ------------------
  |  Branch (399:2): [True: 0, False: 3.39k]
  |  Branch (399:2): [True: 3.39k, False: 0]
  ------------------
  400|  3.39k|	assert( SOCKBUF_VALID( sb ) );
  ------------------
  |  Branch (400:2): [True: 0, False: 3.39k]
  |  Branch (400:2): [True: 3.39k, False: 0]
  ------------------
  401|       |   
  402|  13.5k|	while ( sb->sb_iod ) {
  ------------------
  |  Branch (402:10): [True: 10.1k, False: 3.39k]
  ------------------
  403|  10.1k|		p = sb->sb_iod->sbiod_next;
  404|  10.1k|		ber_sockbuf_remove_io( sb, sb->sb_iod->sbiod_io,
  405|  10.1k|			sb->sb_iod->sbiod_level );
  406|  10.1k|		sb->sb_iod = p;
  407|  10.1k|	}
  408|       |
  409|  3.39k|	return ber_int_sb_init( sb );
  410|  3.39k|}
ber_int_sb_read:
  414|  9.05k|{
  415|  9.05k|	ber_slen_t		ret;
  416|       |
  417|  9.05k|	assert( buf != NULL );
  ------------------
  |  Branch (417:2): [True: 0, False: 9.05k]
  |  Branch (417:2): [True: 9.05k, False: 0]
  ------------------
  418|  9.05k|	assert( sb != NULL);
  ------------------
  |  Branch (418:2): [True: 0, False: 9.05k]
  |  Branch (418:2): [True: 9.05k, False: 0]
  ------------------
  419|  9.05k|	assert( sb->sb_iod != NULL );
  ------------------
  |  Branch (419:2): [True: 0, False: 9.05k]
  |  Branch (419:2): [True: 9.05k, False: 0]
  ------------------
  420|  9.05k|	assert( SOCKBUF_VALID( sb ) );
  ------------------
  |  Branch (420:2): [True: 0, False: 9.05k]
  |  Branch (420:2): [True: 9.05k, False: 0]
  ------------------
  421|       |
  422|  9.05k|	for (;;) {
  423|  9.05k|		ret = sb->sb_iod->sbiod_io->sbi_read( sb->sb_iod, buf, len );
  424|       |
  425|  9.05k|#ifdef EINTR	
  426|  9.05k|		if ( ( ret < 0 ) && ( errno == EINTR ) ) continue;
  ------------------
  |  Branch (426:8): [True: 5, False: 9.05k]
  |  Branch (426:23): [True: 0, False: 5]
  ------------------
  427|  9.05k|#endif
  428|  9.05k|		break;
  429|  9.05k|	}
  430|       |
  431|  9.05k|	return ret;
  432|  9.05k|}
ber_int_sb_write:
  436|  7.02k|{
  437|  7.02k|	ber_slen_t		ret;
  438|       |
  439|  7.02k|	assert( buf != NULL );
  ------------------
  |  Branch (439:2): [True: 0, False: 7.02k]
  |  Branch (439:2): [True: 7.02k, False: 0]
  ------------------
  440|  7.02k|	assert( sb != NULL);
  ------------------
  |  Branch (440:2): [True: 0, False: 7.02k]
  |  Branch (440:2): [True: 7.02k, False: 0]
  ------------------
  441|  7.02k|	assert( sb->sb_iod != NULL );
  ------------------
  |  Branch (441:2): [True: 0, False: 7.02k]
  |  Branch (441:2): [True: 7.02k, False: 0]
  ------------------
  442|  7.02k|	assert( SOCKBUF_VALID( sb ) );
  ------------------
  |  Branch (442:2): [True: 0, False: 7.02k]
  |  Branch (442:2): [True: 7.02k, False: 0]
  ------------------
  443|       |
  444|  7.02k|	for (;;) {
  445|  7.02k|		ret = sb->sb_iod->sbiod_io->sbi_write( sb->sb_iod, buf, len );
  446|       |
  447|  7.02k|#ifdef EINTR	
  448|  7.02k|		if ( ( ret < 0 ) && ( errno == EINTR ) ) continue;
  ------------------
  |  Branch (448:8): [True: 0, False: 7.02k]
  |  Branch (448:23): [True: 0, False: 0]
  ------------------
  449|  7.02k|#endif
  450|  7.02k|		break;
  451|  7.02k|	}
  452|       |
  453|  7.02k|	return ret;
  454|  7.02k|}
sockbuf.c:sb_stream_setup:
  551|  3.39k|sb_stream_setup( Sockbuf_IO_Desc *sbiod, void *arg ) {
  552|  3.39k|	assert( sbiod != NULL );
  ------------------
  |  Branch (552:2): [True: 0, False: 3.39k]
  |  Branch (552:2): [True: 3.39k, False: 0]
  ------------------
  553|       |
  554|  3.39k|	if ( arg != NULL ) {
  ------------------
  |  Branch (554:7): [True: 0, False: 3.39k]
  ------------------
  555|      0|		sbiod->sbiod_sb->sb_fd = *((int *)arg);
  556|      0|	}
  557|  3.39k|	return 0;
  558|  3.39k|}
sockbuf.c:sb_stream_ctrl:
  561|  13.7k|sb_stream_ctrl( Sockbuf_IO_Desc *sbiod, int opt, void *arg ) {
  562|       |	/* This is an end IO descriptor */
  563|  13.7k|	return 0;
  564|  13.7k|}
sockbuf.c:sb_stream_read:
  462|  9.05k|{
  463|  9.05k|	assert( sbiod != NULL);
  ------------------
  |  Branch (463:2): [True: 0, False: 9.05k]
  |  Branch (463:2): [True: 9.05k, False: 0]
  ------------------
  464|  9.05k|	assert( SOCKBUF_VALID( sbiod->sbiod_sb ) );
  ------------------
  |  Branch (464:2): [True: 0, False: 9.05k]
  |  Branch (464:2): [True: 9.05k, False: 0]
  ------------------
  465|       |
  466|       |#if defined(MACOS)
  467|       |/*
  468|       | * MacTCP/OpenTransport
  469|       | */
  470|       |	return tcpread( sbiod->sbiod_sb->sb_fd, 0, (unsigned char *)buf,
  471|       |		len, NULL );
  472|       |
  473|       |#elif defined( HAVE_PCNFS ) || \
  474|       |   defined( HAVE_WINSOCK ) || defined ( __BEOS__ )
  475|       |/*
  476|       | * PCNFS (under DOS)
  477|       | */
  478|       |/*
  479|       | * Windows Socket API (under DOS/Windows 3.x)
  480|       | */
  481|       |/*
  482|       | * 32-bit Windows Socket API (under Windows NT or Windows 95)
  483|       | */
  484|       |	return recv( sbiod->sbiod_sb->sb_fd, buf, len, 0 );
  485|       |
  486|       |#elif defined( HAVE_NCSA )
  487|       |/*
  488|       | * NCSA Telnet TCP/IP stack (under DOS)
  489|       | */
  490|       |	return nread( sbiod->sbiod_sb->sb_fd, buf, len );
  491|       |
  492|       |#else
  493|  9.05k|	return read( sbiod->sbiod_sb->sb_fd, buf, len );
  494|  9.05k|#endif
  495|  9.05k|}
sockbuf.c:sb_stream_write:
  499|  7.02k|{
  500|  7.02k|	assert( sbiod != NULL);
  ------------------
  |  Branch (500:2): [True: 0, False: 7.02k]
  |  Branch (500:2): [True: 7.02k, False: 0]
  ------------------
  501|  7.02k|	assert( SOCKBUF_VALID( sbiod->sbiod_sb ) );
  ------------------
  |  Branch (501:2): [True: 0, False: 7.02k]
  |  Branch (501:2): [True: 7.02k, False: 0]
  ------------------
  502|       |
  503|       |#if defined(MACOS) 
  504|       |/*
  505|       | * MacTCP/OpenTransport
  506|       | */
  507|       |#define MAX_WRITE	65535
  508|       |	return tcpwrite( sbiod->sbiod_sb->sb_fd, (unsigned char *)buf,
  509|       |		(len<MAX_WRITE) ? len : MAX_WRITE );
  510|       |
  511|       |#elif defined( HAVE_PCNFS) \
  512|       |	|| defined( HAVE_WINSOCK) || defined ( __BEOS__ )
  513|       |/*
  514|       | * PCNFS (under DOS)
  515|       | */
  516|       |/*
  517|       | * Windows Socket API (under DOS/Windows 3.x)
  518|       | */
  519|       |/*
  520|       | * 32-bit Windows Socket API (under Windows NT or Windows 95)
  521|       | */
  522|       |	return send( sbiod->sbiod_sb->sb_fd, buf, len, 0 );
  523|       |
  524|       |#elif defined(HAVE_NCSA)
  525|       |	return netwrite( sbiod->sbiod_sb->sb_fd, buf, len );
  526|       |
  527|       |#elif defined(VMS)
  528|       |/*
  529|       | * VMS -- each write must be 64K or smaller
  530|       | */
  531|       |#define MAX_WRITE 65535
  532|       |	return write( sbiod->sbiod_sb->sb_fd, buf,
  533|       |		(len<MAX_WRITE) ? len : MAX_WRITE);
  534|       |#else
  535|  7.02k|	return write( sbiod->sbiod_sb->sb_fd, buf, len );
  536|  7.02k|#endif   
  537|  7.02k|}   
sockbuf.c:sb_stream_close:
  541|  3.39k|{
  542|  3.39k|	assert( sbiod != NULL );
  ------------------
  |  Branch (542:2): [True: 0, False: 3.39k]
  |  Branch (542:2): [True: 3.39k, False: 0]
  ------------------
  543|  3.39k|	assert( SOCKBUF_VALID( sbiod->sbiod_sb ) );
  ------------------
  |  Branch (543:2): [True: 0, False: 3.39k]
  |  Branch (543:2): [True: 3.39k, False: 0]
  ------------------
  544|  3.39k|	if ( sbiod->sbiod_sb->sb_fd != AC_SOCKET_INVALID )
  ------------------
  |  |  163|  3.39k|#	define AC_SOCKET_INVALID	(-1)
  ------------------
  |  Branch (544:7): [True: 3.39k, False: 0]
  ------------------
  545|       |		tcp_close( sbiod->sbiod_sb->sb_fd );
  ------------------
  |  |  143|  3.39k|#		define tcp_close( s )	(shutdown( s, SHUT_RDWR ), close( s ))
  ------------------
  546|  3.39k|   return 0;
  547|  3.39k|}
sockbuf.c:sb_debug_setup:
  794|  6.78k|{
  795|  6.78k|	assert( sbiod != NULL );
  ------------------
  |  Branch (795:2): [True: 0, False: 6.78k]
  |  Branch (795:2): [True: 6.78k, False: 0]
  ------------------
  796|       |	
  797|  6.78k|	if ( arg == NULL ) arg = "sockbuf_";
  ------------------
  |  Branch (797:7): [True: 0, False: 6.78k]
  ------------------
  798|       |
  799|  6.78k|	sbiod->sbiod_pvt = LBER_MALLOC( strlen( arg ) + 1 );
  ------------------
  |  |  198|  6.78k|#define LBER_MALLOC(s)		ber_memalloc((s))
  ------------------
  800|  6.78k|	if ( sbiod->sbiod_pvt == NULL ) return -1;
  ------------------
  |  Branch (800:7): [True: 0, False: 6.78k]
  ------------------
  801|       |
  802|  6.78k|	strcpy( (char *)sbiod->sbiod_pvt, (char *)arg );
  803|  6.78k|	return 0;
  804|  6.78k|}
sockbuf.c:sb_debug_remove:
  808|  6.78k|{
  809|  6.78k|	assert( sbiod != NULL );
  ------------------
  |  Branch (809:2): [True: 0, False: 6.78k]
  |  Branch (809:2): [True: 6.78k, False: 0]
  ------------------
  810|  6.78k|	assert( sbiod->sbiod_pvt != NULL );
  ------------------
  |  Branch (810:2): [True: 0, False: 6.78k]
  |  Branch (810:2): [True: 6.78k, False: 0]
  ------------------
  811|       |
  812|  6.78k|	LBER_FREE( sbiod->sbiod_pvt );
  ------------------
  |  |  201|  6.78k|#define LBER_FREE(p)		ber_memfree((p))	
  ------------------
  813|       |	sbiod->sbiod_pvt = NULL;
  814|  6.78k|	return 0;
  815|  6.78k|}
sockbuf.c:sb_debug_ctrl:
  819|  13.7k|{
  820|  13.7k|	return LBER_SBIOD_CTRL_NEXT( sbiod, opt, arg );
  ------------------
  |  |  207|  13.7k|	( (sbiod)->sbiod_next ? \
  |  |  ------------------
  |  |  |  Branch (207:4): [True: 13.7k, False: 0]
  |  |  ------------------
  |  |  208|  13.7k|		( (sbiod)->sbiod_next->sbiod_io->sbi_ctrl( \
  |  |  209|  13.7k|		(sbiod)->sbiod_next, opt, arg ) ) : 0 )
  ------------------
  821|  13.7k|}
sockbuf.c:sb_debug_read:
  825|  9.05k|{
  826|  9.05k|	ber_slen_t		ret;
  827|  9.05k|	char ebuf[128];
  828|       |
  829|  9.05k|	ret = LBER_SBIOD_READ_NEXT( sbiod, buf, len );
  ------------------
  |  |  201|  9.05k|	( (sbiod)->sbiod_next->sbiod_io->sbi_read( (sbiod)->sbiod_next, \
  |  |  202|  9.05k|		buf, len ) )
  ------------------
  830|  9.05k|	if (sbiod->sbiod_sb->sb_debug & LDAP_DEBUG_PACKETS) {
  ------------------
  |  |  135|  9.05k|#define	sb_debug		sb_opts.lbo_debug
  ------------------
              	if (sbiod->sbiod_sb->sb_debug & LDAP_DEBUG_PACKETS) {
  ------------------
  |  |  108|  9.05k|#define LDAP_DEBUG_PACKETS	0x0002
  ------------------
  |  Branch (830:6): [True: 0, False: 9.05k]
  ------------------
  831|      0|		int err = sock_errno();
  ------------------
  |  |   84|      0|#define sock_errno()	errno
  ------------------
  832|      0|		if ( ret < 0 ) {
  ------------------
  |  Branch (832:8): [True: 0, False: 0]
  ------------------
  833|      0|			ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
  ------------------
  |  |  173|      0|#define ber_log_printf ber_pvt_log_printf
  ------------------
              			ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
  ------------------
  |  |  108|      0|#define LDAP_DEBUG_PACKETS	0x0002
  ------------------
              			ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
  ------------------
  |  |  135|      0|#define	sb_debug		sb_opts.lbo_debug
  ------------------
  834|      0|				"%sread: want=%ld error=%s\n", (char *)sbiod->sbiod_pvt,
  835|      0|				(long)len, AC_STRERROR_R( err, ebuf, sizeof ebuf ) );
  ------------------
  |  |  108|      0|#	define AC_STRERROR_R(e,b,l)		(strerror_r((e), (b), (l)) == 0 ? (b) : "Unknown error")
  |  |  ------------------
  |  |  |  Branch (108:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  836|      0|		} else {
  837|      0|			ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
  ------------------
  |  |  173|      0|#define ber_log_printf ber_pvt_log_printf
  ------------------
              			ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
  ------------------
  |  |  108|      0|#define LDAP_DEBUG_PACKETS	0x0002
  ------------------
              			ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
  ------------------
  |  |  135|      0|#define	sb_debug		sb_opts.lbo_debug
  ------------------
  838|      0|				"%sread: want=%ld, got=%ld\n", (char *)sbiod->sbiod_pvt,
  839|      0|				(long)len, (long)ret );
  840|      0|			ber_log_bprint( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
  ------------------
  |  |  108|      0|#define LDAP_DEBUG_PACKETS	0x0002
  ------------------
              			ber_log_bprint( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
  ------------------
  |  |  135|      0|#define	sb_debug		sb_opts.lbo_debug
  ------------------
  841|      0|				(const char *)buf, ret );
  842|      0|		}
  843|       |		sock_errset(err);
  ------------------
  |  |   86|      0|#define sock_errset(e)	((void) (errno = (e)))
  ------------------
  844|      0|	}
  845|  9.05k|	return ret;
  846|  9.05k|}
sockbuf.c:sb_debug_write:
  850|  7.02k|{
  851|  7.02k|	ber_slen_t		ret;
  852|  7.02k|	char ebuf[128];
  853|       |
  854|  7.02k|	ret = LBER_SBIOD_WRITE_NEXT( sbiod, buf, len );
  ------------------
  |  |  204|  7.02k|	( (sbiod)->sbiod_next->sbiod_io->sbi_write( (sbiod)->sbiod_next, \
  |  |  205|  7.02k|		buf, len ) )
  ------------------
  855|  7.02k|	if (sbiod->sbiod_sb->sb_debug & LDAP_DEBUG_PACKETS) {
  ------------------
  |  |  135|  7.02k|#define	sb_debug		sb_opts.lbo_debug
  ------------------
              	if (sbiod->sbiod_sb->sb_debug & LDAP_DEBUG_PACKETS) {
  ------------------
  |  |  108|  7.02k|#define LDAP_DEBUG_PACKETS	0x0002
  ------------------
  |  Branch (855:6): [True: 0, False: 7.02k]
  ------------------
  856|      0|		int err = sock_errno();
  ------------------
  |  |   84|      0|#define sock_errno()	errno
  ------------------
  857|      0|		if ( ret < 0 ) {
  ------------------
  |  Branch (857:8): [True: 0, False: 0]
  ------------------
  858|      0|			ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
  ------------------
  |  |  173|      0|#define ber_log_printf ber_pvt_log_printf
  ------------------
              			ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
  ------------------
  |  |  108|      0|#define LDAP_DEBUG_PACKETS	0x0002
  ------------------
              			ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
  ------------------
  |  |  135|      0|#define	sb_debug		sb_opts.lbo_debug
  ------------------
  859|      0|				"%swrite: want=%ld error=%s\n",
  860|      0|				(char *)sbiod->sbiod_pvt, (long)len,
  861|      0|				AC_STRERROR_R( err, ebuf, sizeof ebuf ) );
  ------------------
  |  |  108|      0|#	define AC_STRERROR_R(e,b,l)		(strerror_r((e), (b), (l)) == 0 ? (b) : "Unknown error")
  |  |  ------------------
  |  |  |  Branch (108:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  862|      0|		} else {
  863|      0|			ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
  ------------------
  |  |  173|      0|#define ber_log_printf ber_pvt_log_printf
  ------------------
              			ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
  ------------------
  |  |  108|      0|#define LDAP_DEBUG_PACKETS	0x0002
  ------------------
              			ber_log_printf( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
  ------------------
  |  |  135|      0|#define	sb_debug		sb_opts.lbo_debug
  ------------------
  864|      0|				"%swrite: want=%ld, written=%ld\n",
  865|      0|				(char *)sbiod->sbiod_pvt, (long)len, (long)ret );
  866|      0|			ber_log_bprint( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
  ------------------
  |  |  108|      0|#define LDAP_DEBUG_PACKETS	0x0002
  ------------------
              			ber_log_bprint( LDAP_DEBUG_PACKETS, sbiod->sbiod_sb->sb_debug,
  ------------------
  |  |  135|      0|#define	sb_debug		sb_opts.lbo_debug
  ------------------
  867|      0|				(const char *)buf, ret );
  868|      0|		}
  869|      0|		sock_errset(err);
  ------------------
  |  |   86|      0|#define sock_errset(e)	((void) (errno = (e)))
  ------------------
  870|      0|	}
  871|       |
  872|  7.02k|	return ret;
  873|  7.02k|}

ldap_abandon_ext:
   68|    769|{
   69|    769|	int	rc;
   70|       |
   71|    769|	Debug1( LDAP_DEBUG_TRACE, "ldap_abandon_ext %d\n", msgid );
  ------------------
  |  |   92|    769|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|    769|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|    769|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|    769|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 769]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|    769|	ldap_log_printf( NULL, (level), fmt, arg1 ); \
  |  |   94|    769|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 769]
  |  |  ------------------
  ------------------
   72|       |
   73|       |	/* check client controls */
   74|    769|	LDAP_MUTEX_LOCK( &ld->ld_req_mutex );
  ------------------
  |  |  551|    769|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
   75|       |
   76|    769|	rc = ldap_int_client_controls( ld, cctrls );
   77|    769|	if ( rc == LDAP_SUCCESS ) {
  ------------------
  |  |  610|    769|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (77:7): [True: 769, False: 0]
  ------------------
   78|    769|		rc = do_abandon( ld, msgid, NULL, sctrls, 1 );
   79|    769|	}
   80|       |
   81|    769|	LDAP_MUTEX_UNLOCK( &ld->ld_req_mutex );
  ------------------
  |  |  552|    769|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
   82|       |
   83|    769|	return rc;
   84|    769|}
ldap_int_bisect_find:
  338|  2.87k|{
  339|  2.87k|	int		begin,
  340|  2.87k|			end,
  341|  2.87k|			rc = 0;
  342|       |
  343|  2.87k|	assert( id >= 0 );
  ------------------
  |  Branch (343:2): [True: 0, False: 2.87k]
  |  Branch (343:2): [True: 2.87k, False: 0]
  ------------------
  344|       |
  345|  2.87k|	begin = 0;
  346|  2.87k|	end = n - 1;
  347|       |
  348|  2.87k|		if ( n <= 0 || id < v[ begin ] ) {
  ------------------
  |  Branch (348:8): [True: 2.87k, False: 0]
  |  Branch (348:18): [True: 0, False: 0]
  ------------------
  349|  2.87k|			*idxp = 0;
  350|       |
  351|  2.87k|		} else if ( id > v[ end ] ) {
  ------------------
  |  Branch (351:15): [True: 0, False: 0]
  ------------------
  352|      0|			*idxp = n;
  353|       |
  354|      0|		} else {
  355|      0|			int		pos;
  356|      0|			ber_int_t	curid;
  357|       |	
  358|      0|			do {
  359|      0|				pos = (begin + end)/2;
  360|      0|				curid = v[ pos ];
  361|       |	
  362|      0|				if ( id < curid ) {
  ------------------
  |  Branch (362:10): [True: 0, False: 0]
  ------------------
  363|      0|					end = pos - 1;
  364|       |	
  365|      0|				} else if ( id > curid ) {
  ------------------
  |  Branch (365:17): [True: 0, False: 0]
  ------------------
  366|      0|					begin = ++pos;
  367|       |	
  368|      0|				} else {
  369|       |					/* already abandoned? */
  370|      0|					rc = 1;
  371|      0|					break;
  372|      0|				}
  373|      0|			} while ( end >= begin );
  ------------------
  |  Branch (373:14): [True: 0, False: 0]
  ------------------
  374|       |	
  375|      0|			*idxp = pos;
  376|      0|		}
  377|       |
  378|  2.87k|	return rc;
  379|  2.87k|}
ldap_int_bisect_insert:
  396|    769|{
  397|    769|	ber_int_t	*v;
  398|    769|	ber_len_t	n;
  399|    769|	int		i;
  400|       |
  401|    769|	assert( vp != NULL );
  ------------------
  |  Branch (401:2): [True: 0, False: 769]
  |  Branch (401:2): [True: 769, False: 0]
  ------------------
  402|    769|	assert( np != NULL );
  ------------------
  |  Branch (402:2): [True: 0, False: 769]
  |  Branch (402:2): [True: 769, False: 0]
  ------------------
  403|    769|	assert( idx >= 0 );
  ------------------
  |  Branch (403:2): [True: 0, False: 769]
  |  Branch (403:2): [True: 769, False: 0]
  ------------------
  404|    769|	assert( (unsigned) idx <= *np );
  ------------------
  |  Branch (404:2): [True: 0, False: 769]
  |  Branch (404:2): [True: 769, False: 0]
  ------------------
  405|       |
  406|    769|	n = *np;
  407|       |
  408|    769|	v = ber_memrealloc( *vp, sizeof( ber_int_t ) * ( n + 1 ) );
  409|    769|	if ( v == NULL ) {
  ------------------
  |  Branch (409:7): [True: 0, False: 769]
  ------------------
  410|      0|		return -1;
  411|      0|	}
  412|    769|	*vp = v;
  413|       |
  414|    769|	for ( i = n; i > idx; i-- ) {
  ------------------
  |  Branch (414:15): [True: 0, False: 769]
  ------------------
  415|      0|		v[ i ] = v[ i - 1 ];
  416|      0|	}
  417|    769|	v[ idx ] = id;
  418|    769|	++(*np);
  419|       |
  420|    769|	return 0;
  421|    769|}
abandon.c:do_abandon:
  127|    769|{
  128|    769|	BerElement	*ber;
  129|    769|	int		i, err;
  130|    769|	ber_int_t	msgid = origid;
  131|    769|	Sockbuf		*sb;
  132|    769|	LDAPRequest	needle = {0};
  133|       |
  134|    769|	needle.lr_msgid = origid;
  135|       |
  136|    769|	if ( lr != NULL ) {
  ------------------
  |  Branch (136:7): [True: 0, False: 769]
  ------------------
  137|      0|		msgid = lr->lr_msgid;
  138|      0|		Debug2( LDAP_DEBUG_TRACE, "do_abandon origid %d, msgid %d\n",
  ------------------
  |  |   97|      0|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      0|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|      0|	ldap_log_printf( NULL, (level), fmt, arg1, arg2 ); \
  |  |   99|      0|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (99:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  139|      0|				origid, msgid );
  140|    769|	} else if ( (lr = ldap_tavl_find( ld->ld_requests, &needle, ldap_req_cmp )) != NULL ) {
  ------------------
  |  |  454|    769|#define	ld_requests		ldc->ldc_requests
  ------------------
  |  Branch (140:14): [True: 729, False: 40]
  ------------------
  141|    729|		Debug2( LDAP_DEBUG_TRACE, "do_abandon origid %d, msgid %d\n",
  ------------------
  |  |   97|    729|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|    729|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|    729|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|    729|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 729]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|    729|	ldap_log_printf( NULL, (level), fmt, arg1, arg2 ); \
  |  |   99|    729|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (99:12): [Folded, False: 729]
  |  |  ------------------
  ------------------
  142|    729|				origid, msgid );
  143|    729|		if ( lr->lr_parent != NULL ) {
  ------------------
  |  Branch (143:8): [True: 0, False: 729]
  ------------------
  144|       |			/* don't let caller abandon child requests! */
  145|      0|			ld->ld_errno = LDAP_PARAM_ERROR;
  ------------------
  |  |  744|      0|#define LDAP_PARAM_ERROR				(-9)
  ------------------
  146|      0|			return( LDAP_PARAM_ERROR );
  ------------------
  |  |  744|      0|#define LDAP_PARAM_ERROR				(-9)
  ------------------
  147|      0|		}
  148|    729|		msgid = lr->lr_msgid;
  149|    729|	}
  150|       |
  151|    769|	if ( lr != NULL ) {
  ------------------
  |  Branch (151:7): [True: 729, False: 40]
  ------------------
  152|    729|		LDAPRequest **childp = &lr->lr_child;
  153|       |
  154|    729|		needle.lr_msgid = lr->lr_msgid;
  155|       |
  156|    729|		if ( lr->lr_status != LDAP_REQST_INPROGRESS ) {
  ------------------
  |  |  386|    729|#define LDAP_REQST_INPROGRESS	1
  ------------------
  |  Branch (156:8): [True: 0, False: 729]
  ------------------
  157|       |			/* no need to send abandon message */
  158|      0|			sendabandon = 0;
  159|      0|		}
  160|       |
  161|    729|		while ( *childp ) {
  ------------------
  |  Branch (161:11): [True: 0, False: 729]
  ------------------
  162|       |			/* Abandon children */
  163|      0|			LDAPRequest *child = *childp;
  164|       |
  165|      0|			(void)do_abandon( ld, lr->lr_origid, child, sctrls, sendabandon );
  166|      0|			if ( *childp == child ) {
  ------------------
  |  Branch (166:9): [True: 0, False: 0]
  ------------------
  167|      0|				childp = &child->lr_refnext;
  168|      0|			}
  169|      0|		}
  170|    729|	}
  171|       |
  172|       |	/* ldap_msgdelete locks the res_mutex. Give up the req_mutex
  173|       |	 * while we're in there.
  174|       |	 */
  175|    769|	LDAP_MUTEX_UNLOCK( &ld->ld_req_mutex );
  ------------------
  |  |  552|    769|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  176|    769|	err = ldap_msgdelete( ld, msgid );
  177|    769|	LDAP_MUTEX_LOCK( &ld->ld_req_mutex );
  ------------------
  |  |  551|    769|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  178|    769|	if ( err == 0 ) {
  ------------------
  |  Branch (178:7): [True: 0, False: 769]
  ------------------
  179|      0|		ld->ld_errno = LDAP_SUCCESS;
  ------------------
  |  |  610|      0|#define LDAP_SUCCESS				0x00
  ------------------
  180|      0|		return LDAP_SUCCESS;
  ------------------
  |  |  610|      0|#define LDAP_SUCCESS				0x00
  ------------------
  181|      0|	}
  182|       |
  183|       |	/* fetch again the request that we are abandoning */
  184|    769|	if ( lr != NULL ) {
  ------------------
  |  Branch (184:7): [True: 729, False: 40]
  ------------------
  185|    729|		lr = ldap_tavl_find( ld->ld_requests, &needle, ldap_req_cmp );
  ------------------
  |  |  454|    729|#define	ld_requests		ldc->ldc_requests
  ------------------
  186|    729|	}
  187|       |
  188|    769|	err = 0;
  189|    769|	if ( sendabandon ) {
  ------------------
  |  Branch (189:7): [True: 769, False: 0]
  ------------------
  190|    769|		if ( ber_sockbuf_ctrl( ld->ld_sb, LBER_SB_OPT_GET_FD, NULL ) == -1 ) {
  ------------------
  |  |  440|    769|#define ld_sb			ldc->ldc_sb
  ------------------
              		if ( ber_sockbuf_ctrl( ld->ld_sb, LBER_SB_OPT_GET_FD, NULL ) == -1 ) {
  ------------------
  |  |  134|    769|#define LBER_SB_OPT_GET_FD		1
  ------------------
  |  Branch (190:8): [True: 0, False: 769]
  ------------------
  191|       |			/* not connected */
  192|      0|			err = -1;
  193|      0|			ld->ld_errno = LDAP_SERVER_DOWN;
  ------------------
  |  |  736|      0|#define LDAP_SERVER_DOWN				(-1)
  ------------------
  194|       |
  195|    769|		} else if ( ( ber = ldap_alloc_ber_with_options( ld ) ) == NULL ) {
  ------------------
  |  Branch (195:15): [True: 0, False: 769]
  ------------------
  196|       |			/* BER element allocation failed */
  197|      0|			err = -1;
  198|      0|			ld->ld_errno = LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  199|       |
  200|    769|		} else {
  201|       |			/*
  202|       |			 * We already have the mutex in LDAP_R_COMPILE, so
  203|       |			 * don't try to get it again.
  204|       |			 *		LDAP_NEXT_MSGID(ld, i);
  205|       |			 */
  206|       |
  207|    769|			LDAP_NEXT_MSGID(ld, i);
  ------------------
  |  |  561|    769|#define	LDAP_NEXT_MSGID(ld, id) do { \
  |  |  562|    769|	LDAP_MUTEX_LOCK( &(ld)->ld_msgid_mutex ); \
  |  |  ------------------
  |  |  |  |  551|    769|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  |  |  ------------------
  |  |  563|    769|	(id) = ++(ld)->ld_msgid; \
  |  |  ------------------
  |  |  |  |  447|    769|#define	ld_msgid		ldc->ldc_msgid
  |  |  ------------------
  |  |  564|    769|	LDAP_MUTEX_UNLOCK( &(ld)->ld_msgid_mutex ); \
  |  |  ------------------
  |  |  |  |  552|    769|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  |  |  ------------------
  |  |  565|    769|} while (0)
  |  |  ------------------
  |  |  |  Branch (565:10): [Folded, False: 769]
  |  |  ------------------
  ------------------
  208|       |#ifdef LDAP_CONNECTIONLESS
  209|       |			if ( LDAP_IS_UDP(ld) ) {
  210|       |				struct sockaddr_storage sa = {0};
  211|       |				/* dummy, filled with ldo_peer in request.c */
  212|       |				err = ber_write( ber, (char *) &sa, sizeof(sa), 0 );
  213|       |			}
  214|       |			if ( LDAP_IS_UDP(ld) && ld->ld_options.ldo_version ==
  215|       |				LDAP_VERSION2 )
  216|       |			{
  217|       |				char *dn;
  218|       |				LDAP_MUTEX_LOCK( &ld->ld_options.ldo_mutex );
  219|       |				dn = ld->ld_options.ldo_cldapdn;
  220|       |				if (!dn) dn = "";
  221|       |				err = ber_printf( ber, "{isti",  /* '}' */
  222|       |					i, dn,
  223|       |					LDAP_REQ_ABANDON, msgid );
  224|       |				LDAP_MUTEX_UNLOCK( &ld->ld_options.ldo_mutex );
  225|       |			} else
  226|       |#endif
  227|    769|			{
  228|       |				/* create a message to send */
  229|    769|				err = ber_printf( ber, "{iti",  /* '}' */
  230|    769|					i,
  231|    769|					LDAP_REQ_ABANDON, msgid );
  ------------------
  |  |  530|    769|#define LDAP_REQ_ABANDON	((ber_tag_t) 0x50U)	/* application + primitive   */
  ------------------
  232|    769|			}
  233|       |
  234|    769|			if ( err == -1 ) {
  ------------------
  |  Branch (234:9): [True: 0, False: 769]
  ------------------
  235|       |				/* encoding error */
  236|      0|				ld->ld_errno = LDAP_ENCODING_ERROR;
  ------------------
  |  |  738|      0|#define LDAP_ENCODING_ERROR				(-3)
  ------------------
  237|       |
  238|    769|			} else {
  239|       |				/* Put Server Controls */
  240|    769|				if ( ldap_int_put_controls( ld, sctrls, ber )
  ------------------
  |  Branch (240:10): [True: 0, False: 769]
  ------------------
  241|    769|					!= LDAP_SUCCESS )
  ------------------
  |  |  610|    769|#define LDAP_SUCCESS				0x00
  ------------------
  242|      0|				{
  243|      0|					err = -1;
  244|       |
  245|    769|				} else {
  246|       |					/* close '{' */
  247|    769|					err = ber_printf( ber, /*{*/ "N}" );
  248|       |
  249|    769|					if ( err == -1 ) {
  ------------------
  |  Branch (249:11): [True: 0, False: 769]
  ------------------
  250|       |						/* encoding error */
  251|      0|						ld->ld_errno = LDAP_ENCODING_ERROR;
  ------------------
  |  |  738|      0|#define LDAP_ENCODING_ERROR				(-3)
  ------------------
  252|      0|					}
  253|    769|				}
  254|    769|			}
  255|       |
  256|    769|			if ( err == -1 ) {
  ------------------
  |  Branch (256:9): [True: 0, False: 769]
  ------------------
  257|      0|				ber_free( ber, 1 );
  258|       |
  259|    769|			} else {
  260|       |				/* send the message */
  261|    769|				if ( lr != NULL ) {
  ------------------
  |  Branch (261:10): [True: 729, False: 40]
  ------------------
  262|    729|					assert( lr->lr_conn != NULL );
  ------------------
  |  Branch (262:6): [True: 0, False: 729]
  |  Branch (262:6): [True: 729, False: 0]
  ------------------
  263|    729|					sb = lr->lr_conn->lconn_sb;
  264|    729|				} else {
  265|     40|					sb = ld->ld_sb;
  ------------------
  |  |  440|     40|#define ld_sb			ldc->ldc_sb
  ------------------
  266|     40|				}
  267|       |
  268|    769|				if ( ber_flush2( sb, ber, LBER_FLUSH_FREE_ALWAYS ) != 0 ) {
  ------------------
  |  |  479|    769|#define LBER_FLUSH_FREE_ALWAYS		(LBER_FLUSH_FREE_ON_SUCCESS|LBER_FLUSH_FREE_ON_ERROR)
  |  |  ------------------
  |  |  |  |  477|    769|#define LBER_FLUSH_FREE_ON_SUCCESS	(0x1)	/* traditional behavior */
  |  |  ------------------
  |  |               #define LBER_FLUSH_FREE_ALWAYS		(LBER_FLUSH_FREE_ON_SUCCESS|LBER_FLUSH_FREE_ON_ERROR)
  |  |  ------------------
  |  |  |  |  478|    769|#define LBER_FLUSH_FREE_ON_ERROR	(0x2)
  |  |  ------------------
  ------------------
  |  Branch (268:10): [True: 0, False: 769]
  ------------------
  269|      0|					ld->ld_errno = LDAP_SERVER_DOWN;
  ------------------
  |  |  736|      0|#define LDAP_SERVER_DOWN				(-1)
  ------------------
  270|      0|					err = -1;
  271|    769|				} else {
  272|    769|					err = 0;
  273|    769|				}
  274|    769|			}
  275|    769|		}
  276|    769|	}
  277|       |
  278|    769|	if ( lr != NULL ) {
  ------------------
  |  Branch (278:7): [True: 729, False: 40]
  ------------------
  279|    729|		LDAPConn *lc;
  280|    729|		int freeconn = 0;
  281|    729|		if ( sendabandon || lr->lr_status == LDAP_REQST_WRITING ) {
  ------------------
  |  |  389|      0|#define LDAP_REQST_WRITING	4
  ------------------
  |  Branch (281:8): [True: 729, False: 0]
  |  Branch (281:23): [True: 0, False: 0]
  ------------------
  282|    729|			freeconn = 1;
  283|    729|			lc = lr->lr_conn;
  284|    729|		}
  285|    729|		if ( origid == msgid ) {
  ------------------
  |  Branch (285:8): [True: 729, False: 0]
  ------------------
  286|    729|			ldap_free_request( ld, lr );
  287|       |
  288|    729|		} else {
  289|      0|			lr->lr_abandoned = 1;
  290|      0|		}
  291|       |
  292|    729|		if ( freeconn ) {
  ------------------
  |  Branch (292:8): [True: 729, False: 0]
  ------------------
  293|       |			/* release ld_req_mutex while grabbing ld_conn_mutex to
  294|       |			 * prevent deadlock.
  295|       |			 */
  296|    729|			LDAP_MUTEX_UNLOCK( &ld->ld_req_mutex );
  ------------------
  |  |  552|    729|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  297|    729|			LDAP_MUTEX_LOCK( &ld->ld_conn_mutex );
  ------------------
  |  |  551|    729|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  298|    729|			ldap_free_connection( ld, lc, 0, 1 );
  299|    729|			LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex );
  ------------------
  |  |  552|    729|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  300|    729|			LDAP_MUTEX_LOCK( &ld->ld_req_mutex );
  ------------------
  |  |  551|    729|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  301|    729|		}
  302|    729|	}
  303|       |
  304|    769|	LDAP_MUTEX_LOCK( &ld->ld_abandon_mutex );
  ------------------
  |  |  551|    769|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  305|       |
  306|       |	/* use bisection */
  307|    769|	i = 0;
  308|    769|	if ( ld->ld_nabandoned == 0 ||
  ------------------
  |  |  460|    769|#define	ld_nabandoned		ldc->ldc_nabandoned
  ------------------
  |  Branch (308:7): [True: 769, False: 0]
  ------------------
  309|      0|		ldap_int_bisect_find( ld->ld_abandoned, ld->ld_nabandoned, msgid, &i ) == 0 )
  ------------------
  |  |  461|      0|#define	ld_abandoned		ldc->ldc_abandoned
  ------------------
              		ldap_int_bisect_find( ld->ld_abandoned, ld->ld_nabandoned, msgid, &i ) == 0 )
  ------------------
  |  |  460|      0|#define	ld_nabandoned		ldc->ldc_nabandoned
  ------------------
  |  Branch (309:3): [True: 0, False: 0]
  ------------------
  310|    769|	{
  311|    769|		ldap_int_bisect_insert( &ld->ld_abandoned, &ld->ld_nabandoned, msgid, i );
  ------------------
  |  |  461|    769|#define	ld_abandoned		ldc->ldc_abandoned
  ------------------
              		ldap_int_bisect_insert( &ld->ld_abandoned, &ld->ld_nabandoned, msgid, i );
  ------------------
  |  |  460|    769|#define	ld_nabandoned		ldc->ldc_nabandoned
  ------------------
  312|    769|	}
  313|       |
  314|    769|	if ( err != -1 ) {
  ------------------
  |  Branch (314:7): [True: 769, False: 0]
  ------------------
  315|    769|		ld->ld_errno = LDAP_SUCCESS;
  ------------------
  |  |  610|    769|#define LDAP_SUCCESS				0x00
  ------------------
  316|    769|	}
  317|       |
  318|    769|	LDAP_MUTEX_UNLOCK( &ld->ld_abandon_mutex );
  ------------------
  |  |  552|    769|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  319|    769|	return( ld->ld_errno );
  320|    769|}

ldap_charray_free:
  113|  3.39k|{
  114|  3.39k|	char	**p;
  115|       |
  116|  3.39k|	if ( a == NULL ) {
  ------------------
  |  Branch (116:7): [True: 0, False: 3.39k]
  ------------------
  117|      0|		return;
  118|      0|	}
  119|       |
  120|  6.78k|	for ( p = a; *p != NULL; p++ ) {
  ------------------
  |  Branch (120:15): [True: 3.39k, False: 3.39k]
  ------------------
  121|  3.39k|		if ( *p != NULL ) {
  ------------------
  |  Branch (121:8): [True: 3.39k, False: 0]
  ------------------
  122|  3.39k|			LDAP_FREE( *p );
  ------------------
  |  |  648|  3.39k|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  123|  3.39k|		}
  124|  3.39k|	}
  125|       |
  126|       |	LDAP_FREE( (char *) a );
  ------------------
  |  |  648|  3.39k|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  127|  3.39k|}
ldap_str2charray:
  181|  5.77k|{
  182|  5.77k|	char	**res;
  183|  5.77k|	char	*str, *s;
  184|  5.77k|	char	*lasts;
  185|  5.77k|	int	i;
  186|       |
  187|       |	/* protect the input string from strtok */
  188|  5.77k|	str = LDAP_STRDUP( str_in );
  ------------------
  |  |  650|  5.77k|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  189|  5.77k|	if( str == NULL ) {
  ------------------
  |  Branch (189:6): [True: 0, False: 5.77k]
  ------------------
  190|      0|		return NULL;
  191|      0|	}
  192|       |
  193|  5.77k|	i = 1;
  194|  7.78k|	for ( s = str; ; LDAP_UTF8_INCR(s) ) {
  ------------------
  |  |  110|  2.01k|#define LDAP_UTF8_INCR(p) ((p) = LDAP_UTF8_NEXT(p))
  |  |  ------------------
  |  |  |  |  107|  2.01k|#define LDAP_UTF8_NEXT(p) (	LDAP_UTF8_ISASCII(p) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   89|  2.01k|#define LDAP_UTF8_ISASCII(p) ( !(*(const unsigned char *)(p) & 0x80 ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (89:30): [True: 2.01k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  108|  2.01k|	? (char *)(p)+1 : ldap_utf8_next((p)) )
  |  |  ------------------
  ------------------
  195|  7.78k|		s = ldap_utf8_strpbrk( s, brkstr );
  196|  7.78k|		if ( !s ) break;
  ------------------
  |  Branch (196:8): [True: 5.77k, False: 2.01k]
  ------------------
  197|  2.01k|		i++;
  198|  2.01k|	}
  199|       |
  200|  5.77k|	res = (char **) LDAP_MALLOC( (i + 1) * sizeof(char *) );
  ------------------
  |  |  645|  5.77k|#define LDAP_MALLOC(s)		(ber_memalloc_x((s),NULL))
  ------------------
  201|       |
  202|  5.77k|	if( res == NULL ) {
  ------------------
  |  Branch (202:6): [True: 0, False: 5.77k]
  ------------------
  203|      0|		LDAP_FREE( str );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  204|      0|		return NULL;
  205|      0|	}
  206|       |
  207|  5.77k|	i = 0;
  208|       |
  209|  5.77k|	for ( s = ldap_utf8_strtok( str, brkstr, &lasts );
  210|  12.6k|		s != NULL;
  ------------------
  |  Branch (210:3): [True: 6.84k, False: 5.77k]
  ------------------
  211|  6.84k|		s = ldap_utf8_strtok( NULL, brkstr, &lasts ) )
  212|  6.84k|	{
  213|  6.84k|		res[i] = LDAP_STRDUP( s );
  ------------------
  |  |  650|  6.84k|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  214|       |
  215|  6.84k|		if(res[i] == NULL) {
  ------------------
  |  Branch (215:6): [True: 0, False: 6.84k]
  ------------------
  216|      0|			for( --i ; i >= 0 ; i-- ) {
  ------------------
  |  Branch (216:15): [True: 0, False: 0]
  ------------------
  217|      0|				LDAP_FREE( res[i] );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  218|      0|			}
  219|      0|			LDAP_FREE( res );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  220|      0|			LDAP_FREE( str );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  221|      0|			return NULL;
  222|      0|		}
  223|       |
  224|  6.84k|		i++;
  225|  6.84k|	}
  226|       |
  227|  5.77k|	res[i] = NULL;
  228|       |
  229|       |	LDAP_FREE( str );
  ------------------
  |  |  648|  5.77k|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  230|  5.77k|	return( res );
  231|  5.77k|}

ldap_int_put_controls:
   93|  7.02k|{
   94|  7.02k|	LDAPControl *const *c;
   95|       |
   96|  7.02k|	assert( ld != NULL );
  ------------------
  |  Branch (96:2): [True: 0, False: 7.02k]
  |  Branch (96:2): [True: 7.02k, False: 0]
  ------------------
   97|  7.02k|	assert( LDAP_VALID( ld ) );
  ------------------
  |  Branch (97:2): [True: 0, False: 7.02k]
  |  Branch (97:2): [True: 7.02k, False: 0]
  ------------------
   98|  7.02k|	assert( ber != NULL );
  ------------------
  |  Branch (98:2): [True: 0, False: 7.02k]
  |  Branch (98:2): [True: 7.02k, False: 0]
  ------------------
   99|       |
  100|  7.02k|	if( ctrls == NULL ) {
  ------------------
  |  Branch (100:6): [True: 7.02k, False: 0]
  ------------------
  101|       |		/* use default server controls */
  102|  7.02k|		ctrls = ld->ld_sctrls;
  ------------------
  |  |  500|  7.02k|#define ld_sctrls		ld_options.ldo_sctrls
  |  |  ------------------
  |  |  |  |  484|  7.02k|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
  103|  7.02k|	}
  104|       |
  105|  7.02k|	if( ctrls == NULL || *ctrls == NULL ) {
  ------------------
  |  Branch (105:6): [True: 7.02k, False: 0]
  |  Branch (105:23): [True: 0, False: 0]
  ------------------
  106|  7.02k|		return LDAP_SUCCESS;
  ------------------
  |  |  610|  7.02k|#define LDAP_SUCCESS				0x00
  ------------------
  107|  7.02k|	}
  108|       |
  109|      0|	if ( ld->ld_version < LDAP_VERSION3 ) {
  ------------------
  |  |  509|      0|#define ld_version		ld_options.ldo_version
  |  |  ------------------
  |  |  |  |  484|      0|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
              	if ( ld->ld_version < LDAP_VERSION3 ) {
  ------------------
  |  |   39|      0|#define LDAP_VERSION3	3
  ------------------
  |  Branch (109:7): [True: 0, False: 0]
  ------------------
  110|       |		/* LDAPv2 doesn't support controls,
  111|       |		 * error if any control is critical
  112|       |		 */
  113|      0|		for( c = ctrls ; *c != NULL; c++ ) {
  ------------------
  |  Branch (113:20): [True: 0, False: 0]
  ------------------
  114|      0|			if( (*c)->ldctl_iscritical ) {
  ------------------
  |  Branch (114:8): [True: 0, False: 0]
  ------------------
  115|      0|				ld->ld_errno = LDAP_NOT_SUPPORTED;
  ------------------
  |  |  747|      0|#define LDAP_NOT_SUPPORTED				(-12)
  ------------------
  116|      0|				return ld->ld_errno;
  117|      0|			}
  118|      0|		}
  119|       |
  120|      0|		return LDAP_SUCCESS;
  ------------------
  |  |  610|      0|#define LDAP_SUCCESS				0x00
  ------------------
  121|      0|	}
  122|       |
  123|       |	/* Controls are encoded as a sequence of sequences */
  124|      0|	if( ber_printf( ber, "t{"/*}*/, LDAP_TAG_CONTROLS ) == -1 ) {
  ------------------
  |  |  504|      0|#define LDAP_TAG_CONTROLS	((ber_tag_t) 0xa0U)	/* context specific + constructed + 0 */
  ------------------
  |  Branch (124:6): [True: 0, False: 0]
  ------------------
  125|      0|		ld->ld_errno = LDAP_ENCODING_ERROR;
  ------------------
  |  |  738|      0|#define LDAP_ENCODING_ERROR				(-3)
  ------------------
  126|      0|		return ld->ld_errno;
  127|      0|	}
  128|       |
  129|      0|	for( c = ctrls ; *c != NULL; c++ ) {
  ------------------
  |  Branch (129:19): [True: 0, False: 0]
  ------------------
  130|      0|		ld->ld_errno = ldap_pvt_put_control( *c, ber );
  131|      0|		if ( ld->ld_errno != LDAP_SUCCESS ) {
  ------------------
  |  |  610|      0|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (131:8): [True: 0, False: 0]
  ------------------
  132|      0|			return ld->ld_errno;
  133|      0|		}
  134|      0|	}
  135|       |
  136|       |
  137|      0|	if( ber_printf( ber, /*{*/ "}" ) == -1 ) {
  ------------------
  |  Branch (137:6): [True: 0, False: 0]
  ------------------
  138|      0|		ld->ld_errno = LDAP_ENCODING_ERROR;
  ------------------
  |  |  738|      0|#define LDAP_ENCODING_ERROR				(-3)
  ------------------
  139|      0|		return ld->ld_errno;
  140|      0|	}
  141|       |
  142|      0|	return LDAP_SUCCESS;
  ------------------
  |  |  610|      0|#define LDAP_SUCCESS				0x00
  ------------------
  143|      0|}
ldap_pvt_get_controls:
  148|  1.88k|{
  149|  1.88k|	int nctrls;
  150|  1.88k|	ber_tag_t tag;
  151|  1.88k|	ber_len_t len;
  152|  1.88k|	char *opaque;
  153|       |
  154|  1.88k|	assert( ber != NULL );
  ------------------
  |  Branch (154:2): [True: 0, False: 1.88k]
  |  Branch (154:2): [True: 1.88k, False: 0]
  ------------------
  155|       |
  156|  1.88k|	if( ctrls == NULL ) {
  ------------------
  |  Branch (156:6): [True: 1.88k, False: 0]
  ------------------
  157|  1.88k|		return LDAP_SUCCESS;
  ------------------
  |  |  610|  1.88k|#define LDAP_SUCCESS				0x00
  ------------------
  158|  1.88k|	}
  159|      0|	*ctrls = NULL;
  160|       |
  161|      0|	len = ber_pvt_ber_remaining( ber );
  ------------------
  |  |  126|      0|#define ber_pvt_ber_remaining(ber)	((ber)->ber_end - (ber)->ber_ptr)
  ------------------
  162|       |
  163|      0|	if( len == 0) {
  ------------------
  |  Branch (163:6): [True: 0, False: 0]
  ------------------
  164|       |		/* no controls */
  165|      0|		return LDAP_SUCCESS;
  ------------------
  |  |  610|      0|#define LDAP_SUCCESS				0x00
  ------------------
  166|      0|	}
  167|       |
  168|      0|	if(( tag = ber_peek_tag( ber, &len )) != LDAP_TAG_CONTROLS ) {
  ------------------
  |  |  504|      0|#define LDAP_TAG_CONTROLS	((ber_tag_t) 0xa0U)	/* context specific + constructed + 0 */
  ------------------
  |  Branch (168:5): [True: 0, False: 0]
  ------------------
  169|      0|		if( tag == LBER_ERROR ) {
  ------------------
  |  |   79|      0|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  |  Branch (169:7): [True: 0, False: 0]
  ------------------
  170|       |			/* decoding error */
  171|      0|			return LDAP_DECODING_ERROR;
  ------------------
  |  |  739|      0|#define LDAP_DECODING_ERROR				(-4)
  ------------------
  172|      0|		}
  173|       |
  174|       |		/* ignore unexpected input */
  175|      0|		return LDAP_SUCCESS;
  ------------------
  |  |  610|      0|#define LDAP_SUCCESS				0x00
  ------------------
  176|      0|	}
  177|       |
  178|       |	/* set through each element */
  179|      0|	nctrls = 0;
  180|      0|	*ctrls = LDAP_MALLOC( 1 * sizeof(LDAPControl *) );
  ------------------
  |  |  645|      0|#define LDAP_MALLOC(s)		(ber_memalloc_x((s),NULL))
  ------------------
  181|       |
  182|      0|	if( *ctrls == NULL ) {
  ------------------
  |  Branch (182:6): [True: 0, False: 0]
  ------------------
  183|      0|		return LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  184|      0|	}
  185|       |
  186|      0|	*ctrls[nctrls] = NULL;
  187|       |
  188|      0|	for( tag = ber_first_element( ber, &len, &opaque );
  189|      0|		tag != LBER_ERROR;
  ------------------
  |  |   79|      0|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  |  Branch (189:3): [True: 0, False: 0]
  ------------------
  190|      0|		tag = ber_next_element( ber, &len, opaque ) )
  191|      0|	{
  192|      0|		LDAPControl *tctrl;
  193|      0|		LDAPControl **tctrls;
  194|       |
  195|      0|		tctrl = LDAP_CALLOC( 1, sizeof(LDAPControl) );
  ------------------
  |  |  646|      0|#define LDAP_CALLOC(n,s)	(ber_memcalloc_x((n),(s),NULL))
  ------------------
  196|       |
  197|       |		/* allocate pointer space for current controls (nctrls)
  198|       |		 * + this control + extra NULL
  199|       |		 */
  200|      0|		tctrls = (tctrl == NULL) ? NULL :
  ------------------
  |  Branch (200:12): [True: 0, False: 0]
  ------------------
  201|      0|			LDAP_REALLOC(*ctrls, (nctrls+2) * sizeof(LDAPControl *));
  ------------------
  |  |  647|      0|#define LDAP_REALLOC(p,s)	(ber_memrealloc_x((p),(s),NULL))
  ------------------
  202|       |
  203|      0|		if( tctrls == NULL ) {
  ------------------
  |  Branch (203:7): [True: 0, False: 0]
  ------------------
  204|       |			/* one of the above allocation failed */
  205|       |
  206|      0|			if( tctrl != NULL ) {
  ------------------
  |  Branch (206:8): [True: 0, False: 0]
  ------------------
  207|      0|				LDAP_FREE( tctrl );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  208|      0|			}
  209|       |
  210|      0|			ldap_controls_free(*ctrls);
  211|      0|			*ctrls = NULL;
  212|       |
  213|      0|			return LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  214|      0|		}
  215|       |
  216|       |
  217|      0|		tctrls[nctrls++] = tctrl;
  218|      0|		tctrls[nctrls] = NULL;
  219|       |
  220|      0|		tag = ber_scanf( ber, "{a" /*}*/, &tctrl->ldctl_oid );
  221|       |
  222|      0|		if( tag == LBER_ERROR ) {
  ------------------
  |  |   79|      0|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  |  Branch (222:7): [True: 0, False: 0]
  ------------------
  223|      0|			*ctrls = NULL;
  224|      0|			ldap_controls_free( tctrls );
  225|      0|			return LDAP_DECODING_ERROR;
  ------------------
  |  |  739|      0|#define LDAP_DECODING_ERROR				(-4)
  ------------------
  226|      0|		}
  227|       |
  228|      0|		tag = ber_peek_tag( ber, &len );
  229|       |
  230|      0|		if( tag == LBER_BOOLEAN ) {
  ------------------
  |  |   83|      0|#define LBER_BOOLEAN		((ber_tag_t) 0x01UL)
  ------------------
  |  Branch (230:7): [True: 0, False: 0]
  ------------------
  231|      0|			ber_int_t crit;
  232|      0|			tag = ber_scanf( ber, "b", &crit );
  233|      0|			tctrl->ldctl_iscritical = crit ? (char) 0 : (char) ~0;
  ------------------
  |  Branch (233:30): [True: 0, False: 0]
  ------------------
  234|      0|			tag = ber_peek_tag( ber, &len );
  235|      0|		}
  236|       |
  237|      0|		if( tag == LBER_OCTETSTRING ) {
  ------------------
  |  |   86|      0|#define LBER_OCTETSTRING	((ber_tag_t) 0x04UL)
  ------------------
  |  Branch (237:7): [True: 0, False: 0]
  ------------------
  238|      0|			tag = ber_scanf( ber, "o", &tctrl->ldctl_value );
  239|      0|		} else {
  240|      0|			BER_BVZERO( &tctrl->ldctl_value );
  ------------------
  |  |  208|      0|	do { \
  |  |  209|      0|		(bv)->bv_len = 0; \
  |  |  210|      0|		(bv)->bv_val = NULL; \
  |  |  211|      0|	} while (0)
  |  |  ------------------
  |  |  |  Branch (211:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  241|      0|		}
  242|       |
  243|      0|		*ctrls = tctrls;
  244|      0|	}
  245|       |		
  246|      0|	return LDAP_SUCCESS;
  ------------------
  |  |  610|      0|#define LDAP_SUCCESS				0x00
  ------------------
  247|      0|}
ldap_int_client_controls:
  529|  8.79k|{
  530|  8.79k|	LDAPControl *const *c;
  531|       |
  532|  8.79k|	assert( ld != NULL );
  ------------------
  |  Branch (532:2): [True: 0, False: 8.79k]
  |  Branch (532:2): [True: 8.79k, False: 0]
  ------------------
  533|  8.79k|	assert( LDAP_VALID( ld ) );
  ------------------
  |  Branch (533:2): [True: 0, False: 8.79k]
  |  Branch (533:2): [True: 8.79k, False: 0]
  ------------------
  534|       |
  535|  8.79k|	if( ctrls == NULL ) {
  ------------------
  |  Branch (535:6): [True: 8.79k, False: 0]
  ------------------
  536|       |		/* use default client controls */
  537|  8.79k|		ctrls = ld->ld_cctrls;
  ------------------
  |  |  501|  8.79k|#define ld_cctrls		ld_options.ldo_cctrls
  |  |  ------------------
  |  |  |  |  484|  8.79k|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
  538|  8.79k|	}
  539|       |
  540|  8.79k|	if( ctrls == NULL || *ctrls == NULL ) {
  ------------------
  |  Branch (540:6): [True: 8.79k, False: 0]
  |  Branch (540:23): [True: 0, False: 0]
  ------------------
  541|  8.79k|		return LDAP_SUCCESS;
  ------------------
  |  |  610|  8.79k|#define LDAP_SUCCESS				0x00
  ------------------
  542|  8.79k|	}
  543|       |
  544|      0|	for( c = ctrls ; *c != NULL; c++ ) {
  ------------------
  |  Branch (544:19): [True: 0, False: 0]
  ------------------
  545|      0|		if( (*c)->ldctl_iscritical ) {
  ------------------
  |  Branch (545:7): [True: 0, False: 0]
  ------------------
  546|      0|			ld->ld_errno = LDAP_NOT_SUPPORTED;
  ------------------
  |  |  747|      0|#define LDAP_NOT_SUPPORTED				(-12)
  ------------------
  547|      0|			return ld->ld_errno;
  548|      0|		}
  549|      0|	}
  550|       |
  551|      0|	return LDAP_SUCCESS;
  ------------------
  |  |  610|      0|#define LDAP_SUCCESS				0x00
  ------------------
  552|      0|}

ldap_int_sasl_close:
 1310|  3.39k|{ return LDAP_SUCCESS; }
  ------------------
  |  |  610|  3.39k|#define LDAP_SUCCESS				0x00
  ------------------

ldap_int_error_init:
   28|      1|void ldap_int_error_init( void ) {
   29|      1|}
ldap_err2string:
   33|  2.50k|{
   34|  2.50k|	char *m;
   35|       |
   36|  2.50k|	Debug0( LDAP_DEBUG_TRACE, "ldap_err2string\n" );
  ------------------
  |  |   87|  2.50k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  2.50k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.50k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  2.50k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 2.50k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|  2.50k|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|  2.50k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 2.50k]
  |  |  ------------------
  ------------------
   37|       |
   38|  2.50k|	switch ( err ) {
   39|      0|#	define C(code, message) case code: m = message; break
   40|       |
   41|       |	/* LDAPv3 (RFC 4511) codes */
   42|      0|	C(LDAP_SUCCESS,					N_("Success"));
  ------------------
  |  |   39|      0|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 0, False: 2.50k]
  |  |  ------------------
  ------------------
   43|      1|	C(LDAP_OPERATIONS_ERROR, 		N_("Operations error"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   44|      2|	C(LDAP_PROTOCOL_ERROR, 			N_("Protocol error"));
  ------------------
  |  |   39|      2|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 2, False: 2.50k]
  |  |  ------------------
  ------------------
   45|      1|	C(LDAP_TIMELIMIT_EXCEEDED,		N_("Time limit exceeded"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   46|      0|	C(LDAP_SIZELIMIT_EXCEEDED, 		N_("Size limit exceeded"));
  ------------------
  |  |   39|      0|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 0, False: 2.50k]
  |  |  ------------------
  ------------------
   47|      1|	C(LDAP_COMPARE_FALSE, 			N_("Compare False"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   48|      1|	C(LDAP_COMPARE_TRUE, 			N_("Compare True"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   49|      1|	C(LDAP_STRONG_AUTH_NOT_SUPPORTED,N_("Authentication method not supported"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   50|      1|	C(LDAP_STRONG_AUTH_REQUIRED,	N_("Strong(er) authentication required"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   51|       |
   52|      1|	C(LDAP_REFERRAL,				N_("Referral"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   53|      1|	C(LDAP_ADMINLIMIT_EXCEEDED,		N_("Administrative limit exceeded"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   54|      1|	C(LDAP_UNAVAILABLE_CRITICAL_EXTENSION,
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   55|      0|									N_("Critical extension is unavailable"));
   56|      1|	C(LDAP_CONFIDENTIALITY_REQUIRED,N_("Confidentiality required"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   57|      1|	C(LDAP_SASL_BIND_IN_PROGRESS,	N_("SASL bind in progress"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   58|       |
   59|      1|	C(LDAP_NO_SUCH_ATTRIBUTE, 		N_("No such attribute"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   60|      1|	C(LDAP_UNDEFINED_TYPE, 			N_("Undefined attribute type"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   61|      1|	C(LDAP_INAPPROPRIATE_MATCHING, 	N_("Inappropriate matching"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   62|      1|	C(LDAP_CONSTRAINT_VIOLATION, 	N_("Constraint violation"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   63|      1|	C(LDAP_TYPE_OR_VALUE_EXISTS, 	N_("Type or value exists"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   64|      1|	C(LDAP_INVALID_SYNTAX, 			N_("Invalid syntax"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   65|       |
   66|      1|	C(LDAP_NO_SUCH_OBJECT, 			N_("No such object"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   67|      1|	C(LDAP_ALIAS_PROBLEM, 			N_("Alias problem"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   68|      1|	C(LDAP_INVALID_DN_SYNTAX,		N_("Invalid DN syntax"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   69|       |
   70|      1|	C(LDAP_ALIAS_DEREF_PROBLEM,	 	N_("Alias dereferencing problem"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   71|       |
   72|      1|	C(LDAP_INAPPROPRIATE_AUTH, 		N_("Inappropriate authentication"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   73|      1|	C(LDAP_INVALID_CREDENTIALS, 	N_("Invalid credentials"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   74|      1|	C(LDAP_INSUFFICIENT_ACCESS, 	N_("Insufficient access"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   75|      1|	C(LDAP_BUSY, 					N_("Server is busy"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   76|      1|	C(LDAP_UNAVAILABLE, 			N_("Server is unavailable"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   77|      1|	C(LDAP_UNWILLING_TO_PERFORM, 	N_("Server is unwilling to perform"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   78|      1|	C(LDAP_LOOP_DETECT, 			N_("Loop detected"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   79|       |
   80|      1|	C(LDAP_NAMING_VIOLATION, 		N_("Naming violation"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   81|      1|	C(LDAP_OBJECT_CLASS_VIOLATION, 	N_("Object class violation"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   82|      1|	C(LDAP_NOT_ALLOWED_ON_NONLEAF, 	N_("Operation not allowed on non-leaf"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   83|      1|	C(LDAP_NOT_ALLOWED_ON_RDN,	 	N_("Operation not allowed on RDN"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   84|      1|	C(LDAP_ALREADY_EXISTS, 			N_("Already exists"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   85|      1|	C(LDAP_NO_OBJECT_CLASS_MODS, 	N_("Cannot modify object class"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   86|       |
   87|      1|	C(LDAP_AFFECTS_MULTIPLE_DSAS,	N_("Operation affects multiple DSAs"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   88|       |
   89|       |	/* Virtual List View draft */
   90|      1|	C(LDAP_VLV_ERROR,				N_("Virtual List View error"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   91|       |
   92|      1|	C(LDAP_OTHER, N_("Other (e.g., implementation specific) error"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   93|       |
   94|       |	/* LDAPv2 (RFC 1777) codes */
   95|      1|	C(LDAP_PARTIAL_RESULTS, N_("Partial results and referral received"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   96|      1|	C(LDAP_IS_LEAF, 				N_("Entry is a leaf"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
   97|       |
   98|       |	/* Connection-less LDAP (CLDAP - RFC 1798) code */
   99|      1|	C(LDAP_RESULTS_TOO_LARGE,		N_("Results too large"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  100|       |
  101|       |	/* Cancel Operation (RFC 3909) codes */
  102|      1|	C(LDAP_CANCELLED,				N_("Cancelled"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  103|      1|	C(LDAP_NO_SUCH_OPERATION,		N_("No Operation to Cancel"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  104|      1|	C(LDAP_TOO_LATE,				N_("Too Late to Cancel"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  105|      1|	C(LDAP_CANNOT_CANCEL,			N_("Cannot Cancel"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  106|       |
  107|       |	/* Assert Control (RFC 4528 and old internet-draft) codes */
  108|      1|	C(LDAP_ASSERTION_FAILED,		N_("Assertion Failed"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  109|      1|	C(LDAP_X_ASSERTION_FAILED,		N_("Assertion Failed (X)"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  110|       |
  111|       |	/* Proxied Authorization Control (RFC 4370 and I-D) codes */
  112|      1|	C(LDAP_PROXIED_AUTHORIZATION_DENIED, N_("Proxied Authorization Denied"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  113|      1|	C(LDAP_X_PROXY_AUTHZ_FAILURE,	N_("Proxy Authorization Failure (X)"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  114|       |
  115|       |	/* Content Sync Operation (RFC 4533 and I-D) codes */
  116|      1|	C(LDAP_SYNC_REFRESH_REQUIRED,	N_("Content Sync Refresh Required"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  117|      1|	C(LDAP_X_SYNC_REFRESH_REQUIRED,	N_("Content Sync Refresh Required (X)"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  118|       |
  119|       |	/* No-Op Control (draft-zeilenga-ldap-noop) code */
  120|      1|	C(LDAP_X_NO_OPERATION,			N_("No Operation (X)"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  121|       |
  122|       |	/* Client Update Protocol (RFC 3928) codes */
  123|      1|	C(LDAP_CUP_RESOURCES_EXHAUSTED,	N_("LCUP Resources Exhausted"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  124|      1|	C(LDAP_CUP_SECURITY_VIOLATION,	N_("LCUP Security Violation"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  125|      1|	C(LDAP_CUP_INVALID_DATA,		N_("LCUP Invalid Data"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  126|      1|	C(LDAP_CUP_UNSUPPORTED_SCHEME,	N_("LCUP Unsupported Scheme"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  127|      1|	C(LDAP_CUP_RELOAD_REQUIRED,		N_("LCUP Reload Required"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  128|       |
  129|      1|	C(LDAP_TXN_SPECIFY_OKAY,		N_("TXN specify okay"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  130|      1|	C(LDAP_TXN_ID_INVALID,			N_("TXN ID is invalid"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  131|       |
  132|       |	/* API codes - renumbered since draft-ietf-ldapext-ldap-c-api */
  133|  1.64k|	C(LDAP_SERVER_DOWN,				N_("Can't contact LDAP server"));
  ------------------
  |  |   39|  1.64k|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1.64k, False: 857]
  |  |  ------------------
  ------------------
  134|      1|	C(LDAP_LOCAL_ERROR,				N_("Local error"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  135|      1|	C(LDAP_ENCODING_ERROR,			N_("Encoding error"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  136|      1|	C(LDAP_DECODING_ERROR,			N_("Decoding error"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  137|      1|	C(LDAP_TIMEOUT,					N_("Timed out"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  138|      1|	C(LDAP_AUTH_UNKNOWN,			N_("Unknown authentication method"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  139|    375|	C(LDAP_FILTER_ERROR,			N_("Bad search filter"));
  ------------------
  |  |   39|    375|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 375, False: 2.12k]
  |  |  ------------------
  ------------------
  140|      1|	C(LDAP_USER_CANCELLED,			N_("User cancelled operation"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  141|    200|	C(LDAP_PARAM_ERROR,				N_("Bad parameter to an ldap routine"));
  ------------------
  |  |   39|    200|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 200, False: 2.30k]
  |  |  ------------------
  ------------------
  142|      1|	C(LDAP_NO_MEMORY,				N_("Out of memory"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  143|      1|	C(LDAP_CONNECT_ERROR,			N_("Connect error"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  144|      1|	C(LDAP_NOT_SUPPORTED,			N_("Not Supported"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  145|      1|	C(LDAP_CONTROL_NOT_FOUND,		N_("Control not found"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  146|      1|	C(LDAP_NO_RESULTS_RETURNED,		N_("No results returned"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  147|      1|	C(LDAP_MORE_RESULTS_TO_RETURN,	N_("More results to return"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  148|      1|	C(LDAP_CLIENT_LOOP,				N_("Client Loop"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  149|      1|	C(LDAP_REFERRAL_LIMIT_EXCEEDED,	N_("Referral Limit Exceeded"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  150|      1|	C(LDAP_X_CONNECTING,			N_("Connecting (X)"));
  ------------------
  |  |   39|      1|#	define C(code, message) case code: m = message; break
  |  |  ------------------
  |  |  |  Branch (39:27): [True: 1, False: 2.50k]
  |  |  ------------------
  ------------------
  151|      0|#	undef C
  152|       |
  153|    207|	default:
  ------------------
  |  Branch (153:2): [True: 207, False: 2.29k]
  ------------------
  154|    207|		m = (LDAP_API_ERROR(err) ? N_("Unknown API error")
  ------------------
  |  |  733|    207|#define LDAP_API_ERROR(n)		((n)<0)
  |  |  ------------------
  |  |  |  Branch (733:28): [True: 150, False: 57]
  |  |  ------------------
  ------------------
              		m = (LDAP_API_ERROR(err) ? N_("Unknown API error")
  ------------------
  |  |   37|    357|#	define N_(s)				s
  ------------------
  155|    207|			 : LDAP_E_ERROR(err) ? N_("Unknown (extension) error")
  ------------------
  |  |  698|     57|#define LDAP_E_ERROR(n)	LDAP_RANGE((n),0x1000,0x3FFF)
  |  |  ------------------
  |  |  |  |  612|    114|#define LDAP_RANGE(n,x,y)	(((x) <= (n)) && ((n) <= (y)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:28): [True: 51, False: 6]
  |  |  |  |  |  Branch (612:44): [True: 9, False: 42]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
              			 : LDAP_E_ERROR(err) ? N_("Unknown (extension) error")
  ------------------
  |  |   37|     66|#	define N_(s)				s
  ------------------
  156|     57|			 : LDAP_X_ERROR(err) ? N_("Unknown (private extension) error")
  ------------------
  |  |  705|     48|#define LDAP_X_ERROR(n)	LDAP_RANGE((n),0x4000,0xFFFF)
  |  |  ------------------
  |  |  |  |  612|     96|#define LDAP_RANGE(n,x,y)	(((x) <= (n)) && ((n) <= (y)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:28): [True: 42, False: 6]
  |  |  |  |  |  Branch (612:44): [True: 8, False: 34]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
              			 : LDAP_X_ERROR(err) ? N_("Unknown (private extension) error")
  ------------------
  |  |   37|     56|#	define N_(s)				s
  ------------------
  157|     48|			 : N_("Unknown error"));
  ------------------
  |  |   37|     40|#	define N_(s)				s
  ------------------
  158|    207|		break;
  159|  2.50k|	}
  160|       |
  161|  2.50k|	return _(m);
  ------------------
  |  |   36|  2.50k|#	define _(s)					s
  ------------------
  162|  2.50k|}
ldap_parse_result:
  242|  2.14k|{
  243|  2.14k|	LDAPMessage	*lm;
  244|  2.14k|	ber_int_t errcode = LDAP_SUCCESS;
  ------------------
  |  |  610|  2.14k|#define LDAP_SUCCESS				0x00
  ------------------
  245|       |
  246|  2.14k|	ber_tag_t tag;
  247|  2.14k|	BerElement	*ber;
  248|       |
  249|  2.14k|	Debug0( LDAP_DEBUG_TRACE, "ldap_parse_result\n" );
  ------------------
  |  |   87|  2.14k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  2.14k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.14k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  2.14k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 2.14k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|  2.14k|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|  2.14k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 2.14k]
  |  |  ------------------
  ------------------
  250|       |
  251|  2.14k|	assert( ld != NULL );
  ------------------
  |  Branch (251:2): [True: 0, False: 2.14k]
  |  Branch (251:2): [True: 2.14k, False: 0]
  ------------------
  252|  2.14k|	assert( LDAP_VALID( ld ) );
  ------------------
  |  Branch (252:2): [True: 0, False: 2.14k]
  |  Branch (252:2): [True: 2.14k, False: 0]
  ------------------
  253|  2.14k|	assert( r != NULL );
  ------------------
  |  Branch (253:2): [True: 0, False: 2.14k]
  |  Branch (253:2): [True: 2.14k, False: 0]
  ------------------
  254|       |
  255|  2.14k|	if(errcodep != NULL) *errcodep = LDAP_SUCCESS;
  ------------------
  |  |  610|  2.14k|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (255:5): [True: 2.14k, False: 0]
  ------------------
  256|  2.14k|	if(matcheddnp != NULL) *matcheddnp = NULL;
  ------------------
  |  Branch (256:5): [True: 0, False: 2.14k]
  ------------------
  257|  2.14k|	if(errmsgp != NULL) *errmsgp = NULL;
  ------------------
  |  Branch (257:5): [True: 152, False: 1.99k]
  ------------------
  258|  2.14k|	if(referralsp != NULL) *referralsp = NULL;
  ------------------
  |  Branch (258:5): [True: 0, False: 2.14k]
  ------------------
  259|  2.14k|	if(serverctrls != NULL) *serverctrls = NULL;
  ------------------
  |  Branch (259:5): [True: 0, False: 2.14k]
  ------------------
  260|       |
  261|  2.14k|	LDAP_MUTEX_LOCK( &ld->ld_res_mutex );
  ------------------
  |  |  551|  2.14k|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  262|       |	/* Find the result, last msg in chain... */
  263|  2.14k|	lm = r->lm_chain_tail;
  264|  2.14k|	if ( lm != NULL && r->lm_msgid != lm->lm_msgid ) {
  ------------------
  |  Branch (264:7): [True: 2.14k, False: 0]
  |  Branch (264:21): [True: 0, False: 2.14k]
  ------------------
  265|       |		/*
  266|       |		 * ITS#10229: Returned with LDAP_MSG_ALL+LDAP_MSG_RECEIVED. People who
  267|       |		 * do that aren't expected to call ldap_parse_result not least because
  268|       |		 * they have no idea what the msgid of the result would be. Just do our
  269|       |		 * best.
  270|       |		 *
  271|       |		 * We could also return LDAP_NO_RESULTS_RETURNED if there isn't a
  272|       |		 * result for r's operation.
  273|       |		 */
  274|      0|		lm = r;
  275|      0|		for ( lm = r; lm; lm = lm->lm_chain ) {
  ------------------
  |  Branch (275:17): [True: 0, False: 0]
  ------------------
  276|      0|			if ( lm->lm_msgtype != LDAP_RES_SEARCH_ENTRY &&
  ------------------
  |  |  535|      0|#define LDAP_RES_SEARCH_ENTRY	((ber_tag_t) 0x64U)	/* application + constructed */
  ------------------
  |  Branch (276:9): [True: 0, False: 0]
  ------------------
  277|      0|					lm->lm_msgtype != LDAP_RES_SEARCH_REFERENCE &&
  ------------------
  |  |  536|      0|#define LDAP_RES_SEARCH_REFERENCE	((ber_tag_t) 0x73U)	/* V3: application + constructed */
  ------------------
  |  Branch (277:6): [True: 0, False: 0]
  ------------------
  278|      0|					lm->lm_msgtype != LDAP_RES_INTERMEDIATE )
  ------------------
  |  |  546|      0|#define LDAP_RES_INTERMEDIATE	((ber_tag_t) 0x79U) /* V3+: application + constructed */
  ------------------
  |  Branch (278:6): [True: 0, False: 0]
  ------------------
  279|      0|				break;
  280|      0|		}
  281|      0|	}
  282|       |
  283|       |	/* FIXME: either this is not possible (assert?)
  284|       |	 * or it should be handled */
  285|  2.14k|	if ( lm != NULL ) {
  ------------------
  |  Branch (285:7): [True: 2.14k, False: 0]
  ------------------
  286|  2.14k|		switch ( lm->lm_msgtype ) {
  287|    190|		case LDAP_RES_SEARCH_ENTRY:
  ------------------
  |  |  535|    190|#define LDAP_RES_SEARCH_ENTRY	((ber_tag_t) 0x64U)	/* application + constructed */
  ------------------
  |  Branch (287:3): [True: 190, False: 1.95k]
  ------------------
  288|    192|		case LDAP_RES_SEARCH_REFERENCE:
  ------------------
  |  |  536|    192|#define LDAP_RES_SEARCH_REFERENCE	((ber_tag_t) 0x73U)	/* V3: application + constructed */
  ------------------
  |  Branch (288:3): [True: 2, False: 2.14k]
  ------------------
  289|    194|		case LDAP_RES_INTERMEDIATE:
  ------------------
  |  |  546|    194|#define LDAP_RES_INTERMEDIATE	((ber_tag_t) 0x79U) /* V3+: application + constructed */
  ------------------
  |  Branch (289:3): [True: 2, False: 2.14k]
  ------------------
  290|    194|			lm = NULL;
  291|    194|			break;
  292|       |
  293|  1.94k|		default:
  ------------------
  |  Branch (293:3): [True: 1.94k, False: 194]
  ------------------
  294|  1.94k|			break;
  295|  2.14k|		}
  296|  2.14k|	}
  297|       |
  298|  2.14k|	if( lm == NULL ) {
  ------------------
  |  Branch (298:6): [True: 194, False: 1.94k]
  ------------------
  299|    194|		errcode = ld->ld_errno = LDAP_NO_RESULTS_RETURNED;
  ------------------
  |  |  749|    194|#define LDAP_NO_RESULTS_RETURNED		(-14)
  ------------------
  300|    194|		LDAP_MUTEX_UNLOCK( &ld->ld_res_mutex );
  ------------------
  |  |  552|    194|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  301|    194|	    goto done;
  302|    194|	}
  303|       |
  304|  1.94k|	if ( ld->ld_error ) {
  ------------------
  |  Branch (304:7): [True: 87, False: 1.86k]
  ------------------
  305|     87|		LDAP_FREE( ld->ld_error );
  ------------------
  |  |  648|     87|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  306|     87|		ld->ld_error = NULL;
  307|     87|	}
  308|  1.94k|	if ( ld->ld_matched ) {
  ------------------
  |  Branch (308:7): [True: 104, False: 1.84k]
  ------------------
  309|    104|		LDAP_FREE( ld->ld_matched );
  ------------------
  |  |  648|    104|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  310|    104|		ld->ld_matched = NULL;
  311|    104|	}
  312|  1.94k|	if ( ld->ld_referrals ) {
  ------------------
  |  Branch (312:7): [True: 0, False: 1.94k]
  ------------------
  313|      0|		LDAP_VFREE( ld->ld_referrals );
  ------------------
  |  |  649|      0|#define LDAP_VFREE(v)		(ber_memvfree_x((void **)(v),NULL))
  ------------------
  314|      0|		ld->ld_referrals = NULL;
  315|      0|	}
  316|       |
  317|       |	/* parse results */
  318|       |
  319|  1.94k|	ber = ber_dup( lm->lm_ber );
  320|       |
  321|  1.94k|	if ( ld->ld_version < LDAP_VERSION2 ) {
  ------------------
  |  |  509|  1.94k|#define ld_version		ld_options.ldo_version
  |  |  ------------------
  |  |  |  |  484|  1.94k|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
              	if ( ld->ld_version < LDAP_VERSION2 ) {
  ------------------
  |  |   38|  1.94k|#define LDAP_VERSION2	2
  ------------------
  |  Branch (321:7): [True: 0, False: 1.94k]
  ------------------
  322|      0|		tag = ber_scanf( ber, "{iA}",
  323|      0|			&ld->ld_errno, &ld->ld_error );
  324|       |
  325|  1.94k|	} else {
  326|  1.94k|		ber_len_t len;
  327|       |
  328|  1.94k|		tag = ber_scanf( ber, "{iAA" /*}*/,
  329|  1.94k|			&ld->ld_errno, &ld->ld_matched, &ld->ld_error );
  330|       |
  331|  1.94k|		if( tag != LBER_ERROR ) {
  ------------------
  |  |   79|  1.94k|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  |  Branch (331:7): [True: 1.90k, False: 46]
  ------------------
  332|       |			/* peek for referrals */
  333|  1.90k|			if( ber_peek_tag(ber, &len) == LDAP_TAG_REFERRAL ) {
  ------------------
  |  |  505|  1.90k|#define LDAP_TAG_REFERRAL	((ber_tag_t) 0xa3U)	/* context specific + constructed + 3 */
  ------------------
  |  Branch (333:8): [True: 105, False: 1.79k]
  ------------------
  334|    105|				tag = ber_scanf( ber, "v", &ld->ld_referrals );
  335|    105|			}
  336|  1.90k|		}
  337|       |
  338|       |		/* need to clean out misc items */
  339|  1.94k|		if( tag != LBER_ERROR ) {
  ------------------
  |  |   79|  1.94k|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  |  Branch (339:7): [True: 1.88k, False: 59]
  ------------------
  340|  1.88k|			if( lm->lm_msgtype == LDAP_RES_BIND ) {
  ------------------
  |  |  534|  1.88k|#define LDAP_RES_BIND		((ber_tag_t) 0x61U)	/* application + constructed */
  ------------------
  |  Branch (340:8): [True: 1.35k, False: 535]
  ------------------
  341|       |				/* look for sasl result credentials */
  342|  1.35k|				if ( ber_peek_tag( ber, &len ) == LDAP_TAG_SASL_RES_CREDS ) {
  ------------------
  |  |  517|  1.35k|#define LDAP_TAG_SASL_RES_CREDS	((ber_tag_t) 0x87U)	/* context specific + primitive */
  ------------------
  |  Branch (342:10): [True: 4, False: 1.35k]
  ------------------
  343|       |					/* skip 'em */
  344|      4|					tag = ber_scanf( ber, "x" );
  345|      4|				}
  346|       |
  347|  1.35k|			} else if( lm->lm_msgtype == LDAP_RES_EXTENDED ) {
  ------------------
  |  |  545|    535|#define LDAP_RES_EXTENDED	((ber_tag_t) 0x78U)	/* V3: application + constructed */
  ------------------
  |  Branch (347:15): [True: 100, False: 435]
  ------------------
  348|       |				/* look for exop result oid or value */
  349|    100|				if ( ber_peek_tag( ber, &len ) == LDAP_TAG_EXOP_RES_OID ) {
  ------------------
  |  |  511|    100|#define LDAP_TAG_EXOP_RES_OID   ((ber_tag_t) 0x8aU)	/* context specific + primitive */
  ------------------
  |  Branch (349:10): [True: 1, False: 99]
  ------------------
  350|       |					/* skip 'em */
  351|      1|					tag = ber_scanf( ber, "x" );
  352|      1|				}
  353|       |
  354|    100|				if ( tag != LBER_ERROR &&
  ------------------
  |  |   79|    200|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  |  Branch (354:10): [True: 100, False: 0]
  ------------------
  355|    100|					ber_peek_tag( ber, &len ) == LDAP_TAG_EXOP_RES_VALUE )
  ------------------
  |  |  512|    100|#define LDAP_TAG_EXOP_RES_VALUE ((ber_tag_t) 0x8bU)	/* context specific + primitive */
  ------------------
  |  Branch (355:6): [True: 3, False: 97]
  ------------------
  356|      3|				{
  357|       |					/* skip 'em */
  358|      3|					tag = ber_scanf( ber, "x" );
  359|      3|				}
  360|    100|			}
  361|  1.88k|		}
  362|       |
  363|  1.94k|		if( tag != LBER_ERROR ) {
  ------------------
  |  |   79|  1.94k|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  |  Branch (363:7): [True: 1.88k, False: 59]
  ------------------
  364|  1.88k|			int rc = ldap_pvt_get_controls( ber, serverctrls );
  365|       |
  366|  1.88k|			if( rc != LDAP_SUCCESS ) {
  ------------------
  |  |  610|  1.88k|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (366:8): [True: 0, False: 1.88k]
  ------------------
  367|      0|				tag = LBER_ERROR;
  ------------------
  |  |   79|      0|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  368|      0|			}
  369|  1.88k|		}
  370|       |
  371|  1.94k|		if( tag != LBER_ERROR ) {
  ------------------
  |  |   79|  1.94k|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  |  Branch (371:7): [True: 1.88k, False: 59]
  ------------------
  372|  1.88k|			tag = ber_scanf( ber, /*{*/"}" );
  373|  1.88k|		}
  374|  1.94k|	}
  375|       |
  376|  1.94k|	if ( tag == LBER_ERROR ) {
  ------------------
  |  |   79|  1.94k|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  |  Branch (376:7): [True: 59, False: 1.88k]
  ------------------
  377|     59|		ld->ld_errno = errcode = LDAP_DECODING_ERROR;
  ------------------
  |  |  739|     59|#define LDAP_DECODING_ERROR				(-4)
  ------------------
  378|     59|	}
  379|       |
  380|  1.94k|	if( ber != NULL ) {
  ------------------
  |  Branch (380:6): [True: 1.94k, False: 0]
  ------------------
  381|  1.94k|		ber_free( ber, 0 );
  382|  1.94k|	}
  383|       |
  384|       |	/* return */
  385|  1.94k|	if( errcodep != NULL ) {
  ------------------
  |  Branch (385:6): [True: 1.94k, False: 0]
  ------------------
  386|  1.94k|		*errcodep = ld->ld_errno;
  387|  1.94k|	}
  388|  1.94k|	if ( errcode == LDAP_SUCCESS ) {
  ------------------
  |  |  610|  1.94k|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (388:7): [True: 1.88k, False: 59]
  ------------------
  389|  1.88k|		if( matcheddnp != NULL ) {
  ------------------
  |  Branch (389:7): [True: 0, False: 1.88k]
  ------------------
  390|      0|			if ( ld->ld_matched )
  ------------------
  |  Branch (390:9): [True: 0, False: 0]
  ------------------
  391|      0|			{
  392|      0|				*matcheddnp = LDAP_STRDUP( ld->ld_matched );
  ------------------
  |  |  650|      0|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  393|      0|			}
  394|      0|		}
  395|  1.88k|		if( errmsgp != NULL ) {
  ------------------
  |  Branch (395:7): [True: 151, False: 1.73k]
  ------------------
  396|    151|			if ( ld->ld_error )
  ------------------
  |  Branch (396:9): [True: 37, False: 114]
  ------------------
  397|     37|			{
  398|     37|				*errmsgp = LDAP_STRDUP( ld->ld_error );
  ------------------
  |  |  650|     37|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  399|     37|			}
  400|    151|		}
  401|       |
  402|  1.88k|		if( referralsp != NULL) {
  ------------------
  |  Branch (402:7): [True: 0, False: 1.88k]
  ------------------
  403|      0|			*referralsp = ldap_value_dup( ld->ld_referrals );
  404|      0|		}
  405|  1.88k|	}
  406|  1.94k|	LDAP_MUTEX_UNLOCK( &ld->ld_res_mutex );
  ------------------
  |  |  552|  1.94k|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  407|       |
  408|  2.14k|done:
  409|  2.14k|	if ( freeit ) {
  ------------------
  |  Branch (409:7): [True: 0, False: 2.14k]
  ------------------
  410|      0|		ldap_msgfree( r );
  411|      0|	}
  412|       |
  413|  2.14k|	return errcode;
  414|  1.94k|}

ldap_build_extended_req:
   36|     57|{
   37|     57|	BerElement *ber;
   38|     57|	int rc;
   39|       |
   40|       |	/* create a message to send */
   41|     57|	if ( (ber = ldap_alloc_ber_with_options( ld )) == NULL ) {
  ------------------
  |  Branch (41:7): [True: 0, False: 57]
  ------------------
   42|      0|		return( NULL );
   43|      0|	}
   44|       |
   45|     57|	LDAP_NEXT_MSGID( ld, *msgidp );
  ------------------
  |  |  561|     57|#define	LDAP_NEXT_MSGID(ld, id) do { \
  |  |  562|     57|	LDAP_MUTEX_LOCK( &(ld)->ld_msgid_mutex ); \
  |  |  ------------------
  |  |  |  |  551|     57|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  |  |  ------------------
  |  |  563|     57|	(id) = ++(ld)->ld_msgid; \
  |  |  ------------------
  |  |  |  |  447|     57|#define	ld_msgid		ldc->ldc_msgid
  |  |  ------------------
  |  |  564|     57|	LDAP_MUTEX_UNLOCK( &(ld)->ld_msgid_mutex ); \
  |  |  ------------------
  |  |  |  |  552|     57|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  |  |  ------------------
  |  |  565|     57|} while (0)
  |  |  ------------------
  |  |  |  Branch (565:10): [Folded, False: 57]
  |  |  ------------------
  ------------------
   46|     57|	if ( reqdata != NULL ) {
  ------------------
  |  Branch (46:7): [True: 0, False: 57]
  ------------------
   47|      0|		rc = ber_printf( ber, "{it{tstON}", /* '}' */
   48|      0|			*msgidp, LDAP_REQ_EXTENDED,
  ------------------
  |  |  531|      0|#define LDAP_REQ_EXTENDED	((ber_tag_t) 0x77U)	/* application + constructed */
  ------------------
   49|      0|			LDAP_TAG_EXOP_REQ_OID, reqoid,
  ------------------
  |  |  509|      0|#define LDAP_TAG_EXOP_REQ_OID   ((ber_tag_t) 0x80U)	/* context specific + primitive */
  ------------------
   50|      0|			LDAP_TAG_EXOP_REQ_VALUE, reqdata );
  ------------------
  |  |  510|      0|#define LDAP_TAG_EXOP_REQ_VALUE ((ber_tag_t) 0x81U)	/* context specific + primitive */
  ------------------
   51|       |
   52|     57|	} else {
   53|     57|		rc = ber_printf( ber, "{it{tsN}", /* '}' */
   54|     57|			*msgidp, LDAP_REQ_EXTENDED,
  ------------------
  |  |  531|     57|#define LDAP_REQ_EXTENDED	((ber_tag_t) 0x77U)	/* application + constructed */
  ------------------
   55|     57|			LDAP_TAG_EXOP_REQ_OID, reqoid );
  ------------------
  |  |  509|     57|#define LDAP_TAG_EXOP_REQ_OID   ((ber_tag_t) 0x80U)	/* context specific + primitive */
  ------------------
   56|     57|	}
   57|       |
   58|     57|	if( rc == -1 ) {
  ------------------
  |  Branch (58:6): [True: 0, False: 57]
  ------------------
   59|      0|		ld->ld_errno = LDAP_ENCODING_ERROR;
  ------------------
  |  |  738|      0|#define LDAP_ENCODING_ERROR				(-3)
  ------------------
   60|      0|		ber_free( ber, 1 );
   61|      0|		return( NULL );
   62|      0|	}
   63|       |
   64|       |	/* Put Server Controls */
   65|     57|	if( ldap_int_put_controls( ld, sctrls, ber ) != LDAP_SUCCESS ) {
  ------------------
  |  |  610|     57|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (65:6): [True: 0, False: 57]
  ------------------
   66|      0|		ber_free( ber, 1 );
   67|      0|		return( NULL );
   68|      0|	}
   69|       |
   70|     57|	if ( ber_printf( ber, /*{*/ "N}" ) == -1 ) {
  ------------------
  |  Branch (70:7): [True: 0, False: 57]
  ------------------
   71|      0|		ld->ld_errno = LDAP_ENCODING_ERROR;
  ------------------
  |  |  738|      0|#define LDAP_ENCODING_ERROR				(-3)
  ------------------
   72|      0|		ber_free( ber, 1 );
   73|      0|		return( NULL );
   74|      0|	}
   75|       |
   76|     57|	return( ber );
   77|     57|}
ldap_extended_operation:
  104|     57|{
  105|     57|	BerElement *ber;
  106|     57|	ber_int_t id;
  107|       |
  108|     57|	Debug0( LDAP_DEBUG_TRACE, "ldap_extended_operation\n" );
  ------------------
  |  |   87|     57|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|     57|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|     57|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|     57|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 57]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|     57|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|     57|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 57]
  |  |  ------------------
  ------------------
  109|       |
  110|     57|	assert( ld != NULL );
  ------------------
  |  Branch (110:2): [True: 0, False: 57]
  |  Branch (110:2): [True: 57, False: 0]
  ------------------
  111|     57|	assert( LDAP_VALID( ld ) );
  ------------------
  |  Branch (111:2): [True: 0, False: 57]
  |  Branch (111:2): [True: 57, False: 0]
  ------------------
  112|     57|	assert( reqoid != NULL && *reqoid != '\0' );
  ------------------
  |  Branch (112:2): [True: 0, False: 57]
  |  Branch (112:2): [True: 0, False: 0]
  |  Branch (112:2): [True: 57, False: 0]
  |  Branch (112:2): [True: 57, False: 0]
  ------------------
  113|     57|	assert( msgidp != NULL );
  ------------------
  |  Branch (113:2): [True: 0, False: 57]
  |  Branch (113:2): [True: 57, False: 0]
  ------------------
  114|       |
  115|       |	/* must be version 3 (or greater) */
  116|     57|	if ( ld->ld_version < LDAP_VERSION3 ) {
  ------------------
  |  |  509|     57|#define ld_version		ld_options.ldo_version
  |  |  ------------------
  |  |  |  |  484|     57|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
              	if ( ld->ld_version < LDAP_VERSION3 ) {
  ------------------
  |  |   39|     57|#define LDAP_VERSION3	3
  ------------------
  |  Branch (116:7): [True: 0, False: 57]
  ------------------
  117|      0|		ld->ld_errno = LDAP_NOT_SUPPORTED;
  ------------------
  |  |  747|      0|#define LDAP_NOT_SUPPORTED				(-12)
  ------------------
  118|      0|		return( ld->ld_errno );
  119|      0|	}
  120|       |
  121|     57|	ber = ldap_build_extended_req( ld, reqoid, reqdata,
  122|     57|		sctrls, cctrls, &id );
  123|     57|	if ( !ber )
  ------------------
  |  Branch (123:7): [True: 0, False: 57]
  ------------------
  124|      0|		return( ld->ld_errno );
  125|       |
  126|       |	/* send the message */
  127|     57|	*msgidp = ldap_send_initial_request( ld, LDAP_REQ_EXTENDED, NULL, ber, id );
  ------------------
  |  |  531|     57|#define LDAP_REQ_EXTENDED	((ber_tag_t) 0x77U)	/* application + constructed */
  ------------------
  128|       |
  129|     57|	return( *msgidp < 0 ? ld->ld_errno : LDAP_SUCCESS );
  ------------------
  |  |  610|     57|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (129:10): [True: 0, False: 57]
  ------------------
  130|     57|}

ldap_pvt_find_wildcard:
  192|  1.38k|{
  193|  5.29k|	for( ; *s; s++ ) {
  ------------------
  |  Branch (193:9): [True: 5.11k, False: 174]
  ------------------
  194|  5.11k|		switch( *s ) {
  ------------------
  |  Branch (194:11): [True: 1.76k, False: 3.35k]
  ------------------
  195|  1.14k|		case '*':	/* found wildcard */
  ------------------
  |  Branch (195:3): [True: 1.14k, False: 3.96k]
  ------------------
  196|  1.14k|			return (char *) s;
  197|       |
  198|      7|		case '(':
  ------------------
  |  Branch (198:3): [True: 7, False: 5.11k]
  ------------------
  199|     10|		case ')':
  ------------------
  |  Branch (199:3): [True: 3, False: 5.11k]
  ------------------
  200|     10|			return NULL;
  201|       |
  202|    602|		case '\\':
  ------------------
  |  Branch (202:3): [True: 602, False: 4.51k]
  ------------------
  203|    602|			if( s[1] == '\0' ) return NULL;
  ------------------
  |  Branch (203:8): [True: 4, False: 598]
  ------------------
  204|       |
  205|    598|			if( LDAP_HEX( s[1] ) && LDAP_HEX( s[2] ) ) {
  ------------------
  |  |  263|  1.19k|#define LDAP_HEX(c)			(LDAP_DIGIT(c) || \
  |  |  ------------------
  |  |  |  |  253|  1.19k|#define LDAP_DIGIT(c)		((c) >= '0' && (c) <= '9')
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (253:25): [True: 494, False: 104]
  |  |  |  |  |  Branch (253:39): [True: 65, False: 429]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  264|    598|								LDAP_HEXLOWER(c) || LDAP_HEXUPPER(c))
  |  |  ------------------
  |  |  |  |  261|  1.13k|#define LDAP_HEXLOWER(c)	((c) >= 'a' && (c) <= 'f')
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (261:27): [True: 149, False: 384]
  |  |  |  |  |  Branch (261:41): [True: 147, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               								LDAP_HEXLOWER(c) || LDAP_HEXUPPER(c))
  |  |  ------------------
  |  |  |  |  262|    386|#define LDAP_HEXUPPER(c)	((c) >= 'A' && (c) <= 'F')
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (262:27): [True: 281, False: 105]
  |  |  |  |  |  Branch (262:41): [True: 95, False: 186]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
              			if( LDAP_HEX( s[1] ) && LDAP_HEX( s[2] ) ) {
  ------------------
  |  |  263|    307|#define LDAP_HEX(c)			(LDAP_DIGIT(c) || \
  |  |  ------------------
  |  |  |  |  253|    614|#define LDAP_DIGIT(c)		((c) >= '0' && (c) <= '9')
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (253:25): [True: 293, False: 14]
  |  |  |  |  |  Branch (253:39): [True: 57, False: 236]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  264|    307|								LDAP_HEXLOWER(c) || LDAP_HEXUPPER(c))
  |  |  ------------------
  |  |  |  |  261|    557|#define LDAP_HEXLOWER(c)	((c) >= 'a' && (c) <= 'f')
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (261:27): [True: 122, False: 128]
  |  |  |  |  |  Branch (261:41): [True: 116, False: 6]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               								LDAP_HEXLOWER(c) || LDAP_HEXUPPER(c))
  |  |  ------------------
  |  |  |  |  262|    134|#define LDAP_HEXUPPER(c)	((c) >= 'A' && (c) <= 'F')
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (262:27): [True: 117, False: 17]
  |  |  |  |  |  Branch (262:41): [True: 107, False: 10]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  206|    280|				s+=2;
  207|       |
  208|    318|			} else switch( s[1] ) {
  209|     44|			default:
  ------------------
  |  Branch (209:4): [True: 44, False: 274]
  ------------------
  210|     44|				return NULL;
  211|       |
  212|       |			/* allow RFC 1960 escapes */
  213|     28|			case '*':
  ------------------
  |  Branch (213:4): [True: 28, False: 290]
  ------------------
  214|     55|			case '(':
  ------------------
  |  Branch (214:4): [True: 27, False: 291]
  ------------------
  215|     95|			case ')':
  ------------------
  |  Branch (215:4): [True: 40, False: 278]
  ------------------
  216|    274|			case '\\':
  ------------------
  |  Branch (216:4): [True: 179, False: 139]
  ------------------
  217|    274|				s++;
  218|    318|			}
  219|  5.11k|		}
  220|  5.11k|	}
  221|       |
  222|    174|	return (char *) s;
  223|  1.38k|}
ldap_pvt_filter_value_unescape:
  230|    307|{
  231|    307|	ber_slen_t r, v;
  232|    307|	int v1, v2;
  233|       |
  234|  4.02k|	for( r=v=0; fval[v] != '\0'; v++ ) {
  ------------------
  |  Branch (234:14): [True: 3.73k, False: 292]
  ------------------
  235|  3.73k|		switch( fval[v] ) {
  236|      1|		case '(':
  ------------------
  |  Branch (236:3): [True: 1, False: 3.73k]
  ------------------
  237|      2|		case ')':
  ------------------
  |  Branch (237:3): [True: 1, False: 3.73k]
  ------------------
  238|      5|		case '*':
  ------------------
  |  Branch (238:3): [True: 3, False: 3.72k]
  ------------------
  239|      5|			return -1;
  240|       |
  241|    474|		case '\\':
  ------------------
  |  Branch (241:3): [True: 474, False: 3.25k]
  ------------------
  242|       |			/* escape */
  243|    474|			v++;
  244|       |
  245|    474|			if ( fval[v] == '\0' ) {
  ------------------
  |  Branch (245:9): [True: 1, False: 473]
  ------------------
  246|       |				/* escape at end of string */
  247|      1|				return -1;
  248|      1|			}
  249|       |
  250|    473|			if (( v1 = hex2value( fval[v] )) >= 0 ) {
  ------------------
  |  Branch (250:8): [True: 229, False: 244]
  ------------------
  251|       |				/* LDAPv3 escape */
  252|    229|				if (( v2 = hex2value( fval[v+1] )) < 0 ) {
  ------------------
  |  Branch (252:9): [True: 5, False: 224]
  ------------------
  253|       |					/* must be two digit code */
  254|      5|					return -1;
  255|      5|				}
  256|       |
  257|    224|				fval[r++] = v1 * 16 + v2;
  258|    224|				v++;
  259|       |
  260|    244|			} else {
  261|       |				/* LDAPv2 escape */
  262|    244|				switch( fval[v] ) {
  263|     22|				case '(':
  ------------------
  |  Branch (263:5): [True: 22, False: 222]
  ------------------
  264|     50|				case ')':
  ------------------
  |  Branch (264:5): [True: 28, False: 216]
  ------------------
  265|     69|				case '*':
  ------------------
  |  Branch (265:5): [True: 19, False: 225]
  ------------------
  266|    240|				case '\\':
  ------------------
  |  Branch (266:5): [True: 171, False: 73]
  ------------------
  267|    240|					fval[r++] = fval[v];
  268|    240|					break;
  269|      4|				default:
  ------------------
  |  Branch (269:5): [True: 4, False: 240]
  ------------------
  270|       |					/* illegal escape */
  271|      4|					return -1;
  272|    244|				}
  273|    244|			}
  274|    464|			break;
  275|       |
  276|  3.25k|		default:
  ------------------
  |  Branch (276:3): [True: 3.25k, False: 479]
  ------------------
  277|  3.25k|			fval[r++] = fval[v];
  278|  3.73k|		}
  279|  3.73k|	}
  280|       |
  281|    292|	fval[r] = '\0';
  282|    292|	return r;
  283|    307|}
ldap_pvt_put_filter:
  325|  1.88k|{
  326|  1.88k|	int rc;
  327|  1.88k|	char	*freeme;
  328|  1.88k|	char	*str;
  329|  1.88k|	char	*next;
  330|  1.88k|	int	parens, balance, escape;
  331|       |
  332|       |	/*
  333|       |	 * A Filter looks like this (RFC 4511 as extended by RFC 4526):
  334|       |	 *     Filter ::= CHOICE {
  335|       |	 *         and             [0]     SET SIZE (0..MAX) OF filter Filter,
  336|       |	 *         or              [1]     SET SIZE (0..MAX) OF filter Filter,
  337|       |	 *         not             [2]     Filter,
  338|       |	 *         equalityMatch   [3]     AttributeValueAssertion,
  339|       |	 *         substrings      [4]     SubstringFilter,
  340|       |	 *         greaterOrEqual  [5]     AttributeValueAssertion,
  341|       |	 *         lessOrEqual     [6]     AttributeValueAssertion,
  342|       |	 *         present         [7]     AttributeDescription,
  343|       |	 *         approxMatch     [8]     AttributeValueAssertion,
  344|       |	 *         extensibleMatch [9]     MatchingRuleAssertion,
  345|       |	 *         ... }
  346|       |	 *
  347|       |	 *     SubstringFilter ::= SEQUENCE {
  348|       |	 *         type         AttributeDescription,
  349|       |	 *         substrings   SEQUENCE SIZE (1..MAX) OF substring CHOICE {
  350|       |	 *             initial          [0] AssertionValue, -- only once
  351|       |	 *             any              [1] AssertionValue,
  352|       |	 *             final            [2] AssertionValue  -- only once
  353|       |	 *             }
  354|       |	 *         }
  355|       |	 *
  356|       |	 *	   MatchingRuleAssertion ::= SEQUENCE {
  357|       |	 *         matchingRule    [1] MatchingRuleId OPTIONAL,
  358|       |	 *         type            [2] AttributeDescription OPTIONAL,
  359|       |	 *         matchValue      [3] AssertionValue,
  360|       |	 *         dnAttributes    [4] BOOLEAN DEFAULT FALSE }
  361|       |	 *
  362|       |	 * Note: tags in a CHOICE are always explicit
  363|       |	 */
  364|       |
  365|  1.88k|	Debug1( LDAP_DEBUG_TRACE, "put_filter: \"%s\"\n", str_in );
  ------------------
  |  |   92|  1.88k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  1.88k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  1.88k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  1.88k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 1.88k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|  1.88k|	ldap_log_printf( NULL, (level), fmt, arg1 ); \
  |  |   94|  1.88k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 1.88k]
  |  |  ------------------
  ------------------
  366|       |
  367|  1.88k|	freeme = LDAP_STRDUP( str_in );
  ------------------
  |  |  650|  1.88k|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  368|  1.88k|	if( freeme == NULL ) return LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  |  Branch (368:6): [True: 0, False: 1.88k]
  ------------------
  369|  1.88k|	str = freeme;
  370|       |
  371|  1.88k|	parens = 0;
  372|  1.91k|	while ( *str ) {
  ------------------
  |  Branch (372:10): [True: 1.91k, False: 4]
  ------------------
  373|  1.91k|		switch ( *str ) {
  374|  1.53k|		case '(': /*')'*/
  ------------------
  |  Branch (374:3): [True: 1.53k, False: 380]
  ------------------
  375|  1.53k|			str++;
  376|  1.53k|			parens++;
  377|       |
  378|       |			/* skip spaces */
  379|  1.55k|			while( LDAP_SPACE( *str ) ) str++;
  ------------------
  |  |  252|  1.55k|#define LDAP_SPACE(c)		((c) == ' ' || (c) == '\t' || (c) == '\n')
  |  |  ------------------
  |  |  |  Branch (252:25): [True: 3, False: 1.55k]
  |  |  |  Branch (252:39): [True: 11, False: 1.54k]
  |  |  |  Branch (252:54): [True: 11, False: 1.53k]
  |  |  ------------------
  ------------------
  380|       |
  381|  1.53k|			switch ( *str ) {
  382|    233|			case '&':
  ------------------
  |  Branch (382:4): [True: 233, False: 1.30k]
  ------------------
  383|    233|				Debug0( LDAP_DEBUG_TRACE, "put_filter: AND\n" );
  ------------------
  |  |   87|    233|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|    233|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|    233|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|    233|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 233]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|    233|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|    233|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 233]
  |  |  ------------------
  ------------------
  384|       |
  385|    233|				str = put_complex_filter( ber, str,
  386|    233|				    LDAP_FILTER_AND, 0 );
  ------------------
  |  |  569|    233|#define LDAP_FILTER_AND	((ber_tag_t) 0xa0U)	/* context specific + constructed */
  ------------------
  387|    233|				if( str == NULL ) {
  ------------------
  |  Branch (387:9): [True: 113, False: 120]
  ------------------
  388|    113|					rc = -1;
  389|    113|					goto done;
  390|    113|				}
  391|       |
  392|    120|				parens--;
  393|    120|				break;
  394|       |
  395|    110|			case '|':
  ------------------
  |  Branch (395:4): [True: 110, False: 1.42k]
  ------------------
  396|    110|				Debug0( LDAP_DEBUG_TRACE, "put_filter: OR\n" );
  ------------------
  |  |   87|    110|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|    110|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|    110|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|    110|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 110]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|    110|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|    110|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 110]
  |  |  ------------------
  ------------------
  397|       |
  398|    110|				str = put_complex_filter( ber, str,
  399|    110|				    LDAP_FILTER_OR, 0 );
  ------------------
  |  |  570|    110|#define LDAP_FILTER_OR	((ber_tag_t) 0xa1U)	/* context specific + constructed */
  ------------------
  400|    110|				if( str == NULL ) {
  ------------------
  |  Branch (400:9): [True: 84, False: 26]
  ------------------
  401|     84|					rc = -1;
  402|     84|					goto done;
  403|     84|				}
  404|       |
  405|     26|				parens--;
  406|     26|				break;
  407|       |
  408|     76|			case '!':
  ------------------
  |  Branch (408:4): [True: 76, False: 1.45k]
  ------------------
  409|     76|				Debug0( LDAP_DEBUG_TRACE, "put_filter: NOT\n" );
  ------------------
  |  |   87|     76|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|     76|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|     76|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|     76|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 76]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|     76|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|     76|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 76]
  |  |  ------------------
  ------------------
  410|       |
  411|     76|				str = put_complex_filter( ber, str,
  412|     76|				    LDAP_FILTER_NOT, 0 );
  ------------------
  |  |  571|     76|#define LDAP_FILTER_NOT	((ber_tag_t) 0xa2U)	/* context specific + constructed */
  ------------------
  413|     76|				if( str == NULL ) {
  ------------------
  |  Branch (413:9): [True: 56, False: 20]
  ------------------
  414|     56|					rc = -1;
  415|     56|					goto done;
  416|     56|				}
  417|       |
  418|     20|				parens--;
  419|     20|				break;
  420|       |
  421|      1|			case '(':
  ------------------
  |  Branch (421:4): [True: 1, False: 1.53k]
  ------------------
  422|      1|				rc = -1;
  423|      1|				goto done;
  424|       |
  425|  1.11k|			default:
  ------------------
  |  Branch (425:4): [True: 1.11k, False: 420]
  ------------------
  426|  1.11k|				Debug0( LDAP_DEBUG_TRACE, "put_filter: simple\n" );
  ------------------
  |  |   87|  1.11k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  1.11k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  1.11k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  1.11k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 1.11k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|  1.11k|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|  1.11k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 1.11k]
  |  |  ------------------
  ------------------
  427|       |
  428|  1.11k|				balance = 1;
  429|  1.11k|				escape = 0;
  430|  1.11k|				next = str;
  431|       |
  432|  16.9k|				while ( *next && balance ) {
  ------------------
  |  Branch (432:13): [True: 16.9k, False: 22]
  |  Branch (432:22): [True: 15.8k, False: 1.09k]
  ------------------
  433|  15.8k|					if ( escape == 0 ) {
  ------------------
  |  Branch (433:11): [True: 15.7k, False: 137]
  ------------------
  434|  15.7k|						if ( *next == '(' ) {
  ------------------
  |  Branch (434:12): [True: 117, False: 15.5k]
  ------------------
  435|    117|							balance++;
  436|  15.5k|						} else if ( *next == ')' ) {
  ------------------
  |  Branch (436:19): [True: 1.14k, False: 14.4k]
  ------------------
  437|  1.14k|							balance--;
  438|  1.14k|						}
  439|  15.7k|					}
  440|       |
  441|  15.8k|					if ( *next == '\\' && ! escape ) {
  ------------------
  |  Branch (441:11): [True: 236, False: 15.6k]
  |  Branch (441:28): [True: 137, False: 99]
  ------------------
  442|    137|						escape = 1;
  443|  15.7k|					} else {
  444|  15.7k|						escape = 0;
  445|  15.7k|					}
  446|       |
  447|  15.8k|					if ( balance ) next++;
  ------------------
  |  Branch (447:11): [True: 14.7k, False: 1.09k]
  ------------------
  448|  15.8k|				}
  449|       |
  450|  1.11k|				if ( balance != 0 ) {
  ------------------
  |  Branch (450:10): [True: 22, False: 1.09k]
  ------------------
  451|     22|					rc = -1;
  452|     22|					goto done;
  453|     22|				}
  454|       |
  455|  1.09k|				*next = '\0';
  456|       |
  457|  1.09k|				if ( put_simple_filter( ber, str ) == -1 ) {
  ------------------
  |  Branch (457:10): [True: 31, False: 1.06k]
  ------------------
  458|     31|					rc = -1;
  459|     31|					goto done;
  460|     31|				}
  461|       |
  462|  1.06k|				*next++ = /*'('*/ ')';
  463|       |
  464|  1.06k|				str = next;
  465|  1.06k|				parens--;
  466|  1.06k|				break;
  467|  1.53k|			}
  468|  1.22k|			break;
  469|       |
  470|  1.22k|		case /*'('*/ ')':
  ------------------
  |  Branch (470:3): [True: 19, False: 1.89k]
  ------------------
  471|     19|			Debug0( LDAP_DEBUG_TRACE, "put_filter: end\n" );
  ------------------
  |  |   87|     19|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|     19|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|     19|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|     19|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 19]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|     19|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|     19|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 19]
  |  |  ------------------
  ------------------
  472|     19|			if ( ber_printf( ber, /*"["*/ "]" ) == -1 ) {
  ------------------
  |  Branch (472:9): [True: 2, False: 17]
  ------------------
  473|      2|				rc = -1;
  474|      2|				goto done;
  475|      2|			}
  476|     17|			str++;
  477|     17|			parens--;
  478|     17|			break;
  479|       |
  480|      1|		case ' ':
  ------------------
  |  Branch (480:3): [True: 1, False: 1.91k]
  ------------------
  481|      1|			str++;
  482|      1|			break;
  483|       |
  484|    360|		default:	/* assume it's a simple type=value filter */
  ------------------
  |  Branch (484:3): [True: 360, False: 1.55k]
  ------------------
  485|    360|			Debug0( LDAP_DEBUG_TRACE, "put_filter: default\n" );
  ------------------
  |  |   87|    360|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|    360|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|    360|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|    360|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 360]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|    360|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|    360|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 360]
  |  |  ------------------
  ------------------
  486|    360|			next = strchr( str, '\0' );
  487|    360|			if ( put_simple_filter( ber, str ) == -1 ) {
  ------------------
  |  Branch (487:9): [True: 199, False: 161]
  ------------------
  488|    199|				rc = -1;
  489|    199|				goto done;
  490|    199|			}
  491|    161|			str = next;
  492|    161|			break;
  493|  1.91k|		}
  494|  1.40k|		if ( !parens )
  ------------------
  |  Branch (494:8): [True: 1.37k, False: 33]
  ------------------
  495|  1.37k|			break;
  496|  1.40k|	}
  497|       |
  498|  1.37k|	rc = ( parens || *str ) ? -1 : 0;
  ------------------
  |  Branch (498:9): [True: 4, False: 1.37k]
  |  Branch (498:19): [True: 11, False: 1.36k]
  ------------------
  499|       |
  500|  1.88k|done:
  501|       |	LDAP_FREE( freeme );
  ------------------
  |  |  648|  1.88k|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  502|  1.88k|	return rc;
  503|  1.37k|}
filter.c:hex2value:
  174|    702|{
  175|    702|	if( c >= '0' && c <= '9' ) {
  ------------------
  |  Branch (175:6): [True: 628, False: 74]
  |  Branch (175:18): [True: 106, False: 522]
  ------------------
  176|    106|		return c - '0';
  177|    106|	}
  178|       |
  179|    596|	if( c >= 'A' && c <= 'F' ) {
  ------------------
  |  Branch (179:6): [True: 522, False: 74]
  |  Branch (179:18): [True: 142, False: 380]
  ------------------
  180|    142|		return c + (10 - (int) 'A');
  181|    142|	}
  182|       |
  183|    454|	if( c >= 'a' && c <= 'f' ) {
  ------------------
  |  Branch (183:6): [True: 207, False: 247]
  |  Branch (183:18): [True: 205, False: 2]
  ------------------
  184|    205|		return c + (10 - (int) 'a');
  185|    205|	}
  186|       |
  187|    249|	return -1;
  188|    454|}
filter.c:put_complex_filter:
  287|    419|{
  288|    419|	char	*next;
  289|       |
  290|       |	/*
  291|       |	 * We have (x(filter)...) with str sitting on
  292|       |	 * the x.  We have to find the paren matching
  293|       |	 * the one before the x and put the intervening
  294|       |	 * filters by calling put_filter_list().
  295|       |	 */
  296|       |
  297|       |	/* put explicit tag */
  298|    419|	if ( ber_printf( ber, "t{" /*"}"*/, tag ) == -1 ) {
  ------------------
  |  Branch (298:7): [True: 0, False: 419]
  ------------------
  299|      0|		return NULL;
  300|      0|	}
  301|       |
  302|    419|	str++;
  303|    419|	if ( (next = find_right_paren( str )) == NULL ) {
  ------------------
  |  Branch (303:7): [True: 45, False: 374]
  ------------------
  304|     45|		return NULL;
  305|     45|	}
  306|       |
  307|    374|	*next = '\0';
  308|    374|	if ( put_filter_list( ber, str, tag ) == -1 ) {
  ------------------
  |  Branch (308:7): [True: 208, False: 166]
  ------------------
  309|    208|		return NULL;
  310|    208|	}
  311|       |
  312|       |	/* close the '(' */
  313|    166|	*next++ = ')';
  314|       |
  315|       |	/* flush explicit tagged thang */
  316|    166|	if ( ber_printf( ber, /*"{"*/ "N}" ) == -1 ) {
  ------------------
  |  Branch (316:7): [True: 0, False: 166]
  ------------------
  317|      0|		return NULL;
  318|      0|	}
  319|       |
  320|    166|	return next;
  321|    166|}
filter.c:find_right_paren:
  151|    795|{
  152|    795|	int	balance, escape;
  153|       |
  154|    795|	balance = 1;
  155|    795|	escape = 0;
  156|  12.8k|	while ( *s && balance ) {
  ------------------
  |  Branch (156:10): [True: 12.7k, False: 100]
  |  Branch (156:16): [True: 12.0k, False: 695]
  ------------------
  157|  12.0k|		if ( !escape ) {
  ------------------
  |  Branch (157:8): [True: 11.5k, False: 503]
  ------------------
  158|  11.5k|			if ( *s == '(' ) {
  ------------------
  |  Branch (158:9): [True: 1.84k, False: 9.75k]
  ------------------
  159|  1.84k|				balance++;
  160|  9.75k|			} else if ( *s == ')' ) {
  ------------------
  |  Branch (160:16): [True: 2.51k, False: 7.23k]
  ------------------
  161|  2.51k|				balance--;
  162|  2.51k|			}
  163|  11.5k|		}
  164|       |
  165|  12.0k|		escape = ( *s == '\\' && !escape );
  ------------------
  |  Branch (165:14): [True: 840, False: 11.2k]
  |  Branch (165:28): [True: 504, False: 336]
  ------------------
  166|       |
  167|  12.0k|		if ( balance ) s++;
  ------------------
  |  Branch (167:8): [True: 11.4k, False: 695]
  ------------------
  168|  12.0k|	}
  169|       |
  170|    795|	return *s ? s : NULL;
  ------------------
  |  Branch (170:9): [True: 695, False: 100]
  ------------------
  171|    795|}
filter.c:put_filter_list:
  511|    374|{
  512|    374|	char	*next = NULL;
  513|    374|	char	save;
  514|       |
  515|    374|	Debug1( LDAP_DEBUG_TRACE, "put_filter_list \"%s\"\n",
  ------------------
  |  |   92|    374|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|    374|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|    374|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|    374|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 374]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|    374|	ldap_log_printf( NULL, (level), fmt, arg1 ); \
  |  |   94|    374|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 374]
  |  |  ------------------
  ------------------
  516|    374|		str );
  517|       |
  518|    524|	while ( *str ) {
  ------------------
  |  Branch (518:10): [True: 389, False: 135]
  ------------------
  519|    416|		while ( *str && LDAP_SPACE( (unsigned char) *str ) ) {
  ------------------
  |  |  252|    403|#define LDAP_SPACE(c)		((c) == ' ' || (c) == '\t' || (c) == '\n')
  |  |  ------------------
  |  |  |  Branch (252:25): [True: 6, False: 397]
  |  |  |  Branch (252:39): [True: 13, False: 384]
  |  |  |  Branch (252:54): [True: 8, False: 376]
  |  |  ------------------
  ------------------
  |  Branch (519:11): [True: 403, False: 13]
  ------------------
  520|     27|			str++;
  521|     27|		}
  522|    389|		if ( *str == '\0' ) break;
  ------------------
  |  Branch (522:8): [True: 13, False: 376]
  ------------------
  523|       |
  524|    376|		if ( (next = find_right_paren( str + 1 )) == NULL ) {
  ------------------
  |  Branch (524:8): [True: 55, False: 321]
  ------------------
  525|     55|			return -1;
  526|     55|		}
  527|    321|		save = *++next;
  528|       |
  529|       |		/* now we have "(filter)" with str pointing to it */
  530|    321|		*next = '\0';
  531|    321|		if ( ldap_pvt_put_filter( ber, str ) == -1 ) return -1;
  ------------------
  |  Branch (531:8): [True: 148, False: 173]
  ------------------
  532|    173|		*next = save;
  533|    173|		str = next;
  534|       |
  535|    173|		if( tag == LDAP_FILTER_NOT ) break;
  ------------------
  |  |  571|    173|#define LDAP_FILTER_NOT	((ber_tag_t) 0xa2U)	/* context specific + constructed */
  ------------------
  |  Branch (535:7): [True: 23, False: 150]
  ------------------
  536|    173|	}
  537|       |
  538|    171|	if( tag == LDAP_FILTER_NOT && ( next == NULL || *str )) {
  ------------------
  |  |  571|    342|#define LDAP_FILTER_NOT	((ber_tag_t) 0xa2U)	/* context specific + constructed */
  ------------------
  |  Branch (538:6): [True: 25, False: 146]
  |  Branch (538:34): [True: 2, False: 23]
  |  Branch (538:50): [True: 3, False: 20]
  ------------------
  539|      5|		return -1;
  540|      5|	}
  541|       |
  542|    166|	return 0;
  543|    171|}
filter.c:put_simple_filter:
  549|  1.45k|{
  550|  1.45k|	char		*s;
  551|  1.45k|	char		*value;
  552|  1.45k|	ber_tag_t	ftype;
  553|  1.45k|	int		rc = -1;
  554|       |
  555|  1.45k|	Debug1( LDAP_DEBUG_TRACE, "put_simple_filter: \"%s\"\n",
  ------------------
  |  |   92|  1.45k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  1.45k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  1.45k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  1.45k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 1.45k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|  1.45k|	ldap_log_printf( NULL, (level), fmt, arg1 ); \
  |  |   94|  1.45k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 1.45k]
  |  |  ------------------
  ------------------
  556|  1.45k|		str );
  557|       |
  558|  1.45k|	if ( str[0] == '=' ) return -1;
  ------------------
  |  Branch (558:7): [True: 3, False: 1.44k]
  ------------------
  559|       |
  560|  1.44k|	str = LDAP_STRDUP( str );
  ------------------
  |  |  650|  1.44k|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  561|  1.44k|	if( str == NULL ) return -1;
  ------------------
  |  Branch (561:6): [True: 0, False: 1.44k]
  ------------------
  562|       |
  563|  1.44k|	if ( (s = strchr( str, '=' )) == NULL ) {
  ------------------
  |  Branch (563:7): [True: 25, False: 1.42k]
  ------------------
  564|     25|		goto done;
  565|     25|	}
  566|       |
  567|  1.42k|	value = s + 1;
  568|  1.42k|	*s-- = '\0';
  569|       |
  570|  1.42k|	switch ( *s ) {
  571|      8|	case '<':
  ------------------
  |  Branch (571:2): [True: 8, False: 1.41k]
  ------------------
  572|      8|		ftype = LDAP_FILTER_LE;
  ------------------
  |  |  575|      8|#define LDAP_FILTER_LE ((ber_tag_t) 0xa6U) /* context specific + constructed */
  ------------------
  573|      8|		*s = '\0';
  574|      8|		break;
  575|       |
  576|      5|	case '>':
  ------------------
  |  Branch (576:2): [True: 5, False: 1.41k]
  ------------------
  577|      5|		ftype = LDAP_FILTER_GE;
  ------------------
  |  |  574|      5|#define LDAP_FILTER_GE ((ber_tag_t) 0xa5U) /* context specific + constructed */
  ------------------
  578|      5|		*s = '\0';
  579|      5|		break;
  580|       |
  581|      2|	case '~':
  ------------------
  |  Branch (581:2): [True: 2, False: 1.42k]
  ------------------
  582|      2|		ftype = LDAP_FILTER_APPROX;
  ------------------
  |  |  577|      2|#define LDAP_FILTER_APPROX ((ber_tag_t) 0xa8U)	/* context specific + constructed */
  ------------------
  583|      2|		*s = '\0';
  584|      2|		break;
  585|       |
  586|    104|	case ':':
  ------------------
  |  Branch (586:2): [True: 104, False: 1.32k]
  ------------------
  587|       |		/* RFC 4515 extensible filters are off the form:
  588|       |		 *		type [:dn] [:rule] := value
  589|       |		 * or	[:dn]:rule := value		
  590|       |		 */
  591|    104|		ftype = LDAP_FILTER_EXT;
  ------------------
  |  |  578|    104|#define LDAP_FILTER_EXT	((ber_tag_t) 0xa9U)	/* context specific + constructed */
  ------------------
  592|    104|		*s = '\0';
  593|       |
  594|    104|		{
  595|    104|			char *dn = strchr( str, ':' );
  596|    104|			char *rule = NULL;
  597|       |
  598|    104|			if( dn != NULL ) {
  ------------------
  |  Branch (598:8): [True: 87, False: 17]
  ------------------
  599|     87|				*dn++ = '\0';
  600|     87|				rule = strchr( dn, ':' );
  601|       |
  602|     87|				if( rule == NULL ) {
  ------------------
  |  Branch (602:9): [True: 73, False: 14]
  ------------------
  603|       |					/* one colon */
  604|     73|					if ( strcasecmp(dn, "dn") == 0 ) {
  ------------------
  |  Branch (604:11): [True: 2, False: 71]
  ------------------
  605|       |						/* must have attribute */
  606|      2|						if( !ldap_is_desc( str ) ) {
  ------------------
  |  Branch (606:11): [True: 1, False: 1]
  ------------------
  607|      1|							goto done;
  608|      1|						}
  609|       |
  610|      1|						rule = "";
  611|       |
  612|     71|					} else {
  613|     71|					  rule = dn;
  614|     71|					  dn = NULL;
  615|     71|					}
  616|       |				
  617|     73|				} else {
  618|       |					/* two colons */
  619|     14|					*rule++ = '\0';
  620|       |
  621|     14|					if ( strcasecmp(dn, "dn") != 0 ) {
  ------------------
  |  Branch (621:11): [True: 13, False: 1]
  ------------------
  622|       |						/* must have "dn" */
  623|     13|						goto done;
  624|     13|					}
  625|     14|				}
  626|       |
  627|     87|			}
  628|       |
  629|     90|			if ( *str == '\0' && ( !rule || *rule == '\0' ) ) {
  ------------------
  |  Branch (629:9): [True: 17, False: 73]
  |  Branch (629:27): [True: 2, False: 15]
  |  Branch (629:36): [True: 1, False: 14]
  ------------------
  630|       |				/* must have either type or rule */
  631|      3|				goto done;
  632|      3|			}
  633|       |
  634|     87|			if ( *str != '\0' && !ldap_is_desc( str ) ) {
  ------------------
  |  Branch (634:9): [True: 73, False: 14]
  |  Branch (634:25): [True: 12, False: 61]
  ------------------
  635|     12|				goto done;
  636|     12|			}
  637|       |
  638|     75|			if ( rule && *rule != '\0' && !ldap_is_oid( rule ) ) {
  ------------------
  |  Branch (638:9): [True: 68, False: 7]
  |  Branch (638:17): [True: 66, False: 2]
  |  Branch (638:34): [True: 51, False: 15]
  ------------------
  639|     51|				goto done;
  640|     51|			}
  641|       |
  642|     24|			rc = ber_printf( ber, "t{" /*"}"*/, ftype );
  643|       |
  644|     24|			if( rc != -1 && rule && *rule != '\0' ) {
  ------------------
  |  Branch (644:8): [True: 24, False: 0]
  |  Branch (644:20): [True: 17, False: 7]
  |  Branch (644:28): [True: 15, False: 2]
  ------------------
  645|     15|				rc = ber_printf( ber, "ts", LDAP_FILTER_EXT_OID, rule );
  ------------------
  |  |  581|     15|#define LDAP_FILTER_EXT_OID		((ber_tag_t) 0x81U)	/* context specific */
  ------------------
  646|     15|			}
  647|       |
  648|     24|			if( rc != -1 && *str != '\0' ) {
  ------------------
  |  Branch (648:8): [True: 24, False: 0]
  |  Branch (648:20): [True: 20, False: 4]
  ------------------
  649|     20|				rc = ber_printf( ber, "ts", LDAP_FILTER_EXT_TYPE, str );
  ------------------
  |  |  582|     20|#define LDAP_FILTER_EXT_TYPE	((ber_tag_t) 0x82U)	/* context specific */
  ------------------
  650|     20|			}
  651|       |
  652|     24|			if( rc != -1 ) {
  ------------------
  |  Branch (652:8): [True: 24, False: 0]
  ------------------
  653|     24|				ber_slen_t len = ldap_pvt_filter_value_unescape( value );
  654|       |
  655|     24|				if( len >= 0 ) {
  ------------------
  |  Branch (655:9): [True: 15, False: 9]
  ------------------
  656|     15|					rc = ber_printf( ber, "to",
  657|     15|						LDAP_FILTER_EXT_VALUE, value, len );
  ------------------
  |  |  583|     15|#define LDAP_FILTER_EXT_VALUE	((ber_tag_t) 0x83U)	/* context specific */
  ------------------
  658|     15|				} else {
  659|      9|					rc = -1;
  660|      9|				}
  661|     24|			}
  662|       |
  663|     24|			if( rc != -1 && dn ) {
  ------------------
  |  Branch (663:8): [True: 15, False: 9]
  |  Branch (663:20): [True: 1, False: 14]
  ------------------
  664|      1|				rc = ber_printf( ber, "tb",
  665|      1|					LDAP_FILTER_EXT_DNATTRS, (ber_int_t) 1 );
  ------------------
  |  |  584|      1|#define LDAP_FILTER_EXT_DNATTRS	((ber_tag_t) 0x84U)	/* context specific */
  ------------------
  666|      1|			}
  667|       |
  668|     24|			if( rc != -1 ) { 
  ------------------
  |  Branch (668:8): [True: 15, False: 9]
  ------------------
  669|     15|				rc = ber_printf( ber, /*"{"*/ "N}" );
  670|     15|			}
  671|     24|		}
  672|      0|		goto done;
  673|       |
  674|  1.30k|	default:
  ------------------
  |  Branch (674:2): [True: 1.30k, False: 119]
  ------------------
  675|  1.30k|		if( !ldap_is_desc( str ) ) {
  ------------------
  |  Branch (675:7): [True: 38, False: 1.26k]
  ------------------
  676|     38|			goto done;
  677|       |
  678|  1.26k|		} else {
  679|  1.26k|			char *nextstar = ldap_pvt_find_wildcard( value );
  680|       |
  681|  1.26k|			if ( nextstar == NULL ) {
  ------------------
  |  Branch (681:9): [True: 30, False: 1.23k]
  ------------------
  682|     30|				goto done;
  683|       |
  684|  1.23k|			} else if ( *nextstar == '\0' ) {
  ------------------
  |  Branch (684:16): [True: 118, False: 1.11k]
  ------------------
  685|    118|				ftype = LDAP_FILTER_EQUALITY;
  ------------------
  |  |  572|    118|#define LDAP_FILTER_EQUALITY ((ber_tag_t) 0xa3U) /* context specific + constructed */
  ------------------
  686|       |
  687|  1.11k|			} else if ( strcmp( value, "*" ) == 0 ) {
  ------------------
  |  Branch (687:16): [True: 1.03k, False: 88]
  ------------------
  688|  1.03k|				ftype = LDAP_FILTER_PRESENT;
  ------------------
  |  |  576|  1.03k|#define LDAP_FILTER_PRESENT ((ber_tag_t) 0x87U) /* context specific + primitive   */
  ------------------
  689|       |
  690|  1.03k|			} else {
  691|     88|				rc = put_substring_filter( ber, str, value, nextstar );
  692|     88|				goto done;
  693|     88|			}
  694|  1.26k|		} break;
  695|  1.42k|	}
  696|       |
  697|  1.16k|	if( !ldap_is_desc( str ) ) goto done;
  ------------------
  |  Branch (697:6): [True: 9, False: 1.15k]
  ------------------
  698|       |
  699|  1.15k|	if ( ftype == LDAP_FILTER_PRESENT ) {
  ------------------
  |  |  576|  1.15k|#define LDAP_FILTER_PRESENT ((ber_tag_t) 0x87U) /* context specific + primitive   */
  ------------------
  |  Branch (699:7): [True: 1.03k, False: 124]
  ------------------
  700|  1.03k|		rc = ber_printf( ber, "ts", ftype, str );
  701|       |
  702|  1.03k|	} else {
  703|    124|		ber_slen_t len = ldap_pvt_filter_value_unescape( value );
  704|       |
  705|    124|		if( len >= 0 ) {
  ------------------
  |  Branch (705:7): [True: 118, False: 6]
  ------------------
  706|    118|			rc = ber_printf( ber, "t{soN}",
  707|    118|				ftype, str, value, len );
  708|    118|		}
  709|    124|	}
  710|       |
  711|  1.44k|done:
  712|  1.44k|	if( rc != -1 ) rc = 0;
  ------------------
  |  Branch (712:6): [True: 1.22k, False: 227]
  ------------------
  713|       |	LDAP_FREE( str );
  ------------------
  |  |  648|  1.44k|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  714|  1.44k|	return rc;
  715|  1.15k|}
filter.c:ldap_is_desc:
   93|  2.54k|{
   94|  2.54k|	int i;
   95|       |
   96|  2.54k|	if( LDAP_ALPHA( str[0] )) {
  ------------------
  |  |  256|  2.54k|#define LDAP_ALPHA(c)		(LDAP_LOWER(c) || LDAP_UPPER(c))
  |  |  ------------------
  |  |  |  |  254|  5.08k|#define LDAP_LOWER(c)		((c) >= 'a' && (c) <= 'z')
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (254:25): [True: 2.27k, False: 268]
  |  |  |  |  |  Branch (254:39): [True: 2.27k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define LDAP_ALPHA(c)		(LDAP_LOWER(c) || LDAP_UPPER(c))
  |  |  ------------------
  |  |  |  |  255|    269|#define LDAP_UPPER(c)		((c) >= 'A' && (c) <= 'Z')
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (255:25): [True: 173, False: 96]
  |  |  |  |  |  Branch (255:39): [True: 171, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   97|  24.3k|		for( i=1; str[i]; i++ ) {
  ------------------
  |  Branch (97:13): [True: 22.0k, False: 2.32k]
  ------------------
   98|  22.0k|			if( str[i] == ';' ) {
  ------------------
  |  Branch (98:8): [True: 104, False: 21.9k]
  ------------------
   99|    104|				str = &str[i+1];
  100|    104|				goto options;
  101|    104|			}
  102|       |
  103|  21.9k|			if( !LDAP_LDH( str[i] )) {
  ------------------
  |  |  259|  21.9k|#define LDAP_LDH(c)			(LDAP_ALNUM(c) || (c) == '-')
  |  |  ------------------
  |  |  |  |  257|  43.9k|#define LDAP_ALNUM(c)		(LDAP_ALPHA(c) || LDAP_DIGIT(c))
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  43.9k|#define LDAP_ALPHA(c)		(LDAP_LOWER(c) || LDAP_UPPER(c))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  254|  43.9k|#define LDAP_LOWER(c)		((c) >= 'a' && (c) <= 'z')
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (254:25): [True: 21.0k, False: 949]
  |  |  |  |  |  |  |  |  |  Branch (254:39): [True: 21.0k, False: 2]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define LDAP_ALPHA(c)		(LDAP_LOWER(c) || LDAP_UPPER(c))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  255|    951|#define LDAP_UPPER(c)		((c) >= 'A' && (c) <= 'Z')
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (255:25): [True: 510, False: 441]
  |  |  |  |  |  |  |  |  |  Branch (255:39): [True: 507, False: 3]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define LDAP_ALNUM(c)		(LDAP_ALPHA(c) || LDAP_DIGIT(c))
  |  |  |  |  ------------------
  |  |  |  |  |  |  253|    444|#define LDAP_DIGIT(c)		((c) >= '0' && (c) <= '9')
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (253:25): [True: 340, False: 104]
  |  |  |  |  |  |  |  Branch (253:39): [True: 337, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (259:41): [True: 93, False: 14]
  |  |  ------------------
  ------------------
  104|     14|				return 0;
  105|     14|			}
  106|  21.9k|		}
  107|  2.32k|		return 1;
  108|       |
  109|  2.44k|	} else if LDAP_DIGIT( str[0] ) {
  ------------------
  |  |  253|     98|#define LDAP_DIGIT(c)		((c) >= '0' && (c) <= '9')
  |  |  ------------------
  |  |  |  Branch (253:25): [True: 91, False: 7]
  |  |  |  Branch (253:39): [True: 89, False: 2]
  |  |  ------------------
  ------------------
  110|     89|		int dot=0;
  111|    468|		for( i=1; str[i]; i++ ) {
  ------------------
  |  Branch (111:13): [True: 406, False: 62]
  ------------------
  112|    406|			if( str[i] == ';' ) {
  ------------------
  |  Branch (112:8): [True: 11, False: 395]
  ------------------
  113|     11|				if( dot ) return 0;
  ------------------
  |  Branch (113:9): [True: 1, False: 10]
  ------------------
  114|     10|				str = &str[i+1];
  115|     10|				goto options;
  116|     11|			}
  117|       |
  118|    395|			if( LDAP_DIGIT( str[i] )) {
  ------------------
  |  |  253|    395|#define LDAP_DIGIT(c)		((c) >= '0' && (c) <= '9')
  |  |  ------------------
  |  |  |  Branch (253:25): [True: 343, False: 52]
  |  |  |  Branch (253:39): [True: 337, False: 6]
  |  |  ------------------
  ------------------
  119|    337|				dot=0;
  120|       |
  121|    337|			} else if ( str[i] == '.' ) {
  ------------------
  |  Branch (121:16): [True: 43, False: 15]
  ------------------
  122|     43|				if( ++dot > 1 ) return 0;
  ------------------
  |  Branch (122:9): [True: 1, False: 42]
  ------------------
  123|       |
  124|     43|			} else {
  125|     15|				return 0;
  126|     15|			}
  127|    395|		}
  128|     62|		return !dot;
  129|     89|	}
  130|       |
  131|      9|	return 0;
  132|       |
  133|    343|options:
  134|    343|	if( !LDAP_LDH( str[0] )) {
  ------------------
  |  |  259|    343|#define LDAP_LDH(c)			(LDAP_ALNUM(c) || (c) == '-')
  |  |  ------------------
  |  |  |  |  257|    686|#define LDAP_ALNUM(c)		(LDAP_ALPHA(c) || LDAP_DIGIT(c))
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|    686|#define LDAP_ALPHA(c)		(LDAP_LOWER(c) || LDAP_UPPER(c))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  254|    686|#define LDAP_LOWER(c)		((c) >= 'a' && (c) <= 'z')
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (254:25): [True: 129, False: 214]
  |  |  |  |  |  |  |  |  |  Branch (254:39): [True: 128, False: 1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define LDAP_ALPHA(c)		(LDAP_LOWER(c) || LDAP_UPPER(c))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  255|    215|#define LDAP_UPPER(c)		((c) >= 'A' && (c) <= 'Z')
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (255:25): [True: 114, False: 101]
  |  |  |  |  |  |  |  |  |  Branch (255:39): [True: 113, False: 1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define LDAP_ALNUM(c)		(LDAP_ALPHA(c) || LDAP_DIGIT(c))
  |  |  |  |  ------------------
  |  |  |  |  |  |  253|    102|#define LDAP_DIGIT(c)		((c) >= '0' && (c) <= '9')
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (253:25): [True: 70, False: 32]
  |  |  |  |  |  |  |  Branch (253:39): [True: 69, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (259:41): [True: 28, False: 5]
  |  |  ------------------
  ------------------
  135|      5|		return 0;
  136|      5|	}
  137|  2.11k|	for( i=1; str[i]; i++ ) {
  ------------------
  |  Branch (137:12): [True: 2.02k, False: 96]
  ------------------
  138|  2.02k|		if( str[i] == ';' ) {
  ------------------
  |  Branch (138:7): [True: 229, False: 1.79k]
  ------------------
  139|    229|			str = &str[i+1];
  140|    229|			goto options;
  141|    229|		}
  142|  1.79k|		if( !LDAP_LDH( str[i] )) {
  ------------------
  |  |  259|  1.79k|#define LDAP_LDH(c)			(LDAP_ALNUM(c) || (c) == '-')
  |  |  ------------------
  |  |  |  |  257|  3.58k|#define LDAP_ALNUM(c)		(LDAP_ALPHA(c) || LDAP_DIGIT(c))
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  3.58k|#define LDAP_ALPHA(c)		(LDAP_LOWER(c) || LDAP_UPPER(c))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  254|  3.58k|#define LDAP_LOWER(c)		((c) >= 'a' && (c) <= 'z')
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (254:25): [True: 576, False: 1.21k]
  |  |  |  |  |  |  |  |  |  Branch (254:39): [True: 575, False: 1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define LDAP_ALPHA(c)		(LDAP_LOWER(c) || LDAP_UPPER(c))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  255|  1.21k|#define LDAP_UPPER(c)		((c) >= 'A' && (c) <= 'Z')
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (255:25): [True: 593, False: 626]
  |  |  |  |  |  |  |  |  |  Branch (255:39): [True: 591, False: 2]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define LDAP_ALNUM(c)		(LDAP_ALPHA(c) || LDAP_DIGIT(c))
  |  |  |  |  ------------------
  |  |  |  |  |  |  253|    628|#define LDAP_DIGIT(c)		((c) >= '0' && (c) <= '9')
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (253:25): [True: 494, False: 134]
  |  |  |  |  |  |  |  Branch (253:39): [True: 492, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (259:41): [True: 123, False: 13]
  |  |  ------------------
  ------------------
  143|     13|			return 0;
  144|     13|		}
  145|  1.79k|	}
  146|     96|	return 1;
  147|    338|}
filter.c:ldap_is_oid:
   62|     66|{
   63|     66|	int i;
   64|       |
   65|     66|	if( LDAP_ALPHA( str[0] )) {
  ------------------
  |  |  256|     66|#define LDAP_ALPHA(c)		(LDAP_LOWER(c) || LDAP_UPPER(c))
  |  |  ------------------
  |  |  |  |  254|    132|#define LDAP_LOWER(c)		((c) >= 'a' && (c) <= 'z')
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (254:25): [True: 21, False: 45]
  |  |  |  |  |  Branch (254:39): [True: 20, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define LDAP_ALPHA(c)		(LDAP_LOWER(c) || LDAP_UPPER(c))
  |  |  ------------------
  |  |  |  |  255|     46|#define LDAP_UPPER(c)		((c) >= 'A' && (c) <= 'Z')
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (255:25): [True: 21, False: 25]
  |  |  |  |  |  Branch (255:39): [True: 19, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   66|    466|		for( i=1; str[i]; i++ ) {
  ------------------
  |  Branch (66:13): [True: 452, False: 14]
  ------------------
   67|    452|			if( !LDAP_LDH( str[i] )) {
  ------------------
  |  |  259|    452|#define LDAP_LDH(c)			(LDAP_ALNUM(c) || (c) == '-')
  |  |  ------------------
  |  |  |  |  257|    904|#define LDAP_ALNUM(c)		(LDAP_ALPHA(c) || LDAP_DIGIT(c))
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|    904|#define LDAP_ALPHA(c)		(LDAP_LOWER(c) || LDAP_UPPER(c))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  254|    904|#define LDAP_LOWER(c)		((c) >= 'a' && (c) <= 'z')
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (254:25): [True: 119, False: 333]
  |  |  |  |  |  |  |  |  |  Branch (254:39): [True: 117, False: 2]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define LDAP_ALPHA(c)		(LDAP_LOWER(c) || LDAP_UPPER(c))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  255|    335|#define LDAP_UPPER(c)		((c) >= 'A' && (c) <= 'Z')
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (255:25): [True: 120, False: 215]
  |  |  |  |  |  |  |  |  |  Branch (255:39): [True: 116, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define LDAP_ALNUM(c)		(LDAP_ALPHA(c) || LDAP_DIGIT(c))
  |  |  |  |  ------------------
  |  |  |  |  |  |  253|    219|#define LDAP_DIGIT(c)		((c) >= '0' && (c) <= '9')
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (253:25): [True: 105, False: 114]
  |  |  |  |  |  |  |  Branch (253:39): [True: 101, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (259:41): [True: 93, False: 25]
  |  |  ------------------
  ------------------
   68|     25|				return 0;
   69|     25|			}
   70|    452|		}
   71|     14|		return 1;
   72|       |
   73|     39|	} else if LDAP_DIGIT( str[0] ) {
  ------------------
  |  |  253|     27|#define LDAP_DIGIT(c)		((c) >= '0' && (c) <= '9')
  |  |  ------------------
  |  |  |  Branch (253:25): [True: 21, False: 6]
  |  |  |  Branch (253:39): [True: 19, False: 2]
  |  |  ------------------
  ------------------
   74|     19|		int dot=0;
   75|    170|		for( i=1; str[i]; i++ ) {
  ------------------
  |  Branch (75:13): [True: 168, False: 2]
  ------------------
   76|    168|			if( LDAP_DIGIT( str[i] )) {
  ------------------
  |  |  253|    168|#define LDAP_DIGIT(c)		((c) >= '0' && (c) <= '9')
  |  |  ------------------
  |  |  |  Branch (253:25): [True: 130, False: 38]
  |  |  |  Branch (253:39): [True: 122, False: 8]
  |  |  ------------------
  ------------------
   77|    122|				dot=0;
   78|       |
   79|    122|			} else if ( str[i] == '.' ) {
  ------------------
  |  Branch (79:16): [True: 30, False: 16]
  ------------------
   80|     30|				if( ++dot > 1 ) return 0;
  ------------------
  |  Branch (80:9): [True: 1, False: 29]
  ------------------
   81|       |
   82|     30|			} else {
   83|     16|				return 0;
   84|     16|			}
   85|    168|		}
   86|      2|		return !dot;
   87|     19|	}
   88|       |
   89|      8|	return 0;
   90|     66|}
filter.c:put_substring_filter:
  719|     88|{
  720|     88|	int gotstar = 0;
  721|     88|	ber_tag_t	ftype = LDAP_FILTER_SUBSTRINGS;
  ------------------
  |  |  573|     88|#define LDAP_FILTER_SUBSTRINGS ((ber_tag_t) 0xa4U) /* context specific + constructed */
  ------------------
  722|       |
  723|     88|	Debug2( LDAP_DEBUG_TRACE, "put_substring_filter \"%s=%s\"\n",
  ------------------
  |  |   97|     88|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|     88|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|     88|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|     88|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 88]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|     88|	ldap_log_printf( NULL, (level), fmt, arg1, arg2 ); \
  |  |   99|     88|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (99:12): [Folded, False: 88]
  |  |  ------------------
  ------------------
  724|     88|		type, val );
  725|       |
  726|     88|	if ( ber_printf( ber, "t{s{" /*"}}"*/, ftype, type ) == -1 ) {
  ------------------
  |  Branch (726:7): [True: 0, False: 88]
  ------------------
  727|      0|		return -1;
  728|      0|	}
  729|       |
  730|    260|	for( ; *val; val=nextstar ) {
  ------------------
  |  Branch (730:9): [True: 202, False: 58]
  ------------------
  731|    202|		if ( gotstar )
  ------------------
  |  Branch (731:8): [True: 114, False: 88]
  ------------------
  732|    114|			nextstar = ldap_pvt_find_wildcard( val );
  733|       |
  734|    202|		if ( nextstar == NULL ) {
  ------------------
  |  Branch (734:8): [True: 28, False: 174]
  ------------------
  735|     28|			return -1;
  736|     28|		}
  737|       |
  738|    174|		if ( *nextstar == '\0' ) {
  ------------------
  |  Branch (738:8): [True: 56, False: 118]
  ------------------
  739|     56|			ftype = LDAP_SUBSTRING_FINAL;
  ------------------
  |  |  605|     56|#define LDAP_SUBSTRING_FINAL	((ber_tag_t) 0x82U)	/* context specific */
  ------------------
  740|    118|		} else {
  741|    118|			*nextstar++ = '\0';
  742|    118|			if ( gotstar++ == 0 ) {
  ------------------
  |  Branch (742:9): [True: 88, False: 30]
  ------------------
  743|     88|				ftype = LDAP_SUBSTRING_INITIAL;
  ------------------
  |  |  603|     88|#define LDAP_SUBSTRING_INITIAL	((ber_tag_t) 0x80U)	/* context specific */
  ------------------
  744|     88|			} else {
  745|     30|				ftype = LDAP_SUBSTRING_ANY;
  ------------------
  |  |  604|     30|#define LDAP_SUBSTRING_ANY		((ber_tag_t) 0x81U)	/* context specific */
  ------------------
  746|     30|			}
  747|    118|		}
  748|       |
  749|    174|		if ( *val != '\0' || ftype == LDAP_SUBSTRING_ANY ) {
  ------------------
  |  |  604|     17|#define LDAP_SUBSTRING_ANY		((ber_tag_t) 0x81U)	/* context specific */
  ------------------
  |  Branch (749:8): [True: 157, False: 17]
  |  Branch (749:24): [True: 2, False: 15]
  ------------------
  750|    159|			ber_slen_t len = ldap_pvt_filter_value_unescape( val );
  751|       |
  752|    159|			if ( len <= 0  ) {
  ------------------
  |  Branch (752:9): [True: 2, False: 157]
  ------------------
  753|      2|				return -1;
  754|      2|			}
  755|       |
  756|    157|			if ( ber_printf( ber, "to", ftype, val, len ) == -1 ) {
  ------------------
  |  Branch (756:9): [True: 0, False: 157]
  ------------------
  757|      0|				return -1;
  758|      0|			}
  759|    157|		}
  760|    174|	}
  761|       |
  762|     58|	if ( ber_printf( ber, /*"{{"*/ "N}N}" ) == -1 ) {
  ------------------
  |  Branch (762:7): [True: 0, False: 58]
  ------------------
  763|      0|		return -1;
  764|      0|	}
  765|       |
  766|     58|	return 0;
  767|     58|}

ldap_memfree:
   40|     37|{
   41|       |	LDAP_FREE( p );
  ------------------
  |  |  648|     37|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
   42|     37|}

ldap_get_attribute_ber:
  130|  1.06k|{
  131|  1.06k|	ber_tag_t tag;
  132|  1.06k|	int rc = LDAP_SUCCESS;
  ------------------
  |  |  610|  1.06k|#define LDAP_SUCCESS				0x00
  ------------------
  133|       |
  134|  1.06k|	Debug0( LDAP_DEBUG_TRACE, "ldap_get_attribute_ber\n" );
  ------------------
  |  |   87|  1.06k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  1.06k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  1.06k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  1.06k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 1.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|  1.06k|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|  1.06k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 1.06k]
  |  |  ------------------
  ------------------
  135|       |
  136|  1.06k|	assert( ld != NULL );
  ------------------
  |  Branch (136:2): [True: 0, False: 1.06k]
  |  Branch (136:2): [True: 1.06k, False: 0]
  ------------------
  137|  1.06k|	assert( LDAP_VALID( ld ) );
  ------------------
  |  Branch (137:2): [True: 0, False: 1.06k]
  |  Branch (137:2): [True: 1.06k, False: 0]
  ------------------
  138|  1.06k|	assert( entry != NULL );
  ------------------
  |  Branch (138:2): [True: 0, False: 1.06k]
  |  Branch (138:2): [True: 1.06k, False: 0]
  ------------------
  139|  1.06k|	assert( ber != NULL );
  ------------------
  |  Branch (139:2): [True: 0, False: 1.06k]
  |  Branch (139:2): [True: 1.06k, False: 0]
  ------------------
  140|  1.06k|	assert( attr != NULL );
  ------------------
  |  Branch (140:2): [True: 0, False: 1.06k]
  |  Branch (140:2): [True: 1.06k, False: 0]
  ------------------
  141|       |
  142|  1.06k|	attr->bv_val = NULL;
  143|  1.06k|	attr->bv_len = 0;
  144|       |
  145|  1.06k|	if ( ber_pvt_ber_remaining( ber ) ) {
  ------------------
  |  |  126|  1.06k|#define ber_pvt_ber_remaining(ber)	((ber)->ber_end - (ber)->ber_ptr)
  |  |  ------------------
  |  |  |  Branch (126:36): [True: 917, False: 151]
  |  |  ------------------
  ------------------
  146|    917|		ber_len_t siz = sizeof( BerValue );
  147|       |
  148|       |		/* skip sequence, snarf attribute type */
  149|    917|		tag = ber_scanf( ber, vals ? "{mM}" : "{mx}", attr, vals,
  ------------------
  |  Branch (149:25): [True: 917, False: 0]
  ------------------
  150|    917|			&siz, (ber_len_t)0 );
  151|    917|		if( tag == LBER_ERROR ) {
  ------------------
  |  |   79|    917|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  |  Branch (151:7): [True: 278, False: 639]
  ------------------
  152|    278|			rc = ld->ld_errno = LDAP_DECODING_ERROR;
  ------------------
  |  |  739|    278|#define LDAP_DECODING_ERROR				(-4)
  ------------------
  153|    278|		}
  154|    917|	}
  155|       |
  156|  1.06k|	return rc;
  157|  1.06k|}

ldap_get_dn_ber:
  111|    456|{
  112|    456|	BerElement	tmp, *ber;
  113|    456|	ber_len_t	len = 0;
  114|    456|	int rc = LDAP_SUCCESS;
  ------------------
  |  |  610|    456|#define LDAP_SUCCESS				0x00
  ------------------
  115|       |
  116|    456|	Debug0( LDAP_DEBUG_TRACE, "ldap_get_dn_ber\n" );
  ------------------
  |  |   87|    456|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|    456|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|    456|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|    456|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 456]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|    456|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|    456|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 456]
  |  |  ------------------
  ------------------
  117|       |
  118|    456|	assert( ld != NULL );
  ------------------
  |  Branch (118:2): [True: 0, False: 456]
  |  Branch (118:2): [True: 456, False: 0]
  ------------------
  119|    456|	assert( LDAP_VALID(ld) );
  ------------------
  |  Branch (119:2): [True: 0, False: 456]
  |  Branch (119:2): [True: 456, False: 0]
  ------------------
  120|    456|	assert( entry != NULL );
  ------------------
  |  Branch (120:2): [True: 0, False: 456]
  |  Branch (120:2): [True: 456, False: 0]
  ------------------
  121|    456|	assert( dn != NULL );
  ------------------
  |  Branch (121:2): [True: 0, False: 456]
  |  Branch (121:2): [True: 456, False: 0]
  ------------------
  122|       |
  123|    456|	dn->bv_val = NULL;
  124|    456|	dn->bv_len = 0;
  125|       |
  126|    456|	if ( berout ) {
  ------------------
  |  Branch (126:7): [True: 456, False: 0]
  ------------------
  127|    456|		*berout = NULL;
  128|    456|		ber = ldap_alloc_ber_with_options( ld );
  129|    456|		if( ber == NULL ) {
  ------------------
  |  Branch (129:7): [True: 0, False: 456]
  ------------------
  130|      0|			return LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  131|      0|		}
  132|    456|		*berout = ber;
  133|    456|	} else {
  134|      0|		ber = &tmp;
  135|      0|	}
  136|       |		
  137|    456|	*ber = *entry->lm_ber;	/* struct copy */
  138|    456|	if ( ber_scanf( ber, "{ml{" /*}*/, dn, &len ) == LBER_ERROR ) {
  ------------------
  |  |   79|    456|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  |  Branch (138:7): [True: 16, False: 440]
  ------------------
  139|     16|		rc = ld->ld_errno = LDAP_DECODING_ERROR;
  ------------------
  |  |  739|     16|#define LDAP_DECODING_ERROR				(-4)
  ------------------
  140|     16|	}
  141|    456|	if ( rc == LDAP_SUCCESS ) {
  ------------------
  |  |  610|    456|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (141:7): [True: 440, False: 16]
  ------------------
  142|       |		/* set the length to avoid overrun */
  143|    440|		rc = ber_set_option( ber, LBER_OPT_REMAINING_BYTES, &len );
  ------------------
  |  |  104|    440|#define LBER_OPT_REMAINING_BYTES	LBER_OPT_BER_REMAINING_BYTES
  |  |  ------------------
  |  |  |  |   98|    440|#define LBER_OPT_BER_REMAINING_BYTES	0x03
  |  |  ------------------
  ------------------
  144|    440|		if( rc != LBER_OPT_SUCCESS ) {
  ------------------
  |  |  168|    440|#define LBER_OPT_SUCCESS	(0)
  ------------------
  |  Branch (144:7): [True: 0, False: 440]
  ------------------
  145|      0|			rc = ld->ld_errno = LDAP_LOCAL_ERROR;
  ------------------
  |  |  737|      0|#define LDAP_LOCAL_ERROR				(-2)
  ------------------
  146|      0|		}
  147|    440|	}
  148|    456|	if ( rc != LDAP_SUCCESS && berout ) {
  ------------------
  |  |  610|    912|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (148:7): [True: 16, False: 440]
  |  Branch (148:29): [True: 16, False: 0]
  ------------------
  149|     16|		ber_free( ber, 0 );
  150|       |		*berout = NULL;
  151|     16|	}
  152|    456|	return rc;
  153|    456|}

ldap_int_initialize_global_options:
  556|      1|{
  557|      1|	if (dbglvl)
  ------------------
  |  Branch (557:6): [True: 0, False: 1]
  ------------------
  558|      0|	    gopts->ldo_debug = *dbglvl;
  559|      1|	else
  560|      1|		gopts->ldo_debug = 0;
  561|       |
  562|      1|	gopts->ldo_version   = LDAP_VERSION2;
  ------------------
  |  |   38|      1|#define LDAP_VERSION2	2
  ------------------
  563|      1|	gopts->ldo_deref     = LDAP_DEREF_NEVER;
  ------------------
  |  |  795|      1|#define LDAP_DEREF_NEVER		0x00
  ------------------
  564|      1|	gopts->ldo_timelimit = LDAP_NO_LIMIT;
  ------------------
  |  |  800|      1|#define LDAP_NO_LIMIT			0
  ------------------
  565|      1|	gopts->ldo_sizelimit = LDAP_NO_LIMIT;
  ------------------
  |  |  800|      1|#define LDAP_NO_LIMIT			0
  ------------------
  566|       |
  567|      1|	gopts->ldo_tm_api.tv_sec = -1;
  568|      1|	gopts->ldo_tm_net.tv_sec = -1;
  569|       |
  570|      1|	memset( &gopts->ldo_local_ip_addrs, 0,
  571|      1|		sizeof( gopts->ldo_local_ip_addrs ) );
  572|       |
  573|       |	/* ldo_defludp will be freed by the termination handler
  574|       |	 */
  575|      1|	ldap_url_parselist(&gopts->ldo_defludp, "ldap://localhost/");
  576|      1|	gopts->ldo_defport = LDAP_PORT;
  ------------------
  |  |   66|      1|#define LDAP_PORT		389		/* ldap:///		default LDAP port */
  ------------------
  577|       |#if !defined(__GNUC__) && !defined(PIC)
  578|       |	/* Do this only for a static library, and only if we can't
  579|       |	 * arrange for it to be executed as a library destructor
  580|       |	 */
  581|       |	atexit(ldap_int_destroy_global_options);
  582|       |#endif
  583|       |
  584|      1|	gopts->ldo_refhoplimit = LDAP_DEFAULT_REFHOPLIMIT;
  ------------------
  |  |  145|      1|#define LDAP_DEFAULT_REFHOPLIMIT 5
  ------------------
  585|      1|	gopts->ldo_rebind_proc = NULL;
  586|      1|	gopts->ldo_rebind_params = NULL;
  587|       |
  588|      1|	LDAP_BOOL_ZERO(gopts);
  ------------------
  |  |  160|      1|#define LDAP_BOOL_ZERO(lo) ((lo)->ldo_booleans = 0)
  ------------------
  589|       |
  590|      1|	LDAP_BOOL_SET(gopts, LDAP_BOOL_REFERRALS);
  ------------------
  |  |  158|      1|#define LDAP_BOOL_SET(lo, bool) ((lo)->ldo_booleans |= LDAP_BOOL(bool))
  |  |  ------------------
  |  |  |  |  155|      1|#define LDAP_BOOL(n)	((LDAP_BOOLEANS)1 << (n))
  |  |  ------------------
  ------------------
  591|       |
  592|       |#ifdef LDAP_CONNECTIONLESS
  593|       |	gopts->ldo_peer = NULL;
  594|       |	gopts->ldo_cldapdn = NULL;
  595|       |	gopts->ldo_is_udp = 0;
  596|       |#endif
  597|       |
  598|       |#ifdef HAVE_CYRUS_SASL
  599|       |	gopts->ldo_def_sasl_mech = NULL;
  600|       |	gopts->ldo_def_sasl_realm = NULL;
  601|       |	gopts->ldo_def_sasl_authcid = NULL;
  602|       |	gopts->ldo_def_sasl_authzid = NULL;
  603|       |
  604|       |	memset( &gopts->ldo_sasl_secprops,
  605|       |		'\0', sizeof(gopts->ldo_sasl_secprops) );
  606|       |
  607|       |	gopts->ldo_sasl_secprops.max_ssf = INT_MAX;
  608|       |	gopts->ldo_sasl_secprops.maxbufsize = SASL_MAX_BUFF_SIZE;
  609|       |	gopts->ldo_sasl_secprops.security_flags =
  610|       |		SASL_SEC_NOPLAINTEXT | SASL_SEC_NOANONYMOUS;
  611|       |#endif
  612|       |
  613|       |#ifdef HAVE_TLS
  614|       |	gopts->ldo_tls_connect_cb = NULL;
  615|       |	gopts->ldo_tls_connect_arg = NULL;
  616|       |	gopts->ldo_tls_require_cert = LDAP_OPT_X_TLS_DEMAND;
  617|       |	gopts->ldo_tls_require_san = LDAP_OPT_X_TLS_ALLOW;
  618|       |#endif
  619|      1|	gopts->ldo_keepalive_probes = 0;
  620|      1|	gopts->ldo_keepalive_interval = 0;
  621|      1|	gopts->ldo_keepalive_idle = 0;
  622|       |
  623|      1|	gopts->ldo_tcp_user_timeout = 0;
  624|       |
  625|      1|#ifdef LDAP_R_COMPILE
  626|      1|	ldap_pvt_thread_mutex_init( &gopts->ldo_mutex );
  627|      1|#endif
  628|      1|	gopts->ldo_valid = LDAP_INITIALIZED;
  ------------------
  |  |  224|      1|#define LDAP_INITIALIZED	0x1
  ------------------
  629|      1|   	return;
  630|      1|}
ldap_int_initialize:
  641|      1|{
  642|      1|#ifdef LDAP_R_COMPILE
  643|      1|	static ldap_pvt_thread_mutex_t init_mutex;
  644|      1|	LDAP_PVT_MUTEX_FIRSTCREATE( init_mutex );
  ------------------
  |  |   37|      1|#define LDAP_PVT_MUTEX_FIRSTCREATE	LDAP_INT_MUTEX_FIRSTCREATE
  |  |  ------------------
  |  |  |  |   73|      1|#define LDAP_INT_MUTEX_FIRSTCREATE(m)	((void) 0)
  |  |  ------------------
  ------------------
  645|       |
  646|      1|	LDAP_MUTEX_LOCK( &init_mutex );
  ------------------
  |  |  551|      1|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  647|      1|#endif
  648|      1|	if ( gopts->ldo_valid == LDAP_INITIALIZED ) {
  ------------------
  |  |  224|      1|#define LDAP_INITIALIZED	0x1
  ------------------
  |  Branch (648:7): [True: 0, False: 1]
  ------------------
  649|       |		/* someone else got here first */
  650|      0|		goto done;
  651|      0|	}
  652|       |
  653|      1|	ldap_int_error_init();
  654|       |
  655|      1|	ldap_int_utils_init();
  656|       |
  657|       |#ifdef HAVE_WINSOCK2
  658|       |{	WORD wVersionRequested;
  659|       |	WSADATA wsaData;
  660|       | 
  661|       |	wVersionRequested = MAKEWORD( 2, 0 );
  662|       |	if ( WSAStartup( wVersionRequested, &wsaData ) != 0 ) {
  663|       |		/* Tell the user that we couldn't find a usable */
  664|       |		/* WinSock DLL.                                  */
  665|       |		goto done;
  666|       |	}
  667|       | 
  668|       |	/* Confirm that the WinSock DLL supports 2.0.*/
  669|       |	/* Note that if the DLL supports versions greater    */
  670|       |	/* than 2.0 in addition to 2.0, it will still return */
  671|       |	/* 2.0 in wVersion since that is the version we      */
  672|       |	/* requested.                                        */
  673|       | 
  674|       |	if ( LOBYTE( wsaData.wVersion ) != 2 ||
  675|       |		HIBYTE( wsaData.wVersion ) != 0 )
  676|       |	{
  677|       |	    /* Tell the user that we couldn't find a usable */
  678|       |	    /* WinSock DLL.                                  */
  679|       |	    WSACleanup( );
  680|       |	    goto done;
  681|       |	}
  682|       |}	/* The WinSock DLL is acceptable. Proceed. */
  683|       |#elif defined(HAVE_WINSOCK)
  684|       |{	WSADATA wsaData;
  685|       |	if ( WSAStartup( 0x0101, &wsaData ) != 0 ) {
  686|       |	    goto done;
  687|       |	}
  688|       |}
  689|       |#endif
  690|       |
  691|       |#if defined(HAVE_TLS) || defined(HAVE_CYRUS_SASL)
  692|       |	LDAP_MUTEX_LOCK( &ldap_int_hostname_mutex );
  693|       |	{
  694|       |		char	*name = ldap_int_hostname;
  695|       |
  696|       |		ldap_int_hostname = ldap_pvt_get_fqdn( name );
  697|       |
  698|       |		if ( name != NULL && name != ldap_int_hostname ) {
  699|       |			LDAP_FREE( name );
  700|       |		}
  701|       |	}
  702|       |	LDAP_MUTEX_UNLOCK( &ldap_int_hostname_mutex );
  703|       |#endif
  704|       |
  705|       |#ifndef HAVE_POLL
  706|       |	if ( ldap_int_tblsize == 0 ) ldap_int_ip_init();
  707|       |#endif
  708|       |
  709|       |#ifdef HAVE_CYRUS_SASL
  710|       |	if ( ldap_int_sasl_init() != 0 ) {
  711|       |		goto done;
  712|       |	}
  713|       |#endif
  714|       |
  715|      1|	ldap_int_initialize_global_options(gopts, dbglvl);
  716|       |
  717|      1|	if( getenv("LDAPNOINIT") != NULL ) {
  ------------------
  |  Branch (717:6): [True: 0, False: 1]
  ------------------
  718|      0|		goto done;
  719|      0|	}
  720|       |
  721|      1|#ifdef LDAP_R_COMPILE
  722|      1|	if( getenv("LDAPSTACKGUARD") != NULL ) {
  ------------------
  |  Branch (722:6): [True: 0, False: 1]
  ------------------
  723|      0|		ldap_int_stackguard = 1;
  724|      0|	}
  725|      1|#endif
  726|       |
  727|       |#ifdef HAVE_CYRUS_SASL
  728|       |	{
  729|       |		/* set authentication identity to current user name */
  730|       |		char *user = getenv("USER");
  731|       |
  732|       |		if( user == NULL ) user = getenv("USERNAME");
  733|       |		if( user == NULL ) user = getenv("LOGNAME");
  734|       |
  735|       |		if( user != NULL ) {
  736|       |			gopts->ldo_def_sasl_authcid = LDAP_STRDUP( user );
  737|       |		}
  738|       |    }
  739|       |#endif
  740|       |
  741|      1|	openldap_ldap_init_w_sysconf(LDAP_CONF_FILE);
  ------------------
  |  |   37|      1|#define LDAP_CONF_FILE	 LDAP_SYSCONFDIR LDAP_DIRSEP "ldap.conf"
  |  |  ------------------
  |  |  |  |   58|      1|#define LDAP_SYSCONFDIR		"/src/curl_fuzzer/build/openldap-2.6.13-install/etc/openldap"
  |  |  ------------------
  ------------------
  742|       |
  743|      1|#ifdef HAVE_GETEUID
  744|      1|	if ( geteuid() != getuid() )
  ------------------
  |  Branch (744:7): [True: 0, False: 1]
  ------------------
  745|      0|		goto done;
  746|      1|#endif
  747|       |
  748|      1|	openldap_ldap_init_w_userconf(LDAP_USERRC_FILE);
  ------------------
  |  |   38|      1|#define LDAP_USERRC_FILE "ldaprc"
  ------------------
  749|       |
  750|      1|	{
  751|      1|		char *altfile = getenv(LDAP_ENV_PREFIX "CONF");
  ------------------
  |  |   39|      1|#define LDAP_ENV_PREFIX "LDAP"
  ------------------
  752|       |
  753|      1|		if( altfile != NULL ) {
  ------------------
  |  Branch (753:7): [True: 0, False: 1]
  ------------------
  754|      0|			Debug2(LDAP_DEBUG_TRACE, "ldap_init: %s env is %s\n",
  ------------------
  |  |   97|      0|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      0|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|      0|	ldap_log_printf( NULL, (level), fmt, arg1, arg2 ); \
  |  |   99|      0|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (99:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  755|      0|			      LDAP_ENV_PREFIX "CONF", altfile );
  756|      0|			openldap_ldap_init_w_sysconf( altfile );
  757|      0|		}
  758|      1|		else
  759|      1|			Debug1(LDAP_DEBUG_TRACE, "ldap_init: %s env is NULL\n",
  ------------------
  |  |   92|      1|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      1|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      1|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      1|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      1|	ldap_log_printf( NULL, (level), fmt, arg1 ); \
  |  |   94|      1|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 1]
  |  |  ------------------
  ------------------
  760|      1|			      LDAP_ENV_PREFIX "CONF" );
  761|      1|	}
  762|       |
  763|      1|	{
  764|      1|		char *altfile = getenv(LDAP_ENV_PREFIX "RC");
  ------------------
  |  |   39|      1|#define LDAP_ENV_PREFIX "LDAP"
  ------------------
  765|       |
  766|      1|		if( altfile != NULL ) {
  ------------------
  |  Branch (766:7): [True: 0, False: 1]
  ------------------
  767|      0|			Debug2(LDAP_DEBUG_TRACE, "ldap_init: %s env is %s\n",
  ------------------
  |  |   97|      0|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      0|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|      0|	ldap_log_printf( NULL, (level), fmt, arg1, arg2 ); \
  |  |   99|      0|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (99:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  768|      0|			      LDAP_ENV_PREFIX "RC", altfile );
  769|      0|			openldap_ldap_init_w_userconf( altfile );
  770|      0|		}
  771|      1|		else
  772|      1|			Debug1(LDAP_DEBUG_TRACE, "ldap_init: %s env is NULL\n",
  ------------------
  |  |   92|      1|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      1|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      1|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      1|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      1|	ldap_log_printf( NULL, (level), fmt, arg1 ); \
  |  |   94|      1|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 1]
  |  |  ------------------
  ------------------
  773|      1|			      LDAP_ENV_PREFIX "RC" );
  774|      1|	}
  775|       |
  776|      1|	openldap_ldap_init_w_env(gopts, NULL);
  777|       |
  778|      1|done:;
  779|      1|#ifdef LDAP_R_COMPILE
  780|      1|	LDAP_MUTEX_UNLOCK( &init_mutex );
  ------------------
  |  |  552|      1|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  781|      1|#endif
  782|      1|}
init.c:openldap_ldap_init_w_sysconf:
  353|      1|{
  354|      1|	openldap_ldap_init_w_conf( file, 0 );
  355|      1|}
init.c:openldap_ldap_init_w_conf:
  283|      4|{
  284|      4|	char linebuf[ AC_LINE_MAX ];
  285|      4|	FILE *fp;
  286|      4|	int i;
  287|      4|	char *cmd, *opt;
  288|      4|	char *start, *end;
  289|      4|	struct ldapoptions *gopts;
  290|       |
  291|      4|	if ((gopts = LDAP_INT_GLOBAL_OPT()) == NULL) {
  ------------------
  |  |   70|      4|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  ------------------
  |  Branch (291:6): [True: 0, False: 4]
  ------------------
  292|      0|		return;			/* Could not allocate mem for global options */
  293|      0|	}
  294|       |
  295|      4|	if (file == NULL) {
  ------------------
  |  Branch (295:6): [True: 0, False: 4]
  ------------------
  296|       |		/* no file name */
  297|      0|		return;
  298|      0|	}
  299|       |
  300|      4|	Debug1(LDAP_DEBUG_TRACE, "ldap_init: trying %s\n", file );
  ------------------
  |  |   92|      4|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      4|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      4|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      4|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      4|	ldap_log_printf( NULL, (level), fmt, arg1 ); \
  |  |   94|      4|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 4]
  |  |  ------------------
  ------------------
  301|       |
  302|      4|	fp = fopen(file, "r");
  303|      4|	if(fp == NULL) {
  ------------------
  |  Branch (303:5): [True: 4, False: 0]
  ------------------
  304|       |		/* could not open file */
  305|      4|		return;
  306|      4|	}
  307|       |
  308|      0|	Debug1(LDAP_DEBUG_TRACE, "ldap_init: using %s\n", file );
  ------------------
  |  |   92|      0|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      0|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      0|	ldap_log_printf( NULL, (level), fmt, arg1 ); \
  |  |   94|      0|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  309|       |
  310|      0|	while((start = fgets(linebuf, sizeof(linebuf), fp)) != NULL) {
  ------------------
  |  Branch (310:8): [True: 0, False: 0]
  ------------------
  311|       |		/* skip lines starting with '#' */
  312|      0|		if(*start == '#') continue;
  ------------------
  |  Branch (312:6): [True: 0, False: 0]
  ------------------
  313|       |
  314|       |		/* trim leading white space */
  315|      0|		while((*start != '\0') && isspace((unsigned char) *start))
  ------------------
  |  Branch (315:9): [True: 0, False: 0]
  |  Branch (315:29): [True: 0, False: 0]
  ------------------
  316|      0|			start++;
  317|       |
  318|       |		/* anything left? */
  319|      0|		if(*start == '\0') continue;
  ------------------
  |  Branch (319:6): [True: 0, False: 0]
  ------------------
  320|       |
  321|       |		/* trim trailing white space */
  322|      0|		end = &start[strlen(start)-1];
  323|      0|		while(isspace((unsigned char)*end)) end--;
  ------------------
  |  Branch (323:9): [True: 0, False: 0]
  ------------------
  324|      0|		end[1] = '\0';
  325|       |
  326|       |		/* anything left? */
  327|      0|		if(*start == '\0') continue;
  ------------------
  |  Branch (327:6): [True: 0, False: 0]
  ------------------
  328|       |		
  329|       |
  330|       |		/* parse the command */
  331|      0|		cmd=start;
  332|      0|		while((*start != '\0') && !isspace((unsigned char)*start)) {
  ------------------
  |  Branch (332:9): [True: 0, False: 0]
  |  Branch (332:29): [True: 0, False: 0]
  ------------------
  333|      0|			start++;
  334|      0|		}
  335|      0|		if(*start == '\0') {
  ------------------
  |  Branch (335:6): [True: 0, False: 0]
  ------------------
  336|       |			/* command has no argument */
  337|      0|			continue;
  338|      0|		} 
  339|       |
  340|      0|		*start++ = '\0';
  341|       |
  342|       |		/* we must have some whitespace to skip */
  343|      0|		while(isspace((unsigned char)*start)) start++;
  ------------------
  |  Branch (343:9): [True: 0, False: 0]
  ------------------
  344|      0|		opt = start;
  345|       |
  346|      0|		ldap_int_conf_option( gopts, cmd, opt, userconf );
  347|      0|	}
  348|       |
  349|      0|	fclose(fp);
  350|      0|}
init.c:openldap_ldap_init_w_userconf:
  358|      1|{
  359|      1|	char *home;
  360|      1|	char *path = NULL;
  361|       |
  362|      1|	if (file == NULL) {
  ------------------
  |  Branch (362:6): [True: 0, False: 1]
  ------------------
  363|       |		/* no file name */
  364|      0|		return;
  365|      0|	}
  366|       |
  367|      1|	home = getenv("HOME");
  368|       |
  369|      1|	if (home != NULL) {
  ------------------
  |  Branch (369:6): [True: 1, False: 0]
  ------------------
  370|      1|		Debug1(LDAP_DEBUG_TRACE, "ldap_init: HOME env is %s\n",
  ------------------
  |  |   92|      1|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      1|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      1|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      1|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      1|	ldap_log_printf( NULL, (level), fmt, arg1 ); \
  |  |   94|      1|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 1]
  |  |  ------------------
  ------------------
  371|      1|		      home );
  372|      1|		path = LDAP_MALLOC(strlen(home) + strlen(file) + sizeof( LDAP_DIRSEP "."));
  ------------------
  |  |  645|      1|#define LDAP_MALLOC(s)		(ber_memalloc_x((s),NULL))
  ------------------
  373|      1|	} else {
  374|      0|		Debug0(LDAP_DEBUG_TRACE, "ldap_init: HOME env is NULL\n" );
  ------------------
  |  |   87|      0|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      0|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|      0|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|      0|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  375|      0|	}
  376|       |
  377|      1|	if(home != NULL && path != NULL) {
  ------------------
  |  Branch (377:5): [True: 1, False: 0]
  |  Branch (377:21): [True: 1, False: 0]
  ------------------
  378|       |		/* we assume UNIX path syntax is used... */
  379|       |
  380|       |		/* try ~/file */
  381|      1|		sprintf(path, "%s" LDAP_DIRSEP "%s", home, file);
  382|      1|		openldap_ldap_init_w_conf(path, 1);
  383|       |
  384|       |		/* try ~/.file */
  385|      1|		sprintf(path, "%s" LDAP_DIRSEP ".%s", home, file);
  386|      1|		openldap_ldap_init_w_conf(path, 1);
  387|      1|	}
  388|       |
  389|      1|	if(path != NULL) {
  ------------------
  |  Branch (389:5): [True: 1, False: 0]
  ------------------
  390|      1|		LDAP_FREE(path);
  ------------------
  |  |  648|      1|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  391|      1|	}
  392|       |
  393|       |	/* try file */
  394|      1|	openldap_ldap_init_w_conf(file, 1);
  395|      1|}
init.c:openldap_ldap_init_w_env:
  400|      1|{
  401|      1|	char buf[MAX_LDAP_ATTR_LEN+MAX_LDAP_ENV_PREFIX_LEN];
  402|      1|	int len;
  403|      1|	int i;
  404|      1|	void *p;
  405|      1|	char *value;
  406|       |
  407|      1|	if (prefix == NULL) {
  ------------------
  |  Branch (407:6): [True: 1, False: 0]
  ------------------
  408|      1|		prefix = LDAP_ENV_PREFIX;
  ------------------
  |  |   39|      1|#define LDAP_ENV_PREFIX "LDAP"
  ------------------
  409|      1|	}
  410|       |
  411|      1|	strncpy(buf, prefix, MAX_LDAP_ENV_PREFIX_LEN);
  ------------------
  |  |  149|      1|#define MAX_LDAP_ENV_PREFIX_LEN 8
  ------------------
  412|      1|	buf[MAX_LDAP_ENV_PREFIX_LEN] = '\0';
  ------------------
  |  |  149|      1|#define MAX_LDAP_ENV_PREFIX_LEN 8
  ------------------
  413|      1|	len = strlen(buf);
  414|       |
  415|     17|	for(i=0; attrs[i].type != ATTR_NONE; i++) {
  ------------------
  |  |   47|     17|#define ATTR_NONE	0
  ------------------
  |  Branch (415:11): [True: 16, False: 1]
  ------------------
  416|     16|		strcpy(&buf[len], attrs[i].name);
  417|     16|		value = getenv(buf);
  418|       |
  419|     16|		if(value == NULL) {
  ------------------
  |  Branch (419:6): [True: 16, False: 0]
  ------------------
  420|     16|			continue;
  421|     16|		}
  422|       |
  423|      0|		switch(attrs[i].type) {
  ------------------
  |  Branch (423:10): [True: 0, False: 0]
  ------------------
  424|      0|		case ATTR_BOOL:
  ------------------
  |  |   48|      0|#define ATTR_BOOL	1
  ------------------
  |  Branch (424:3): [True: 0, False: 0]
  ------------------
  425|      0|			if((strcasecmp(value, "on") == 0) 
  ------------------
  |  Branch (425:7): [True: 0, False: 0]
  ------------------
  426|      0|				|| (strcasecmp(value, "yes") == 0)
  ------------------
  |  Branch (426:8): [True: 0, False: 0]
  ------------------
  427|      0|				|| (strcasecmp(value, "true") == 0))
  ------------------
  |  Branch (427:8): [True: 0, False: 0]
  ------------------
  428|      0|			{
  429|      0|				LDAP_BOOL_SET(gopts, attrs[i].offset);
  ------------------
  |  |  158|      0|#define LDAP_BOOL_SET(lo, bool) ((lo)->ldo_booleans |= LDAP_BOOL(bool))
  |  |  ------------------
  |  |  |  |  155|      0|#define LDAP_BOOL(n)	((LDAP_BOOLEANS)1 << (n))
  |  |  ------------------
  ------------------
  430|       |
  431|      0|			} else {
  432|      0|				LDAP_BOOL_CLR(gopts, attrs[i].offset);
  ------------------
  |  |  159|      0|#define LDAP_BOOL_CLR(lo, bool) ((lo)->ldo_booleans &= ~LDAP_BOOL(bool))
  |  |  ------------------
  |  |  |  |  155|      0|#define LDAP_BOOL(n)	((LDAP_BOOLEANS)1 << (n))
  |  |  ------------------
  ------------------
  433|      0|			}
  434|      0|			break;
  435|       |
  436|      0|		case ATTR_INT:
  ------------------
  |  |   49|      0|#define ATTR_INT	2
  ------------------
  |  Branch (436:3): [True: 0, False: 0]
  ------------------
  437|      0|			p = &((char *) gopts)[attrs[i].offset];
  438|      0|			* (int*) p = atoi(value);
  439|      0|			break;
  440|       |
  441|      0|		case ATTR_KV: {
  ------------------
  |  |   50|      0|#define ATTR_KV		3
  ------------------
  |  Branch (441:3): [True: 0, False: 0]
  ------------------
  442|      0|				const struct ol_keyvalue *kv;
  443|       |
  444|      0|				for(kv = attrs[i].data;
  445|      0|					kv->key != NULL;
  ------------------
  |  Branch (445:6): [True: 0, False: 0]
  ------------------
  446|      0|					kv++) {
  447|       |
  448|      0|					if(strcasecmp(value, kv->key) == 0) {
  ------------------
  |  Branch (448:9): [True: 0, False: 0]
  ------------------
  449|      0|						p = &((char *) gopts)[attrs[i].offset];
  450|      0|						* (int*) p = kv->value;
  451|      0|						break;
  452|      0|					}
  453|      0|				}
  454|      0|			} break;
  455|       |
  456|      0|		case ATTR_STRING:
  ------------------
  |  |   51|      0|#define ATTR_STRING	4
  ------------------
  |  Branch (456:3): [True: 0, False: 0]
  ------------------
  457|      0|			p = &((char *) gopts)[attrs[i].offset];
  458|      0|			if (* (char**) p != NULL) LDAP_FREE(* (char**) p);
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  |  Branch (458:8): [True: 0, False: 0]
  ------------------
  459|      0|			if (*value == '\0') {
  ------------------
  |  Branch (459:8): [True: 0, False: 0]
  ------------------
  460|      0|				* (char**) p = NULL;
  461|      0|			} else {
  462|      0|				* (char**) p = LDAP_STRDUP(value);
  ------------------
  |  |  650|      0|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  463|      0|			}
  464|      0|			break;
  465|      0|		case ATTR_OPTION:
  ------------------
  |  |   52|      0|#define ATTR_OPTION	5
  ------------------
  |  Branch (465:3): [True: 0, False: 0]
  ------------------
  466|      0|			ldap_set_option( NULL, attrs[i].offset, value );
  467|      0|			break;
  468|      0|		case ATTR_SASL:
  ------------------
  |  |   54|      0|#define ATTR_SASL	6
  ------------------
  |  Branch (468:3): [True: 0, False: 0]
  ------------------
  469|       |#ifdef HAVE_CYRUS_SASL
  470|       |		   	ldap_int_sasl_config( gopts, attrs[i].offset, value );
  471|       |#endif			 	
  472|      0|		   	break;
  473|      0|		case ATTR_TLS:
  ------------------
  |  |   55|      0|#define ATTR_TLS	7
  ------------------
  |  Branch (473:3): [True: 0, False: 0]
  ------------------
  474|       |#ifdef HAVE_TLS
  475|       |		   	ldap_pvt_tls_config( NULL, attrs[i].offset, value );
  476|       |#endif			 	
  477|      0|		   	break;
  478|      0|		case ATTR_OPT_TV: {
  ------------------
  |  |   57|      0|#define ATTR_OPT_TV	8
  ------------------
  |  Branch (478:3): [True: 0, False: 0]
  ------------------
  479|      0|			struct timeval tv;
  480|      0|			char *next;
  481|      0|			tv.tv_usec = 0;
  482|      0|			tv.tv_sec = strtol( value, &next, 10 );
  483|      0|			if ( next != value && next[ 0 ] == '\0' && tv.tv_sec > 0 ) {
  ------------------
  |  Branch (483:9): [True: 0, False: 0]
  |  Branch (483:26): [True: 0, False: 0]
  |  Branch (483:47): [True: 0, False: 0]
  ------------------
  484|      0|				(void)ldap_set_option( NULL, attrs[i].offset, (const void *)&tv );
  485|      0|			}
  486|      0|			} break;
  487|      0|		case ATTR_OPT_INT: {
  ------------------
  |  |   58|      0|#define ATTR_OPT_INT	9
  ------------------
  |  Branch (487:3): [True: 0, False: 0]
  ------------------
  488|      0|			long l;
  489|      0|			char *next;
  490|      0|			l = strtol( value, &next, 10 );
  491|      0|			if ( next != value && next[ 0 ] == '\0' && l > 0 && (long)((int)l) == l ) {
  ------------------
  |  Branch (491:9): [True: 0, False: 0]
  |  Branch (491:26): [True: 0, False: 0]
  |  Branch (491:47): [True: 0, False: 0]
  |  Branch (491:56): [True: 0, False: 0]
  ------------------
  492|      0|				int v = (int)l;
  493|       |				(void)ldap_set_option( NULL, attrs[i].offset, (const void *)&v );
  494|      0|			}
  495|      0|			} break;
  496|      0|		}
  497|      0|	}
  498|      1|}

ldap_create:
  120|  3.39k|{
  121|  3.39k|	LDAP			*ld;
  122|  3.39k|	struct ldapoptions	*gopts;
  123|       |
  124|  3.39k|	*ldp = NULL;
  125|       |	/* Get pointer to global option structure */
  126|  3.39k|	if ( (gopts = LDAP_INT_GLOBAL_OPT()) == NULL) {
  ------------------
  |  |   70|  3.39k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  ------------------
  |  Branch (126:7): [True: 0, False: 3.39k]
  ------------------
  127|      0|		return LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  128|      0|	}
  129|       |
  130|       |	/* Initialize the global options, if not already done. */
  131|  3.39k|	if( gopts->ldo_valid != LDAP_INITIALIZED ) {
  ------------------
  |  |  224|  3.39k|#define LDAP_INITIALIZED	0x1
  ------------------
  |  Branch (131:6): [True: 1, False: 3.39k]
  ------------------
  132|      1|		ldap_int_initialize(gopts, NULL);
  133|      1|		if ( gopts->ldo_valid != LDAP_INITIALIZED )
  ------------------
  |  |  224|      1|#define LDAP_INITIALIZED	0x1
  ------------------
  |  Branch (133:8): [True: 0, False: 1]
  ------------------
  134|      0|			return LDAP_LOCAL_ERROR;
  ------------------
  |  |  737|      0|#define LDAP_LOCAL_ERROR				(-2)
  ------------------
  135|      1|	}
  136|       |
  137|  3.39k|	Debug0( LDAP_DEBUG_TRACE, "ldap_create\n" );
  ------------------
  |  |   87|  3.39k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  3.39k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  3.39k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  3.39k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 3.39k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|  3.39k|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|  3.39k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 3.39k]
  |  |  ------------------
  ------------------
  138|       |
  139|  3.39k|	if ( (ld = (LDAP *) LDAP_CALLOC( 1, sizeof(LDAP) )) == NULL ) {
  ------------------
  |  |  646|  3.39k|#define LDAP_CALLOC(n,s)	(ber_memcalloc_x((n),(s),NULL))
  ------------------
  |  Branch (139:7): [True: 0, False: 3.39k]
  ------------------
  140|      0|		return( LDAP_NO_MEMORY );
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  141|      0|	}
  142|       |   
  143|  3.39k|	if ( (ld->ldc = (struct ldap_common *) LDAP_CALLOC( 1,
  ------------------
  |  |  646|  3.39k|#define LDAP_CALLOC(n,s)	(ber_memcalloc_x((n),(s),NULL))
  ------------------
  |  Branch (143:7): [True: 0, False: 3.39k]
  ------------------
  144|  3.39k|			sizeof(struct ldap_common) )) == NULL ) {
  145|      0|		LDAP_FREE( (char *)ld );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  146|      0|		return( LDAP_NO_MEMORY );
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  147|      0|	}
  148|       |	/* copy the global options */
  149|  3.39k|	LDAP_MUTEX_LOCK( &gopts->ldo_mutex );
  ------------------
  |  |  551|  3.39k|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  150|  3.39k|	AC_MEMCPY(&ld->ld_options, gopts, sizeof(ld->ld_options));
  ------------------
  |  |   86|  3.39k|#define AC_MEMCPY( d, s, n ) (SAFEMEMCPY((d),(s),(n)))
  |  |  ------------------
  |  |  |  |   77|  3.39k|#		define SAFEMEMCPY( d, s, n ) 	memmove((d), (s), (n))
  |  |  ------------------
  ------------------
  151|  3.39k|#ifdef LDAP_R_COMPILE
  152|       |	/* Properly initialize the structs mutex */
  153|  3.39k|	ldap_pvt_thread_mutex_init( &(ld->ld_ldopts_mutex) );
  ------------------
  |  |  518|  3.39k|#define	ld_ldopts_mutex		ld_options.ldo_mutex
  |  |  ------------------
  |  |  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
  154|  3.39k|#endif
  155|       |
  156|       |#ifdef HAVE_TLS
  157|       |	if ( ld->ld_options.ldo_tls_pin_hashalg ) {
  158|       |		int len = strlen( gopts->ldo_tls_pin_hashalg );
  159|       |
  160|       |		ld->ld_options.ldo_tls_pin_hashalg =
  161|       |			LDAP_MALLOC( len + 1 + gopts->ldo_tls_pin.bv_len );
  162|       |		if ( !ld->ld_options.ldo_tls_pin_hashalg ) goto nomem;
  163|       |
  164|       |		ld->ld_options.ldo_tls_pin.bv_val = ld->ld_options.ldo_tls_pin_hashalg
  165|       |			+ len + 1;
  166|       |		AC_MEMCPY( ld->ld_options.ldo_tls_pin_hashalg, gopts->ldo_tls_pin_hashalg,
  167|       |				len + 1 + gopts->ldo_tls_pin.bv_len );
  168|       |	} else if ( !BER_BVISEMPTY(&ld->ld_options.ldo_tls_pin) ) {
  169|       |		ber_dupbv( &ld->ld_options.ldo_tls_pin, &gopts->ldo_tls_pin );
  170|       |	}
  171|       |#endif
  172|  3.39k|	LDAP_MUTEX_UNLOCK( &gopts->ldo_mutex );
  ------------------
  |  |  552|  3.39k|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  173|       |
  174|  3.39k|	ld->ld_valid = LDAP_VALID_SESSION;
  ------------------
  |  |  486|  3.39k|#define ld_valid		ld_options.ldo_valid
  |  |  ------------------
  |  |  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
              	ld->ld_valid = LDAP_VALID_SESSION;
  ------------------
  |  |  225|  3.39k|#define LDAP_VALID_SESSION	0x2
  ------------------
  175|       |
  176|       |	/* but not pointers to malloc'ed items */
  177|  3.39k|	ld->ld_options.ldo_sctrls = NULL;
  ------------------
  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  ------------------
  178|  3.39k|	ld->ld_options.ldo_cctrls = NULL;
  ------------------
  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  ------------------
  179|  3.39k|	ld->ld_options.ldo_defludp = NULL;
  ------------------
  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  ------------------
  180|  3.39k|	ld->ld_options.ldo_conn_cbs = NULL;
  ------------------
  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  ------------------
  181|       |
  182|  3.39k|	ld->ld_options.ldo_defbase = gopts->ldo_defbase
  ------------------
  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  ------------------
  |  Branch (182:31): [True: 0, False: 3.39k]
  ------------------
  183|  3.39k|		? LDAP_STRDUP( gopts->ldo_defbase ) : NULL;
  ------------------
  |  |  650|      0|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  184|       |
  185|       |#ifdef HAVE_CYRUS_SASL
  186|       |	ld->ld_options.ldo_def_sasl_mech = gopts->ldo_def_sasl_mech
  187|       |		? LDAP_STRDUP( gopts->ldo_def_sasl_mech ) : NULL;
  188|       |	ld->ld_options.ldo_def_sasl_realm = gopts->ldo_def_sasl_realm
  189|       |		? LDAP_STRDUP( gopts->ldo_def_sasl_realm ) : NULL;
  190|       |	ld->ld_options.ldo_def_sasl_authcid = gopts->ldo_def_sasl_authcid
  191|       |		? LDAP_STRDUP( gopts->ldo_def_sasl_authcid ) : NULL;
  192|       |	ld->ld_options.ldo_def_sasl_authzid = gopts->ldo_def_sasl_authzid
  193|       |		? LDAP_STRDUP( gopts->ldo_def_sasl_authzid ) : NULL;
  194|       |#endif
  195|       |
  196|       |#ifdef HAVE_TLS
  197|       |	/* We explicitly inherit the SSL_CTX, don't need the names/paths. Leave
  198|       |	 * them empty to allow new SSL_CTX's to be created from scratch.
  199|       |	 */
  200|       |	memset( &ld->ld_options.ldo_tls_info, 0,
  201|       |		sizeof( ld->ld_options.ldo_tls_info ));
  202|       |	ld->ld_options.ldo_tls_ctx = NULL;
  203|       |#endif
  204|       |
  205|  3.39k|	if ( gopts->ldo_defludp ) {
  ------------------
  |  Branch (205:7): [True: 3.39k, False: 0]
  ------------------
  206|  3.39k|		ld->ld_options.ldo_defludp = ldap_url_duplist(gopts->ldo_defludp);
  ------------------
  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  ------------------
  207|       |
  208|  3.39k|		if ( ld->ld_options.ldo_defludp == NULL ) goto nomem;
  ------------------
  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  ------------------
  |  Branch (208:8): [True: 0, False: 3.39k]
  ------------------
  209|  3.39k|	}
  210|       |
  211|  3.39k|	if (( ld->ld_selectinfo = ldap_new_select_info()) == NULL ) goto nomem;
  ------------------
  |  |  475|  3.39k|#define	ld_selectinfo		ldc->ldc_selectinfo
  ------------------
  |  Branch (211:6): [True: 0, False: 3.39k]
  ------------------
  212|       |
  213|  3.39k|	ld->ld_options.ldo_local_ip_addrs.local_ip_addrs = NULL;
  ------------------
  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  ------------------
  214|  3.39k|	if( gopts->ldo_local_ip_addrs.local_ip_addrs ) {
  ------------------
  |  Branch (214:6): [True: 0, False: 3.39k]
  ------------------
  215|      0|		ld->ld_options.ldo_local_ip_addrs.local_ip_addrs =
  ------------------
  |  |  484|      0|#define ld_options		ldc->ldc_options
  ------------------
  216|      0|			LDAP_STRDUP( gopts->ldo_local_ip_addrs.local_ip_addrs );
  ------------------
  |  |  650|      0|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  217|      0|		if ( ld->ld_options.ldo_local_ip_addrs.local_ip_addrs == NULL )
  ------------------
  |  |  484|      0|#define ld_options		ldc->ldc_options
  ------------------
  |  Branch (217:8): [True: 0, False: 0]
  ------------------
  218|      0|			goto nomem;
  219|      0|	}
  220|       |
  221|  3.39k|	ld->ld_lberoptions = LBER_USE_DER;
  ------------------
  |  |  443|  3.39k|#define	ld_lberoptions		ldc->ldc_lberoptions
  ------------------
              	ld->ld_lberoptions = LBER_USE_DER;
  ------------------
  |  |   93|  3.39k|#define LBER_USE_DER		0x01
  ------------------
  222|       |
  223|  3.39k|	ld->ld_sb = ber_sockbuf_alloc( );
  ------------------
  |  |  440|  3.39k|#define ld_sb			ldc->ldc_sb
  ------------------
  224|  3.39k|	if ( ld->ld_sb == NULL ) goto nomem;
  ------------------
  |  |  440|  3.39k|#define ld_sb			ldc->ldc_sb
  ------------------
  |  Branch (224:7): [True: 0, False: 3.39k]
  ------------------
  225|       |
  226|  3.39k|#ifdef LDAP_R_COMPILE
  227|  3.39k|	ldap_pvt_thread_mutex_init( &ld->ld_msgid_mutex );
  ------------------
  |  |  520|  3.39k|#define	ld_msgid_mutex		ldc->ldc_msgid_mutex
  ------------------
  228|  3.39k|	ldap_pvt_thread_mutex_init( &ld->ld_conn_mutex );
  ------------------
  |  |  521|  3.39k|#define	ld_conn_mutex		ldc->ldc_conn_mutex
  ------------------
  229|  3.39k|	ldap_pvt_thread_mutex_init( &ld->ld_req_mutex );
  ------------------
  |  |  522|  3.39k|#define	ld_req_mutex		ldc->ldc_req_mutex
  ------------------
  230|  3.39k|	ldap_pvt_thread_mutex_init( &ld->ld_res_mutex );
  ------------------
  |  |  523|  3.39k|#define	ld_res_mutex		ldc->ldc_res_mutex
  ------------------
  231|  3.39k|	ldap_pvt_thread_mutex_init( &ld->ld_abandon_mutex );
  ------------------
  |  |  524|  3.39k|#define	ld_abandon_mutex	ldc->ldc_abandon_mutex
  ------------------
  232|  3.39k|	ldap_pvt_thread_mutex_init( &ld->ld_ldcmutex );
  ------------------
  |  |  519|  3.39k|#define	ld_ldcmutex		ldc->ldc_mutex
  ------------------
  233|  3.39k|#endif
  234|  3.39k|	ld->ld_ldcrefcnt = 1;
  ------------------
  |  |  480|  3.39k|#define	ld_ldcrefcnt		ldc->ldc_refcnt
  ------------------
  235|  3.39k|	*ldp = ld;
  236|  3.39k|	return LDAP_SUCCESS;
  ------------------
  |  |  610|  3.39k|#define LDAP_SUCCESS				0x00
  ------------------
  237|       |
  238|      0|nomem:
  239|      0|	ldap_free_select_info( ld->ld_selectinfo );
  ------------------
  |  |  475|      0|#define	ld_selectinfo		ldc->ldc_selectinfo
  ------------------
  240|      0|	ldap_free_urllist( ld->ld_options.ldo_defludp );
  ------------------
  |  |  484|      0|#define ld_options		ldc->ldc_options
  ------------------
  241|       |#ifdef HAVE_CYRUS_SASL
  242|       |	LDAP_FREE( ld->ld_options.ldo_def_sasl_authzid );
  243|       |	LDAP_FREE( ld->ld_options.ldo_def_sasl_authcid );
  244|       |	LDAP_FREE( ld->ld_options.ldo_def_sasl_realm );
  245|       |	LDAP_FREE( ld->ld_options.ldo_def_sasl_mech );
  246|       |#endif
  247|       |
  248|       |#ifdef HAVE_TLS
  249|       |	/* tls_pin_hashalg and tls_pin share the same buffer */
  250|       |	if ( ld->ld_options.ldo_tls_pin_hashalg ) {
  251|       |		LDAP_FREE( ld->ld_options.ldo_tls_pin_hashalg );
  252|       |	} else {
  253|       |		LDAP_FREE( ld->ld_options.ldo_tls_pin.bv_val );
  254|       |	}
  255|       |#endif
  256|      0|	LDAP_FREE( (char *)ld );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  257|      0|	return LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  258|  3.39k|}
ldap_init_fd:
  328|  3.39k|{
  329|  3.39k|	int rc;
  330|  3.39k|	LDAP *ld;
  331|  3.39k|	LDAPConn *conn;
  332|       |#ifdef LDAP_CONNECTIONLESS
  333|       |	ber_socklen_t	len;
  334|       |#endif
  335|       |
  336|  3.39k|	*ldp = NULL;
  337|  3.39k|	rc = ldap_create( &ld );
  338|  3.39k|	if( rc != LDAP_SUCCESS )
  ------------------
  |  |  610|  3.39k|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (338:6): [True: 0, False: 3.39k]
  ------------------
  339|      0|		return( rc );
  340|       |
  341|  3.39k|	if (url != NULL) {
  ------------------
  |  Branch (341:6): [True: 3.39k, False: 0]
  ------------------
  342|  3.39k|		rc = ldap_set_option(ld, LDAP_OPT_URI, url);
  ------------------
  |  |  127|  3.39k|#define LDAP_OPT_URI				0x5006
  ------------------
  343|  3.39k|		if ( rc != LDAP_SUCCESS ) {
  ------------------
  |  |  610|  3.39k|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (343:8): [True: 0, False: 3.39k]
  ------------------
  344|      0|			ldap_ld_free(ld, 1, NULL, NULL);
  345|      0|			return rc;
  346|      0|		}
  347|  3.39k|	}
  348|       |
  349|  3.39k|	LDAP_MUTEX_LOCK( &ld->ld_conn_mutex );
  ------------------
  |  |  551|  3.39k|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  350|       |	/* Attach the passed socket as the LDAP's connection */
  351|  3.39k|	conn = ldap_new_connection( ld, NULL, 1, 0, NULL, 0, 0 );
  352|  3.39k|	if( conn == NULL ) {
  ------------------
  |  Branch (352:6): [True: 0, False: 3.39k]
  ------------------
  353|      0|		LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex );
  ------------------
  |  |  552|      0|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  354|      0|		ldap_unbind_ext( ld, NULL, NULL );
  355|      0|		return( LDAP_NO_MEMORY );
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  356|      0|	}
  357|  3.39k|	if( url )
  ------------------
  |  Branch (357:6): [True: 3.39k, False: 0]
  ------------------
  358|  3.39k|		conn->lconn_server = ldap_url_dup( ld->ld_options.ldo_defludp );
  ------------------
  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  ------------------
  359|  3.39k|	ber_sockbuf_ctrl( conn->lconn_sb, LBER_SB_OPT_SET_FD, &fd );
  ------------------
  |  |  135|  3.39k|#define LBER_SB_OPT_SET_FD		2
  ------------------
  360|  3.39k|	ld->ld_defconn = conn;
  ------------------
  |  |  471|  3.39k|#define	ld_defconn		ldc->ldc_defconn
  ------------------
  361|  3.39k|	++ld->ld_defconn->lconn_refcnt;	/* so it never gets closed/freed */
  ------------------
  |  |  471|  3.39k|#define	ld_defconn		ldc->ldc_defconn
  ------------------
  362|  3.39k|	LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex );
  ------------------
  |  |  552|  3.39k|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  363|       |
  364|  3.39k|	switch( proto ) {
  365|  3.39k|	case LDAP_PROTO_TCP:
  ------------------
  |  |   25|  3.39k|#define LDAP_PROTO_TCP 1 /* ldap://  */
  ------------------
  |  Branch (365:2): [True: 3.39k, False: 0]
  ------------------
  366|  3.39k|#ifdef LDAP_DEBUG
  367|  3.39k|		ber_sockbuf_add_io( conn->lconn_sb, &ber_sockbuf_io_debug,
  368|  3.39k|			LBER_SBIOD_LEVEL_PROVIDER, (void *)"tcp_" );
  ------------------
  |  |  154|  3.39k|#define LBER_SBIOD_LEVEL_PROVIDER	10
  ------------------
  369|  3.39k|#endif
  370|  3.39k|		ber_sockbuf_add_io( conn->lconn_sb, &ber_sockbuf_io_tcp,
  371|  3.39k|			LBER_SBIOD_LEVEL_PROVIDER, NULL );
  ------------------
  |  |  154|  3.39k|#define LBER_SBIOD_LEVEL_PROVIDER	10
  ------------------
  372|  3.39k|		break;
  373|       |
  374|       |#ifdef LDAP_CONNECTIONLESS
  375|       |	case LDAP_PROTO_UDP:
  376|       |		LDAP_IS_UDP(ld) = 1;
  377|       |		if( ld->ld_options.ldo_peer )
  378|       |			ldap_memfree( ld->ld_options.ldo_peer );
  379|       |		ld->ld_options.ldo_peer = ldap_memcalloc( 1, sizeof( struct sockaddr_storage ) );
  380|       |		len = sizeof( struct sockaddr_storage );
  381|       |		if( getpeername ( fd, ld->ld_options.ldo_peer, &len ) < 0) {
  382|       |			ldap_unbind_ext( ld, NULL, NULL );
  383|       |			return( AC_SOCKET_ERROR );
  384|       |		}
  385|       |#ifdef LDAP_DEBUG
  386|       |		ber_sockbuf_add_io( conn->lconn_sb, &ber_sockbuf_io_debug,
  387|       |			LBER_SBIOD_LEVEL_PROVIDER, (void *)"udp_" );
  388|       |#endif
  389|       |		ber_sockbuf_add_io( conn->lconn_sb, &ber_sockbuf_io_udp,
  390|       |			LBER_SBIOD_LEVEL_PROVIDER, NULL );
  391|       |		ber_sockbuf_add_io( conn->lconn_sb, &ber_sockbuf_io_readahead,
  392|       |			LBER_SBIOD_LEVEL_PROVIDER, NULL );
  393|       |		break;
  394|       |#endif /* LDAP_CONNECTIONLESS */
  395|       |
  396|      0|	case LDAP_PROTO_IPC:
  ------------------
  |  |   27|      0|#define LDAP_PROTO_IPC 3 /* ldapi:// */
  ------------------
  |  Branch (396:2): [True: 0, False: 3.39k]
  ------------------
  397|      0|#ifdef LDAP_DEBUG
  398|      0|		ber_sockbuf_add_io( conn->lconn_sb, &ber_sockbuf_io_debug,
  399|      0|			LBER_SBIOD_LEVEL_PROVIDER, (void *)"ipc_" );
  ------------------
  |  |  154|      0|#define LBER_SBIOD_LEVEL_PROVIDER	10
  ------------------
  400|      0|#endif
  401|      0|		ber_sockbuf_add_io( conn->lconn_sb, &ber_sockbuf_io_fd,
  402|      0|			LBER_SBIOD_LEVEL_PROVIDER, NULL );
  ------------------
  |  |  154|      0|#define LBER_SBIOD_LEVEL_PROVIDER	10
  ------------------
  403|      0|		break;
  404|       |
  405|      0|	case LDAP_PROTO_EXT:
  ------------------
  |  |   28|      0|#define LDAP_PROTO_EXT 4 /* user-defined socket/sockbuf */
  ------------------
  |  Branch (405:2): [True: 0, False: 3.39k]
  ------------------
  406|       |		/* caller must supply sockbuf handlers */
  407|      0|		break;
  408|       |
  409|      0|	default:
  ------------------
  |  Branch (409:2): [True: 0, False: 3.39k]
  ------------------
  410|      0|		ldap_unbind_ext( ld, NULL, NULL );
  411|      0|		return LDAP_PARAM_ERROR;
  ------------------
  |  |  744|      0|#define LDAP_PARAM_ERROR				(-9)
  ------------------
  412|  3.39k|	}
  413|       |
  414|  3.39k|#ifdef LDAP_DEBUG
  415|  3.39k|	ber_sockbuf_add_io( conn->lconn_sb, &ber_sockbuf_io_debug,
  416|  3.39k|		INT_MAX, (void *)"ldap_" );
  417|  3.39k|#endif
  418|       |
  419|       |	/* Add the connection to the *LDAP's select pool */
  420|  3.39k|	ldap_mark_select_read( ld, conn->lconn_sb );
  421|       |	
  422|  3.39k|	*ldp = ld;
  423|  3.39k|	return LDAP_SUCCESS;
  ------------------
  |  |  610|  3.39k|#define LDAP_SUCCESS				0x00
  ------------------
  424|  3.39k|}

ldap_get_option:
   96|  3.39k|{
   97|  3.39k|	struct ldapoptions *lo;
   98|  3.39k|	int rc = LDAP_OPT_ERROR;
  ------------------
  |  |  226|  3.39k|#define	LDAP_OPT_ERROR		(-1)
  ------------------
   99|       |
  100|       |	/* Get pointer to global option structure */
  101|  3.39k|	lo = LDAP_INT_GLOBAL_OPT();   
  ------------------
  |  |   70|  3.39k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  ------------------
  102|  3.39k|	if (NULL == lo)	{
  ------------------
  |  Branch (102:6): [True: 0, False: 3.39k]
  ------------------
  103|      0|		return LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  104|      0|	}
  105|       |
  106|  3.39k|	if( lo->ldo_valid != LDAP_INITIALIZED ) {
  ------------------
  |  |  224|  3.39k|#define LDAP_INITIALIZED	0x1
  ------------------
  |  Branch (106:6): [True: 0, False: 3.39k]
  ------------------
  107|      0|		ldap_int_initialize(lo, NULL);
  108|      0|		if ( lo->ldo_valid != LDAP_INITIALIZED )
  ------------------
  |  |  224|      0|#define LDAP_INITIALIZED	0x1
  ------------------
  |  Branch (108:8): [True: 0, False: 0]
  ------------------
  109|      0|			return LDAP_LOCAL_ERROR;
  ------------------
  |  |  737|      0|#define LDAP_LOCAL_ERROR				(-2)
  ------------------
  110|      0|	}
  111|       |
  112|  3.39k|	if(ld != NULL) {
  ------------------
  |  Branch (112:5): [True: 3.39k, False: 0]
  ------------------
  113|  3.39k|		if( !LDAP_VALID( ld ) ) {
  ------------------
  |  |  539|  3.39k|#define LDAP_VALID(ld)		( (ld)->ld_valid == LDAP_VALID_SESSION )
  |  |  ------------------
  |  |  |  |  486|  3.39k|#define ld_valid		ld_options.ldo_valid
  |  |  |  |  ------------------
  |  |  |  |  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define LDAP_VALID(ld)		( (ld)->ld_valid == LDAP_VALID_SESSION )
  |  |  ------------------
  |  |  |  |  225|  3.39k|#define LDAP_VALID_SESSION	0x2
  |  |  ------------------
  ------------------
  |  Branch (113:7): [True: 0, False: 3.39k]
  ------------------
  114|      0|			return LDAP_OPT_ERROR;
  ------------------
  |  |  226|      0|#define	LDAP_OPT_ERROR		(-1)
  ------------------
  115|      0|		}
  116|       |
  117|  3.39k|		lo = &ld->ld_options;
  ------------------
  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  ------------------
  118|  3.39k|	}
  119|       |
  120|  3.39k|	if(outvalue == NULL) {
  ------------------
  |  Branch (120:5): [True: 0, False: 3.39k]
  ------------------
  121|       |		/* no place to get to */
  122|      0|		return LDAP_OPT_ERROR;
  ------------------
  |  |  226|      0|#define	LDAP_OPT_ERROR		(-1)
  ------------------
  123|      0|	}
  124|       |
  125|  3.39k|	LDAP_MUTEX_LOCK( &lo->ldo_mutex );
  ------------------
  |  |  551|  3.39k|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  126|       |
  127|  3.39k|	switch(option) {
  128|      0|	case LDAP_OPT_API_INFO: {
  ------------------
  |  |   84|      0|#define LDAP_OPT_API_INFO			0x0000
  ------------------
  |  Branch (128:2): [True: 0, False: 3.39k]
  ------------------
  129|      0|			struct ldapapiinfo *info = (struct ldapapiinfo *) outvalue;
  130|       |
  131|      0|			if(info == NULL) {
  ------------------
  |  Branch (131:7): [True: 0, False: 0]
  ------------------
  132|       |				/* outvalue must point to an apiinfo structure */
  133|      0|				break;	/* LDAP_OPT_ERROR */
  134|      0|			}
  135|       |
  136|      0|			if(info->ldapai_info_version != LDAP_API_INFO_VERSION) {
  ------------------
  |  |  234|      0|#define LDAP_API_INFO_VERSION	(1)
  ------------------
  |  Branch (136:7): [True: 0, False: 0]
  ------------------
  137|       |				/* api info version mismatch */
  138|      0|				info->ldapai_info_version = LDAP_API_INFO_VERSION;
  ------------------
  |  |  234|      0|#define LDAP_API_INFO_VERSION	(1)
  ------------------
  139|      0|				break;	/* LDAP_OPT_ERROR */
  140|      0|			}
  141|       |
  142|      0|			info->ldapai_api_version = LDAP_API_VERSION;
  ------------------
  |  |   51|      0|#define LDAP_API_VERSION	3001
  ------------------
  143|      0|			info->ldapai_protocol_version = LDAP_VERSION_MAX;
  ------------------
  |  |   43|      0|#define LDAP_VERSION_MAX	LDAP_VERSION3
  |  |  ------------------
  |  |  |  |   39|      0|#define LDAP_VERSION3	3
  |  |  ------------------
  ------------------
  144|       |
  145|      0|			if(features[0].ldapaif_name == NULL) {
  ------------------
  |  Branch (145:7): [Folded, False: 0]
  ------------------
  146|      0|				info->ldapai_extensions = NULL;
  147|      0|			} else {
  148|      0|				int i;
  149|      0|				info->ldapai_extensions = LDAP_MALLOC(sizeof(char *) *
  ------------------
  |  |  645|      0|#define LDAP_MALLOC(s)		(ber_memalloc_x((s),NULL))
  ------------------
  150|      0|					sizeof(features)/sizeof(LDAPAPIFeatureInfo));
  151|      0|				if ( info->ldapai_extensions == NULL ) {
  ------------------
  |  Branch (151:10): [True: 0, False: 0]
  ------------------
  152|      0|					rc = LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  153|      0|					break;
  154|      0|				}
  155|       |
  156|      0|				for(i=0; features[i].ldapaif_name != NULL; i++) {
  ------------------
  |  Branch (156:14): [True: 0, False: 0]
  ------------------
  157|      0|					info->ldapai_extensions[i] =
  158|      0|						LDAP_STRDUP(features[i].ldapaif_name);
  ------------------
  |  |  650|      0|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  159|      0|					if ( info->ldapai_extensions[i] == NULL ) {
  ------------------
  |  Branch (159:11): [True: 0, False: 0]
  ------------------
  160|      0|						rc = LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  161|      0|						break;
  162|      0|					}
  163|      0|				}
  164|      0|				if ( features[i].ldapaif_name != NULL ) {
  ------------------
  |  Branch (164:10): [True: 0, False: 0]
  ------------------
  165|      0|					break; /* LDAP_NO_MEMORY */
  166|      0|				}
  167|       |
  168|      0|				info->ldapai_extensions[i] = NULL;
  169|      0|			}
  170|       |
  171|      0|			info->ldapai_vendor_name = LDAP_STRDUP(LDAP_VENDOR_NAME);
  ------------------
  |  |  650|      0|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  172|      0|			info->ldapai_vendor_version = LDAP_VENDOR_VERSION;
  ------------------
  |  |   25|      0|#define LDAP_VENDOR_VERSION 20613
  ------------------
  173|       |
  174|      0|			rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  175|      0|			break;
  176|      0|		} break;
  177|       |
  178|      0|	case LDAP_OPT_DESC:
  ------------------
  |  |   85|      0|#define LDAP_OPT_DESC				0x0001 /* historic */
  ------------------
  |  Branch (178:2): [True: 0, False: 3.39k]
  ------------------
  179|      0|		if( ld == NULL || ld->ld_sb == NULL ) {
  ------------------
  |  |  440|      0|#define ld_sb			ldc->ldc_sb
  ------------------
  |  Branch (179:7): [True: 0, False: 0]
  |  Branch (179:21): [True: 0, False: 0]
  ------------------
  180|       |			/* bad param */
  181|      0|			break;
  182|      0|		} 
  183|       |
  184|      0|		ber_sockbuf_ctrl( ld->ld_sb, LBER_SB_OPT_GET_FD, outvalue );
  ------------------
  |  |  440|      0|#define ld_sb			ldc->ldc_sb
  ------------------
              		ber_sockbuf_ctrl( ld->ld_sb, LBER_SB_OPT_GET_FD, outvalue );
  ------------------
  |  |  134|      0|#define LBER_SB_OPT_GET_FD		1
  ------------------
  185|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  186|      0|		break;
  187|       |
  188|  3.39k|	case LDAP_OPT_SOCKBUF:
  ------------------
  |  |  129|  3.39k|#define LDAP_OPT_SOCKBUF            0x5008  /* sockbuf */
  ------------------
  |  Branch (188:2): [True: 3.39k, False: 0]
  ------------------
  189|  3.39k|		if( ld == NULL ) break;
  ------------------
  |  Branch (189:7): [True: 0, False: 3.39k]
  ------------------
  190|  3.39k|		*(Sockbuf **)outvalue = ld->ld_sb;
  ------------------
  |  |  440|  3.39k|#define ld_sb			ldc->ldc_sb
  ------------------
  191|  3.39k|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|  3.39k|#define LDAP_OPT_SUCCESS	0
  ------------------
  192|  3.39k|		break;
  193|       |
  194|      0|	case LDAP_OPT_TIMEOUT:
  ------------------
  |  |  124|      0|#define LDAP_OPT_TIMEOUT			0x5002	/* default timeout */
  ------------------
  |  Branch (194:2): [True: 0, False: 3.39k]
  ------------------
  195|       |		/* the caller has to free outvalue ! */
  196|      0|		if ( lo->ldo_tm_api.tv_sec < 0 ) {
  ------------------
  |  Branch (196:8): [True: 0, False: 0]
  ------------------
  197|      0|			*(void **)outvalue = NULL;
  198|      0|		} else if ( ldap_int_timeval_dup( outvalue, &lo->ldo_tm_api ) != 0 ) {
  ------------------
  |  Branch (198:15): [True: 0, False: 0]
  ------------------
  199|      0|			break;	/* LDAP_OPT_ERROR */
  200|      0|		}
  201|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  202|      0|		break;
  203|       |		
  204|      0|	case LDAP_OPT_NETWORK_TIMEOUT:
  ------------------
  |  |  126|      0|#define LDAP_OPT_NETWORK_TIMEOUT	0x5005	/* socket level timeout */
  ------------------
  |  Branch (204:2): [True: 0, False: 3.39k]
  ------------------
  205|       |		/* the caller has to free outvalue ! */
  206|      0|		if ( lo->ldo_tm_net.tv_sec < 0 ) {
  ------------------
  |  Branch (206:8): [True: 0, False: 0]
  ------------------
  207|      0|			*(void **)outvalue = NULL;
  208|      0|		} else if ( ldap_int_timeval_dup( outvalue, &lo->ldo_tm_net ) != 0 ) {
  ------------------
  |  Branch (208:15): [True: 0, False: 0]
  ------------------
  209|      0|			break;	/* LDAP_OPT_ERROR */
  210|      0|		}
  211|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  212|      0|		break;
  213|       |
  214|      0|	case LDAP_OPT_DEREF:
  ------------------
  |  |   86|      0|#define LDAP_OPT_DEREF				0x0002
  ------------------
  |  Branch (214:2): [True: 0, False: 3.39k]
  ------------------
  215|      0|		* (int *) outvalue = lo->ldo_deref;
  216|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  217|      0|		break;
  218|       |
  219|      0|	case LDAP_OPT_SIZELIMIT:
  ------------------
  |  |   87|      0|#define LDAP_OPT_SIZELIMIT			0x0003
  ------------------
  |  Branch (219:2): [True: 0, False: 3.39k]
  ------------------
  220|      0|		* (int *) outvalue = lo->ldo_sizelimit;
  221|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  222|      0|		break;
  223|       |
  224|      0|	case LDAP_OPT_TIMELIMIT:
  ------------------
  |  |   88|      0|#define LDAP_OPT_TIMELIMIT			0x0004
  ------------------
  |  Branch (224:2): [True: 0, False: 3.39k]
  ------------------
  225|      0|		* (int *) outvalue = lo->ldo_timelimit;
  226|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  227|      0|		break;
  228|       |
  229|      0|	case LDAP_OPT_REFERRALS:
  ------------------
  |  |   90|      0|#define LDAP_OPT_REFERRALS			0x0008
  ------------------
  |  Branch (229:2): [True: 0, False: 3.39k]
  ------------------
  230|      0|		* (int *) outvalue = (int) LDAP_BOOL_GET(lo, LDAP_BOOL_REFERRALS);
  ------------------
  |  |  157|      0|	((lo)->ldo_booleans & LDAP_BOOL(bool) ? -1 : 0)
  |  |  ------------------
  |  |  |  |  155|      0|#define LDAP_BOOL(n)	((LDAP_BOOLEANS)1 << (n))
  |  |  ------------------
  |  |  |  Branch (157:3): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  231|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  232|      0|		break;
  233|       |		
  234|      0|	case LDAP_OPT_RESTART:
  ------------------
  |  |   91|      0|#define LDAP_OPT_RESTART			0x0009
  ------------------
  |  Branch (234:2): [True: 0, False: 3.39k]
  ------------------
  235|      0|		* (int *) outvalue = (int) LDAP_BOOL_GET(lo, LDAP_BOOL_RESTART);
  ------------------
  |  |  157|      0|	((lo)->ldo_booleans & LDAP_BOOL(bool) ? -1 : 0)
  |  |  ------------------
  |  |  |  |  155|      0|#define LDAP_BOOL(n)	((LDAP_BOOLEANS)1 << (n))
  |  |  ------------------
  |  |  |  Branch (157:3): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  236|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  237|      0|		break;
  238|       |
  239|      0|	case LDAP_OPT_PROTOCOL_VERSION:
  ------------------
  |  |   93|      0|#define LDAP_OPT_PROTOCOL_VERSION		0x0011
  ------------------
  |  Branch (239:2): [True: 0, False: 3.39k]
  ------------------
  240|      0|		* (int *) outvalue = lo->ldo_version;
  241|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  242|      0|		break;
  243|       |
  244|      0|	case LDAP_OPT_SERVER_CONTROLS:
  ------------------
  |  |   94|      0|#define LDAP_OPT_SERVER_CONTROLS		0x0012
  ------------------
  |  Branch (244:2): [True: 0, False: 3.39k]
  ------------------
  245|      0|		* (LDAPControl ***) outvalue =
  246|      0|			ldap_controls_dup( lo->ldo_sctrls );
  247|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  248|      0|		break;
  249|       |
  250|      0|	case LDAP_OPT_CLIENT_CONTROLS:
  ------------------
  |  |   95|      0|#define LDAP_OPT_CLIENT_CONTROLS		0x0013
  ------------------
  |  Branch (250:2): [True: 0, False: 3.39k]
  ------------------
  251|      0|		* (LDAPControl ***) outvalue =
  252|      0|			ldap_controls_dup( lo->ldo_cctrls );
  253|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  254|      0|		break;
  255|       |
  256|      0|	case LDAP_OPT_HOST_NAME:
  ------------------
  |  |   99|      0|#define LDAP_OPT_HOST_NAME			0x0030
  ------------------
  |  Branch (256:2): [True: 0, False: 3.39k]
  ------------------
  257|      0|		* (char **) outvalue = ldap_url_list2hosts(lo->ldo_defludp);
  258|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  259|      0|		break;
  260|       |
  261|      0|	case LDAP_OPT_SOCKET_BIND_ADDRESSES:
  ------------------
  |  |  135|      0|#define	LDAP_OPT_SOCKET_BIND_ADDRESSES	0x5014	/* user configured bind IPs */
  ------------------
  |  Branch (261:2): [True: 0, False: 3.39k]
  ------------------
  262|      0|		if ( lo->ldo_local_ip_addrs.local_ip_addrs == NULL ) {
  ------------------
  |  Branch (262:8): [True: 0, False: 0]
  ------------------
  263|      0|			* (void **) outvalue = NULL;
  264|      0|		}
  265|      0|		else {
  266|      0|			* (char **) outvalue =
  267|      0|				LDAP_STRDUP( lo->ldo_local_ip_addrs.local_ip_addrs );
  ------------------
  |  |  650|      0|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  268|      0|		}
  269|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  270|      0|		break;
  271|       |
  272|      0|	case LDAP_OPT_URI:
  ------------------
  |  |  127|      0|#define LDAP_OPT_URI				0x5006
  ------------------
  |  Branch (272:2): [True: 0, False: 3.39k]
  ------------------
  273|      0|		* (char **) outvalue = ldap_url_list2urls(lo->ldo_defludp);
  274|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  275|      0|		break;
  276|       |
  277|      0|	case LDAP_OPT_DEFBASE:
  ------------------
  |  |  130|      0|#define LDAP_OPT_DEFBASE		0x5009	/* searchbase */
  ------------------
  |  Branch (277:2): [True: 0, False: 3.39k]
  ------------------
  278|      0|		if( lo->ldo_defbase == NULL ) {
  ------------------
  |  Branch (278:7): [True: 0, False: 0]
  ------------------
  279|      0|			* (char **) outvalue = NULL;
  280|      0|		} else {
  281|      0|			* (char **) outvalue = LDAP_STRDUP(lo->ldo_defbase);
  ------------------
  |  |  650|      0|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  282|      0|		}
  283|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  284|      0|		break;
  285|       |
  286|      0|	case LDAP_OPT_CONNECT_ASYNC:
  ------------------
  |  |  131|      0|#define	LDAP_OPT_CONNECT_ASYNC		0x5010	/* create connections asynchronously */
  ------------------
  |  Branch (286:2): [True: 0, False: 3.39k]
  ------------------
  287|      0|		* (int *) outvalue = (int) LDAP_BOOL_GET(lo, LDAP_BOOL_CONNECT_ASYNC);
  ------------------
  |  |  157|      0|	((lo)->ldo_booleans & LDAP_BOOL(bool) ? -1 : 0)
  |  |  ------------------
  |  |  |  |  155|      0|#define LDAP_BOOL(n)	((LDAP_BOOLEANS)1 << (n))
  |  |  ------------------
  |  |  |  Branch (157:3): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  288|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  289|      0|		break;
  290|       |
  291|      0|	case LDAP_OPT_CONNECT_CB:
  ------------------
  |  |  132|      0|#define	LDAP_OPT_CONNECT_CB			0x5011	/* connection callbacks */
  ------------------
  |  Branch (291:2): [True: 0, False: 3.39k]
  ------------------
  292|      0|		{
  293|       |			/* Getting deletes the specified callback */
  294|      0|			ldaplist **ll = &lo->ldo_conn_cbs;
  295|      0|			for (;*ll;ll = &(*ll)->ll_next) {
  ------------------
  |  Branch (295:10): [True: 0, False: 0]
  ------------------
  296|      0|				if ((*ll)->ll_data == outvalue) {
  ------------------
  |  Branch (296:9): [True: 0, False: 0]
  ------------------
  297|      0|					ldaplist *lc = *ll;
  298|      0|					*ll = lc->ll_next;
  299|      0|					LDAP_FREE(lc);
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  300|      0|					break;
  301|      0|				}
  302|      0|			}
  303|      0|		}
  304|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  305|      0|		break;
  306|       |
  307|      0|	case LDAP_OPT_RESULT_CODE:
  ------------------
  |  |  100|      0|#define LDAP_OPT_RESULT_CODE			0x0031
  ------------------
  |  Branch (307:2): [True: 0, False: 3.39k]
  ------------------
  308|      0|		if(ld == NULL) {
  ------------------
  |  Branch (308:6): [True: 0, False: 0]
  ------------------
  309|       |			/* bad param */
  310|      0|			break;
  311|      0|		} 
  312|      0|		* (int *) outvalue = ld->ld_errno;
  313|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  314|      0|		break;
  315|       |
  316|      0|	case LDAP_OPT_DIAGNOSTIC_MESSAGE:
  ------------------
  |  |  102|      0|#define LDAP_OPT_DIAGNOSTIC_MESSAGE		0x0032
  ------------------
  |  Branch (316:2): [True: 0, False: 3.39k]
  ------------------
  317|      0|		if(ld == NULL) {
  ------------------
  |  Branch (317:6): [True: 0, False: 0]
  ------------------
  318|       |			/* bad param */
  319|      0|			break;
  320|      0|		} 
  321|       |
  322|      0|		if( ld->ld_error == NULL ) {
  ------------------
  |  Branch (322:7): [True: 0, False: 0]
  ------------------
  323|      0|			* (char **) outvalue = NULL;
  324|      0|		} else {
  325|      0|			* (char **) outvalue = LDAP_STRDUP(ld->ld_error);
  ------------------
  |  |  650|      0|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  326|      0|		}
  327|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  328|      0|		break;
  329|       |
  330|      0|	case LDAP_OPT_MATCHED_DN:
  ------------------
  |  |  104|      0|#define LDAP_OPT_MATCHED_DN			0x0033
  ------------------
  |  Branch (330:2): [True: 0, False: 3.39k]
  ------------------
  331|      0|		if(ld == NULL) {
  ------------------
  |  Branch (331:6): [True: 0, False: 0]
  ------------------
  332|       |			/* bad param */
  333|      0|			break;
  334|      0|		} 
  335|       |
  336|      0|		if( ld->ld_matched == NULL ) {
  ------------------
  |  Branch (336:7): [True: 0, False: 0]
  ------------------
  337|      0|			* (char **) outvalue = NULL;
  338|      0|		} else {
  339|      0|			* (char **) outvalue = LDAP_STRDUP( ld->ld_matched );
  ------------------
  |  |  650|      0|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  340|      0|		}
  341|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  342|      0|		break;
  343|       |
  344|      0|	case LDAP_OPT_REFERRAL_URLS:
  ------------------
  |  |  128|      0|#define LDAP_OPT_REFERRAL_URLS      0x5007  /* Referral URLs */
  ------------------
  |  Branch (344:2): [True: 0, False: 3.39k]
  ------------------
  345|      0|		if(ld == NULL) {
  ------------------
  |  Branch (345:6): [True: 0, False: 0]
  ------------------
  346|       |			/* bad param */
  347|      0|			break;
  348|      0|		} 
  349|       |
  350|      0|		if( ld->ld_referrals == NULL ) {
  ------------------
  |  Branch (350:7): [True: 0, False: 0]
  ------------------
  351|      0|			* (char ***) outvalue = NULL;
  352|      0|		} else {
  353|      0|			* (char ***) outvalue = ldap_value_dup(ld->ld_referrals);
  354|      0|		}
  355|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  356|      0|		break;
  357|       |
  358|      0|	case LDAP_OPT_API_FEATURE_INFO: {
  ------------------
  |  |   97|      0|#define LDAP_OPT_API_FEATURE_INFO		0x0015
  ------------------
  |  Branch (358:2): [True: 0, False: 3.39k]
  ------------------
  359|      0|			LDAPAPIFeatureInfo *info = (LDAPAPIFeatureInfo *) outvalue;
  360|      0|			int i;
  361|       |
  362|      0|			if(info == NULL)
  ------------------
  |  Branch (362:7): [True: 0, False: 0]
  ------------------
  363|      0|				break;	/* LDAP_OPT_ERROR */
  364|       |
  365|      0|			if(info->ldapaif_info_version != LDAP_FEATURE_INFO_VERSION) {
  ------------------
  |  |  244|      0|#define LDAP_FEATURE_INFO_VERSION (1)	/* apifeature_info struct version */
  ------------------
  |  Branch (365:7): [True: 0, False: 0]
  ------------------
  366|       |				/* api info version mismatch */
  367|      0|				info->ldapaif_info_version = LDAP_FEATURE_INFO_VERSION;
  ------------------
  |  |  244|      0|#define LDAP_FEATURE_INFO_VERSION (1)	/* apifeature_info struct version */
  ------------------
  368|      0|				break;	/* LDAP_OPT_ERROR */
  369|      0|			}
  370|       |
  371|      0|			if(info->ldapaif_name == NULL)
  ------------------
  |  Branch (371:7): [True: 0, False: 0]
  ------------------
  372|      0|				break;	/* LDAP_OPT_ERROR */
  373|       |
  374|      0|			for(i=0; features[i].ldapaif_name != NULL; i++) {
  ------------------
  |  Branch (374:13): [True: 0, False: 0]
  ------------------
  375|      0|				if(!strcmp(info->ldapaif_name, features[i].ldapaif_name)) {
  ------------------
  |  Branch (375:8): [True: 0, False: 0]
  ------------------
  376|      0|					info->ldapaif_version =
  377|      0|						features[i].ldapaif_version;
  378|      0|					rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  379|      0|					break;
  380|      0|				}
  381|      0|			}
  382|      0|		}
  383|      0|		break;
  384|       |
  385|      0|	case LDAP_OPT_DEBUG_LEVEL:
  ------------------
  |  |  123|      0|#define LDAP_OPT_DEBUG_LEVEL		0x5001	/* debug level */
  ------------------
  |  Branch (385:2): [True: 0, False: 3.39k]
  ------------------
  386|      0|		* (int *) outvalue = lo->ldo_debug;
  387|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  388|      0|		break;
  389|       |	
  390|      0|	case LDAP_OPT_SESSION_REFCNT:
  ------------------
  |  |  133|      0|#define	LDAP_OPT_SESSION_REFCNT		0x5012	/* session reference count */
  ------------------
  |  Branch (390:2): [True: 0, False: 3.39k]
  ------------------
  391|      0|		if(ld == NULL) {
  ------------------
  |  Branch (391:6): [True: 0, False: 0]
  ------------------
  392|       |			/* bad param */
  393|      0|			break;
  394|      0|		} 
  395|      0|		LDAP_MUTEX_LOCK( &ld->ld_ldcmutex );
  ------------------
  |  |  551|      0|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  396|      0|		* (int *) outvalue = ld->ld_ldcrefcnt;
  ------------------
  |  |  480|      0|#define	ld_ldcrefcnt		ldc->ldc_refcnt
  ------------------
  397|      0|		LDAP_MUTEX_UNLOCK( &ld->ld_ldcmutex );
  ------------------
  |  |  552|      0|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  398|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  399|      0|		break;
  400|       |
  401|      0|	case LDAP_OPT_KEEPCONN:
  ------------------
  |  |  134|      0|#define	LDAP_OPT_KEEPCONN		0x5013	/* keep the connection on read error or NoD */
  ------------------
  |  Branch (401:2): [True: 0, False: 3.39k]
  ------------------
  402|      0|		* (int *) outvalue = (int) LDAP_BOOL_GET(lo, LDAP_BOOL_KEEPCONN);
  ------------------
  |  |  157|      0|	((lo)->ldo_booleans & LDAP_BOOL(bool) ? -1 : 0)
  |  |  ------------------
  |  |  |  |  155|      0|#define LDAP_BOOL(n)	((LDAP_BOOLEANS)1 << (n))
  |  |  ------------------
  |  |  |  Branch (157:3): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  403|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  404|      0|		break;
  405|       |
  406|      0|	case LDAP_OPT_X_KEEPALIVE_IDLE:
  ------------------
  |  |  212|      0|#define LDAP_OPT_X_KEEPALIVE_IDLE		0x6300
  ------------------
  |  Branch (406:2): [True: 0, False: 3.39k]
  ------------------
  407|      0|		* (int *) outvalue = lo->ldo_keepalive_idle;
  408|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  409|      0|		break;
  410|       |
  411|      0|	case LDAP_OPT_X_KEEPALIVE_PROBES:
  ------------------
  |  |  213|      0|#define LDAP_OPT_X_KEEPALIVE_PROBES		0x6301
  ------------------
  |  Branch (411:2): [True: 0, False: 3.39k]
  ------------------
  412|      0|		* (int *) outvalue = lo->ldo_keepalive_probes;
  413|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  414|      0|		break;
  415|       |
  416|      0|	case LDAP_OPT_X_KEEPALIVE_INTERVAL:
  ------------------
  |  |  214|      0|#define LDAP_OPT_X_KEEPALIVE_INTERVAL	0x6302
  ------------------
  |  Branch (416:2): [True: 0, False: 3.39k]
  ------------------
  417|      0|		* (int *) outvalue = lo->ldo_keepalive_interval;
  418|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  419|      0|		break;
  420|       |
  421|      0|	case LDAP_OPT_TCP_USER_TIMEOUT:
  ------------------
  |  |  136|      0|#define	LDAP_OPT_TCP_USER_TIMEOUT	0x5015	/* set TCP_USER_TIMEOUT if the OS supports it, ignored otherwise */
  ------------------
  |  Branch (421:2): [True: 0, False: 3.39k]
  ------------------
  422|      0|		* (unsigned int *) outvalue = lo->ldo_tcp_user_timeout;
  423|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  424|      0|		break;
  425|       |
  426|      0|	default:
  ------------------
  |  Branch (426:2): [True: 0, False: 3.39k]
  ------------------
  427|       |#ifdef HAVE_TLS
  428|       |		if ( ldap_pvt_tls_get_option( ld, option, outvalue ) == 0 ) {
  429|       |			rc = LDAP_OPT_SUCCESS;
  430|       |			break;
  431|       |		}
  432|       |#endif
  433|       |#ifdef HAVE_CYRUS_SASL
  434|       |		if ( ldap_int_sasl_get_option( ld, option, outvalue ) == 0 ) {
  435|       |			rc = LDAP_OPT_SUCCESS;
  436|       |			break;
  437|       |		}
  438|       |#endif
  439|       |		/* bad param */
  440|      0|		break;
  441|  3.39k|	}
  442|       |
  443|  3.39k|	LDAP_MUTEX_UNLOCK( &lo->ldo_mutex );
  ------------------
  |  |  552|  3.39k|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  444|  3.39k|	return ( rc );
  445|  3.39k|}
ldap_set_option:
  452|  10.1k|{
  453|  10.1k|	struct ldapoptions *lo;
  454|  10.1k|	int *dbglvl = NULL;
  455|  10.1k|	int rc = LDAP_OPT_ERROR;
  ------------------
  |  |  226|  10.1k|#define	LDAP_OPT_ERROR		(-1)
  ------------------
  456|       |
  457|       |	/* Get pointer to global option structure */
  458|  10.1k|	lo = LDAP_INT_GLOBAL_OPT();
  ------------------
  |  |   70|  10.1k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  ------------------
  459|  10.1k|	if (lo == NULL)	{
  ------------------
  |  Branch (459:6): [True: 0, False: 10.1k]
  ------------------
  460|      0|		return LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  461|      0|	}
  462|       |
  463|       |	/*
  464|       |	 * The architecture to turn on debugging has a chicken and egg
  465|       |	 * problem. Thus, we introduce a fix here.
  466|       |	 */
  467|       |
  468|  10.1k|	if (option == LDAP_OPT_DEBUG_LEVEL) {
  ------------------
  |  |  123|  10.1k|#define LDAP_OPT_DEBUG_LEVEL		0x5001	/* debug level */
  ------------------
  |  Branch (468:6): [True: 0, False: 10.1k]
  ------------------
  469|      0|		dbglvl = (int *) invalue;
  470|      0|	}
  471|       |
  472|  10.1k|	if( lo->ldo_valid != LDAP_INITIALIZED ) {
  ------------------
  |  |  224|  10.1k|#define LDAP_INITIALIZED	0x1
  ------------------
  |  Branch (472:6): [True: 0, False: 10.1k]
  ------------------
  473|      0|		ldap_int_initialize(lo, dbglvl);
  474|      0|		if ( lo->ldo_valid != LDAP_INITIALIZED )
  ------------------
  |  |  224|      0|#define LDAP_INITIALIZED	0x1
  ------------------
  |  Branch (474:8): [True: 0, False: 0]
  ------------------
  475|      0|			return LDAP_LOCAL_ERROR;
  ------------------
  |  |  737|      0|#define LDAP_LOCAL_ERROR				(-2)
  ------------------
  476|      0|	}
  477|       |
  478|  10.1k|	if(ld != NULL) {
  ------------------
  |  Branch (478:5): [True: 10.1k, False: 0]
  ------------------
  479|  10.1k|		assert( LDAP_VALID( ld ) );
  ------------------
  |  Branch (479:3): [True: 0, False: 10.1k]
  |  Branch (479:3): [True: 10.1k, False: 0]
  ------------------
  480|       |
  481|  10.1k|		if( !LDAP_VALID( ld ) ) {
  ------------------
  |  |  539|  10.1k|#define LDAP_VALID(ld)		( (ld)->ld_valid == LDAP_VALID_SESSION )
  |  |  ------------------
  |  |  |  |  486|  10.1k|#define ld_valid		ld_options.ldo_valid
  |  |  |  |  ------------------
  |  |  |  |  |  |  484|  10.1k|#define ld_options		ldc->ldc_options
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define LDAP_VALID(ld)		( (ld)->ld_valid == LDAP_VALID_SESSION )
  |  |  ------------------
  |  |  |  |  225|  10.1k|#define LDAP_VALID_SESSION	0x2
  |  |  ------------------
  ------------------
  |  Branch (481:7): [True: 0, False: 10.1k]
  ------------------
  482|      0|			return LDAP_OPT_ERROR;
  ------------------
  |  |  226|      0|#define	LDAP_OPT_ERROR		(-1)
  ------------------
  483|      0|		}
  484|       |
  485|  10.1k|		lo = &ld->ld_options;
  ------------------
  |  |  484|  10.1k|#define ld_options		ldc->ldc_options
  ------------------
  486|  10.1k|	}
  487|       |
  488|  10.1k|	LDAP_MUTEX_LOCK( &lo->ldo_mutex );
  ------------------
  |  |  551|  10.1k|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  489|       |
  490|  10.1k|	switch ( option ) {
  491|       |
  492|       |	/* options with boolean values */
  493|  3.39k|	case LDAP_OPT_REFERRALS:
  ------------------
  |  |   90|  3.39k|#define LDAP_OPT_REFERRALS			0x0008
  ------------------
  |  Branch (493:2): [True: 3.39k, False: 6.79k]
  ------------------
  494|  3.39k|		if(invalue == LDAP_OPT_OFF) {
  ------------------
  |  |  230|  3.39k|#define LDAP_OPT_OFF	((void *) 0)
  ------------------
  |  Branch (494:6): [True: 3.39k, False: 0]
  ------------------
  495|  3.39k|			LDAP_BOOL_CLR(lo, LDAP_BOOL_REFERRALS);
  ------------------
  |  |  159|  3.39k|#define LDAP_BOOL_CLR(lo, bool) ((lo)->ldo_booleans &= ~LDAP_BOOL(bool))
  |  |  ------------------
  |  |  |  |  155|  3.39k|#define LDAP_BOOL(n)	((LDAP_BOOLEANS)1 << (n))
  |  |  ------------------
  ------------------
  496|  3.39k|		} else {
  497|      0|			LDAP_BOOL_SET(lo, LDAP_BOOL_REFERRALS);
  ------------------
  |  |  158|      0|#define LDAP_BOOL_SET(lo, bool) ((lo)->ldo_booleans |= LDAP_BOOL(bool))
  |  |  ------------------
  |  |  |  |  155|      0|#define LDAP_BOOL(n)	((LDAP_BOOLEANS)1 << (n))
  |  |  ------------------
  ------------------
  498|      0|		}
  499|  3.39k|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|  3.39k|#define LDAP_OPT_SUCCESS	0
  ------------------
  500|  3.39k|		break;
  501|       |
  502|      0|	case LDAP_OPT_RESTART:
  ------------------
  |  |   91|      0|#define LDAP_OPT_RESTART			0x0009
  ------------------
  |  Branch (502:2): [True: 0, False: 10.1k]
  ------------------
  503|      0|		if(invalue == LDAP_OPT_OFF) {
  ------------------
  |  |  230|      0|#define LDAP_OPT_OFF	((void *) 0)
  ------------------
  |  Branch (503:6): [True: 0, False: 0]
  ------------------
  504|      0|			LDAP_BOOL_CLR(lo, LDAP_BOOL_RESTART);
  ------------------
  |  |  159|      0|#define LDAP_BOOL_CLR(lo, bool) ((lo)->ldo_booleans &= ~LDAP_BOOL(bool))
  |  |  ------------------
  |  |  |  |  155|      0|#define LDAP_BOOL(n)	((LDAP_BOOLEANS)1 << (n))
  |  |  ------------------
  ------------------
  505|      0|		} else {
  506|      0|			LDAP_BOOL_SET(lo, LDAP_BOOL_RESTART);
  ------------------
  |  |  158|      0|#define LDAP_BOOL_SET(lo, bool) ((lo)->ldo_booleans |= LDAP_BOOL(bool))
  |  |  ------------------
  |  |  |  |  155|      0|#define LDAP_BOOL(n)	((LDAP_BOOLEANS)1 << (n))
  |  |  ------------------
  ------------------
  507|      0|		}
  508|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  509|      0|		break;
  510|       |
  511|      0|	case LDAP_OPT_CONNECT_ASYNC:
  ------------------
  |  |  131|      0|#define	LDAP_OPT_CONNECT_ASYNC		0x5010	/* create connections asynchronously */
  ------------------
  |  Branch (511:2): [True: 0, False: 10.1k]
  ------------------
  512|      0|		if(invalue == LDAP_OPT_OFF) {
  ------------------
  |  |  230|      0|#define LDAP_OPT_OFF	((void *) 0)
  ------------------
  |  Branch (512:6): [True: 0, False: 0]
  ------------------
  513|      0|			LDAP_BOOL_CLR(lo, LDAP_BOOL_CONNECT_ASYNC);
  ------------------
  |  |  159|      0|#define LDAP_BOOL_CLR(lo, bool) ((lo)->ldo_booleans &= ~LDAP_BOOL(bool))
  |  |  ------------------
  |  |  |  |  155|      0|#define LDAP_BOOL(n)	((LDAP_BOOLEANS)1 << (n))
  |  |  ------------------
  ------------------
  514|      0|		} else {
  515|      0|			LDAP_BOOL_SET(lo, LDAP_BOOL_CONNECT_ASYNC);
  ------------------
  |  |  158|      0|#define LDAP_BOOL_SET(lo, bool) ((lo)->ldo_booleans |= LDAP_BOOL(bool))
  |  |  ------------------
  |  |  |  |  155|      0|#define LDAP_BOOL(n)	((LDAP_BOOLEANS)1 << (n))
  |  |  ------------------
  ------------------
  516|      0|		}
  517|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  518|      0|		break;
  519|       |
  520|      0|	case LDAP_OPT_KEEPCONN:
  ------------------
  |  |  134|      0|#define	LDAP_OPT_KEEPCONN		0x5013	/* keep the connection on read error or NoD */
  ------------------
  |  Branch (520:2): [True: 0, False: 10.1k]
  ------------------
  521|      0|		if(invalue == LDAP_OPT_OFF) {
  ------------------
  |  |  230|      0|#define LDAP_OPT_OFF	((void *) 0)
  ------------------
  |  Branch (521:6): [True: 0, False: 0]
  ------------------
  522|      0|			LDAP_BOOL_CLR(lo, LDAP_BOOL_KEEPCONN);
  ------------------
  |  |  159|      0|#define LDAP_BOOL_CLR(lo, bool) ((lo)->ldo_booleans &= ~LDAP_BOOL(bool))
  |  |  ------------------
  |  |  |  |  155|      0|#define LDAP_BOOL(n)	((LDAP_BOOLEANS)1 << (n))
  |  |  ------------------
  ------------------
  523|      0|		} else {
  524|      0|			LDAP_BOOL_SET(lo, LDAP_BOOL_KEEPCONN);
  ------------------
  |  |  158|      0|#define LDAP_BOOL_SET(lo, bool) ((lo)->ldo_booleans |= LDAP_BOOL(bool))
  |  |  ------------------
  |  |  |  |  155|      0|#define LDAP_BOOL(n)	((LDAP_BOOLEANS)1 << (n))
  |  |  ------------------
  ------------------
  525|      0|		}
  526|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  527|      0|		break;
  528|       |	/* options which can withstand invalue == NULL */
  529|      0|	case LDAP_OPT_SERVER_CONTROLS: {
  ------------------
  |  |   94|      0|#define LDAP_OPT_SERVER_CONTROLS		0x0012
  ------------------
  |  Branch (529:2): [True: 0, False: 10.1k]
  ------------------
  530|      0|			LDAPControl *const *controls =
  531|      0|				(LDAPControl *const *) invalue;
  532|       |
  533|      0|			if( lo->ldo_sctrls )
  ------------------
  |  Branch (533:8): [True: 0, False: 0]
  ------------------
  534|      0|				ldap_controls_free( lo->ldo_sctrls );
  535|       |
  536|      0|			if( controls == NULL || *controls == NULL ) {
  ------------------
  |  Branch (536:8): [True: 0, False: 0]
  |  Branch (536:28): [True: 0, False: 0]
  ------------------
  537|      0|				lo->ldo_sctrls = NULL;
  538|      0|				rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  539|      0|				break;
  540|      0|			}
  541|       |				
  542|      0|			lo->ldo_sctrls = ldap_controls_dup( controls );
  543|       |
  544|      0|			if(lo->ldo_sctrls == NULL) {
  ------------------
  |  Branch (544:7): [True: 0, False: 0]
  ------------------
  545|       |				/* memory allocation error ? */
  546|      0|				break;	/* LDAP_OPT_ERROR */
  547|      0|			}
  548|      0|		}
  549|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  550|      0|		break;
  551|       |
  552|      0|	case LDAP_OPT_CLIENT_CONTROLS: {
  ------------------
  |  |   95|      0|#define LDAP_OPT_CLIENT_CONTROLS		0x0013
  ------------------
  |  Branch (552:2): [True: 0, False: 10.1k]
  ------------------
  553|      0|			LDAPControl *const *controls =
  554|      0|				(LDAPControl *const *) invalue;
  555|       |
  556|      0|			if( lo->ldo_cctrls )
  ------------------
  |  Branch (556:8): [True: 0, False: 0]
  ------------------
  557|      0|				ldap_controls_free( lo->ldo_cctrls );
  558|       |
  559|      0|			if( controls == NULL || *controls == NULL ) {
  ------------------
  |  Branch (559:8): [True: 0, False: 0]
  |  Branch (559:28): [True: 0, False: 0]
  ------------------
  560|      0|				lo->ldo_cctrls = NULL;
  561|      0|				rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  562|      0|				break;
  563|      0|			}
  564|       |				
  565|      0|			lo->ldo_cctrls = ldap_controls_dup( controls );
  566|       |
  567|      0|			if(lo->ldo_cctrls == NULL) {
  ------------------
  |  Branch (567:7): [True: 0, False: 0]
  ------------------
  568|       |				/* memory allocation error ? */
  569|      0|				break;	/* LDAP_OPT_ERROR */
  570|      0|			}
  571|      0|		}
  572|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  573|      0|		break;
  574|       |
  575|       |
  576|      0|	case LDAP_OPT_HOST_NAME: {
  ------------------
  |  |   99|      0|#define LDAP_OPT_HOST_NAME			0x0030
  ------------------
  |  Branch (576:2): [True: 0, False: 10.1k]
  ------------------
  577|      0|			const char *host = (const char *) invalue;
  578|      0|			LDAPURLDesc *ludlist = NULL;
  579|      0|			rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  580|       |
  581|      0|			if(host != NULL) {
  ------------------
  |  Branch (581:7): [True: 0, False: 0]
  ------------------
  582|      0|				rc = ldap_url_parsehosts( &ludlist, host,
  583|      0|					lo->ldo_defport ? lo->ldo_defport : LDAP_PORT );
  ------------------
  |  |   66|      0|#define LDAP_PORT		389		/* ldap:///		default LDAP port */
  ------------------
  |  Branch (583:6): [True: 0, False: 0]
  ------------------
  584|       |
  585|      0|			} else if(ld == NULL) {
  ------------------
  |  Branch (585:14): [True: 0, False: 0]
  ------------------
  586|       |				/*
  587|       |				 * must want global default returned
  588|       |				 * to initial condition.
  589|       |				 */
  590|      0|				rc = ldap_url_parselist_ext(&ludlist, "ldap://localhost/", NULL,
  591|      0|					LDAP_PVT_URL_PARSE_NOEMPTY_HOST
  ------------------
  |  |   46|      0|#define LDAP_PVT_URL_PARSE_NOEMPTY_HOST		(0x01U)
  ------------------
  592|      0|					| LDAP_PVT_URL_PARSE_DEF_PORT );
  ------------------
  |  |   47|      0|#define LDAP_PVT_URL_PARSE_DEF_PORT		(0x02U)
  ------------------
  593|       |
  594|      0|			} else {
  595|       |				/*
  596|       |				 * must want the session default
  597|       |				 *   updated to the current global default
  598|       |				 */
  599|      0|				ludlist = ldap_url_duplist(
  600|      0|					ldap_int_global_options.ldo_defludp);
  601|      0|				if (ludlist == NULL)
  ------------------
  |  Branch (601:9): [True: 0, False: 0]
  ------------------
  602|      0|					rc = LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  603|      0|			}
  604|       |
  605|      0|			if (rc == LDAP_OPT_SUCCESS) {
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  |  Branch (605:8): [True: 0, False: 0]
  ------------------
  606|      0|				if (lo->ldo_defludp != NULL)
  ------------------
  |  Branch (606:9): [True: 0, False: 0]
  ------------------
  607|      0|					ldap_free_urllist(lo->ldo_defludp);
  608|      0|				lo->ldo_defludp = ludlist;
  609|      0|			}
  610|      0|			break;
  611|      0|		}
  612|       |
  613|      0|	case LDAP_OPT_SOCKET_BIND_ADDRESSES: {
  ------------------
  |  |  135|      0|#define	LDAP_OPT_SOCKET_BIND_ADDRESSES	0x5014	/* user configured bind IPs */
  ------------------
  |  Branch (613:2): [True: 0, False: 10.1k]
  ------------------
  614|      0|			const char *source_ip = (const char *) invalue;
  615|      0|			char **source_ip_lst = NULL;
  616|       |
  617|      0|			ldapsourceip temp_source_ip;
  618|      0|			memset( &temp_source_ip, 0, sizeof( ldapsourceip ) );
  619|      0|			rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  620|      0|			if( source_ip == NULL ) {
  ------------------
  |  Branch (620:8): [True: 0, False: 0]
  ------------------
  621|      0|				if ( ld->ld_options.ldo_local_ip_addrs.local_ip_addrs ) {
  ------------------
  |  |  484|      0|#define ld_options		ldc->ldc_options
  ------------------
  |  Branch (621:10): [True: 0, False: 0]
  ------------------
  622|      0|					LDAP_FREE( ld->ld_options.ldo_local_ip_addrs.local_ip_addrs );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  623|      0|					memset( &ld->ld_options.ldo_local_ip_addrs, 0,
  ------------------
  |  |  484|      0|#define ld_options		ldc->ldc_options
  ------------------
  624|      0|						sizeof( ldapsourceip ) );
  625|      0|				}
  626|      0|			}
  627|      0|			else {
  628|      0|				source_ip_lst = ldap_str2charray( source_ip, " " );
  629|       |
  630|      0|				if ( source_ip_lst == NULL )
  ------------------
  |  Branch (630:10): [True: 0, False: 0]
  ------------------
  631|      0|					rc =  LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  632|       |
  633|      0|				if( rc == LDAP_OPT_SUCCESS ) {
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  |  Branch (633:9): [True: 0, False: 0]
  ------------------
  634|      0|					rc = ldap_validate_and_fill_sourceip ( source_ip_lst,
  635|      0|						&temp_source_ip );
  636|      0|					ldap_charray_free( source_ip_lst );
  637|      0|				}
  638|      0|				if ( rc == LDAP_OPT_SUCCESS ) {
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  |  Branch (638:10): [True: 0, False: 0]
  ------------------
  639|      0|					if ( lo->ldo_local_ip_addrs.local_ip_addrs != NULL ) {
  ------------------
  |  Branch (639:11): [True: 0, False: 0]
  ------------------
  640|      0|						LDAP_FREE( lo->ldo_local_ip_addrs.local_ip_addrs );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  641|      0|						lo->ldo_local_ip_addrs.local_ip_addrs = NULL;
  642|      0|					}
  643|      0|					lo->ldo_local_ip_addrs = temp_source_ip;
  644|      0|					lo->ldo_local_ip_addrs.local_ip_addrs = LDAP_STRDUP( source_ip );
  ------------------
  |  |  650|      0|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  645|      0|				}
  646|      0|			}
  647|      0|			break;
  648|      0|		}
  649|       |
  650|  3.39k|	case LDAP_OPT_URI: {
  ------------------
  |  |  127|  3.39k|#define LDAP_OPT_URI				0x5006
  ------------------
  |  Branch (650:2): [True: 3.39k, False: 6.79k]
  ------------------
  651|  3.39k|			const char *urls = (const char *) invalue;
  652|  3.39k|			LDAPURLDesc *ludlist = NULL;
  653|  3.39k|			rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|  3.39k|#define LDAP_OPT_SUCCESS	0
  ------------------
  654|       |
  655|  3.39k|			if(urls != NULL) {
  ------------------
  |  Branch (655:7): [True: 3.39k, False: 0]
  ------------------
  656|  3.39k|				rc = ldap_url_parselist_ext(&ludlist, urls, NULL,
  657|  3.39k|					LDAP_PVT_URL_PARSE_NOEMPTY_HOST
  ------------------
  |  |   46|  3.39k|#define LDAP_PVT_URL_PARSE_NOEMPTY_HOST		(0x01U)
  ------------------
  658|  3.39k|					| LDAP_PVT_URL_PARSE_DEF_PORT );
  ------------------
  |  |   47|  3.39k|#define LDAP_PVT_URL_PARSE_DEF_PORT		(0x02U)
  ------------------
  659|  3.39k|			} else if(ld == NULL) {
  ------------------
  |  Branch (659:14): [True: 0, False: 0]
  ------------------
  660|       |				/*
  661|       |				 * must want global default returned
  662|       |				 * to initial condition.
  663|       |				 */
  664|      0|				rc = ldap_url_parselist_ext(&ludlist, "ldap://localhost/", NULL,
  665|      0|					LDAP_PVT_URL_PARSE_NOEMPTY_HOST
  ------------------
  |  |   46|      0|#define LDAP_PVT_URL_PARSE_NOEMPTY_HOST		(0x01U)
  ------------------
  666|      0|					| LDAP_PVT_URL_PARSE_DEF_PORT );
  ------------------
  |  |   47|      0|#define LDAP_PVT_URL_PARSE_DEF_PORT		(0x02U)
  ------------------
  667|       |
  668|      0|			} else {
  669|       |				/*
  670|       |				 * must want the session default
  671|       |				 *   updated to the current global default
  672|       |				 */
  673|      0|				ludlist = ldap_url_duplist(
  674|      0|					ldap_int_global_options.ldo_defludp);
  675|      0|				if (ludlist == NULL)
  ------------------
  |  Branch (675:9): [True: 0, False: 0]
  ------------------
  676|      0|					rc = LDAP_URL_ERR_MEM;
  ------------------
  |  |  824|      0|#define LDAP_URL_ERR_MEM		0x01	/* can't allocate memory space */
  ------------------
  677|      0|			}
  678|       |
  679|  3.39k|			switch (rc) {
  ------------------
  |  Branch (679:12): [True: 3.39k, False: 0]
  ------------------
  680|  3.39k|			case LDAP_URL_SUCCESS:		/* Success */
  ------------------
  |  |  823|  3.39k|#define LDAP_URL_SUCCESS		0x00	/* Success */
  ------------------
  |  Branch (680:4): [True: 3.39k, False: 0]
  ------------------
  681|  3.39k|				rc = LDAP_SUCCESS;
  ------------------
  |  |  610|  3.39k|#define LDAP_SUCCESS				0x00
  ------------------
  682|  3.39k|				break;
  683|       |
  684|      0|			case LDAP_URL_ERR_MEM:		/* can't allocate memory space */
  ------------------
  |  |  824|      0|#define LDAP_URL_ERR_MEM		0x01	/* can't allocate memory space */
  ------------------
  |  Branch (684:4): [True: 0, False: 3.39k]
  ------------------
  685|      0|				rc = LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  686|      0|				break;
  687|       |
  688|      0|			case LDAP_URL_ERR_PARAM:	/* parameter is bad */
  ------------------
  |  |  825|      0|#define LDAP_URL_ERR_PARAM		0x02	/* parameter is bad */
  ------------------
  |  Branch (688:4): [True: 0, False: 3.39k]
  ------------------
  689|      0|			case LDAP_URL_ERR_BADSCHEME:	/* URL doesn't begin with "ldap[si]://" */
  ------------------
  |  |  827|      0|#define LDAP_URL_ERR_BADSCHEME	0x03	/* URL doesn't begin with "ldap[si]://" */
  ------------------
  |  Branch (689:4): [True: 0, False: 3.39k]
  ------------------
  690|      0|			case LDAP_URL_ERR_BADENCLOSURE:	/* URL is missing trailing ">" */
  ------------------
  |  |  828|      0|#define LDAP_URL_ERR_BADENCLOSURE 0x04	/* URL is missing trailing ">" */
  ------------------
  |  Branch (690:4): [True: 0, False: 3.39k]
  ------------------
  691|      0|			case LDAP_URL_ERR_BADURL:	/* URL is bad */
  ------------------
  |  |  829|      0|#define LDAP_URL_ERR_BADURL		0x05	/* URL is bad */
  ------------------
  |  Branch (691:4): [True: 0, False: 3.39k]
  ------------------
  692|      0|			case LDAP_URL_ERR_BADHOST:	/* host port is bad */
  ------------------
  |  |  830|      0|#define LDAP_URL_ERR_BADHOST	0x06	/* host port is bad */
  ------------------
  |  Branch (692:4): [True: 0, False: 3.39k]
  ------------------
  693|      0|			case LDAP_URL_ERR_BADATTRS:	/* bad (or missing) attributes */
  ------------------
  |  |  831|      0|#define LDAP_URL_ERR_BADATTRS	0x07	/* bad (or missing) attributes */
  ------------------
  |  Branch (693:4): [True: 0, False: 3.39k]
  ------------------
  694|      0|			case LDAP_URL_ERR_BADSCOPE:	/* scope string is invalid (or missing) */
  ------------------
  |  |  832|      0|#define LDAP_URL_ERR_BADSCOPE	0x08	/* scope string is invalid (or missing) */
  ------------------
  |  Branch (694:4): [True: 0, False: 3.39k]
  ------------------
  695|      0|			case LDAP_URL_ERR_BADFILTER:	/* bad or missing filter */
  ------------------
  |  |  833|      0|#define LDAP_URL_ERR_BADFILTER	0x09	/* bad or missing filter */
  ------------------
  |  Branch (695:4): [True: 0, False: 3.39k]
  ------------------
  696|      0|			case LDAP_URL_ERR_BADEXTS:	/* bad or missing extensions */
  ------------------
  |  |  834|      0|#define LDAP_URL_ERR_BADEXTS	0x0a	/* bad or missing extensions */
  ------------------
  |  Branch (696:4): [True: 0, False: 3.39k]
  ------------------
  697|      0|				rc = LDAP_PARAM_ERROR;
  ------------------
  |  |  744|      0|#define LDAP_PARAM_ERROR				(-9)
  ------------------
  698|      0|				break;
  699|  3.39k|			}
  700|       |
  701|  3.39k|			if (rc == LDAP_SUCCESS) {
  ------------------
  |  |  610|  3.39k|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (701:8): [True: 3.39k, False: 0]
  ------------------
  702|  3.39k|				if (lo->ldo_defludp != NULL)
  ------------------
  |  Branch (702:9): [True: 3.39k, False: 0]
  ------------------
  703|  3.39k|					ldap_free_urllist(lo->ldo_defludp);
  704|  3.39k|				lo->ldo_defludp = ludlist;
  705|  3.39k|			}
  706|  3.39k|			break;
  707|  3.39k|		}
  708|       |
  709|      0|	case LDAP_OPT_DEFBASE: {
  ------------------
  |  |  130|      0|#define LDAP_OPT_DEFBASE		0x5009	/* searchbase */
  ------------------
  |  Branch (709:2): [True: 0, False: 10.1k]
  ------------------
  710|      0|			const char *newbase = (const char *) invalue;
  711|      0|			char *defbase = NULL;
  712|       |
  713|      0|			if ( newbase != NULL ) {
  ------------------
  |  Branch (713:9): [True: 0, False: 0]
  ------------------
  714|      0|				defbase = LDAP_STRDUP( newbase );
  ------------------
  |  |  650|      0|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  715|      0|				if ( defbase == NULL ) {
  ------------------
  |  Branch (715:10): [True: 0, False: 0]
  ------------------
  716|      0|					rc = LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  717|      0|					break;
  718|      0|				}
  719|       |
  720|      0|			} else if ( ld != NULL ) {
  ------------------
  |  Branch (720:16): [True: 0, False: 0]
  ------------------
  721|      0|				defbase = LDAP_STRDUP( ldap_int_global_options.ldo_defbase );
  ------------------
  |  |  650|      0|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  722|      0|				if ( defbase == NULL ) {
  ------------------
  |  Branch (722:10): [True: 0, False: 0]
  ------------------
  723|      0|					rc = LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  724|      0|					break;
  725|      0|				}
  726|      0|			}
  727|       |			
  728|      0|			if ( lo->ldo_defbase != NULL )
  ------------------
  |  Branch (728:9): [True: 0, False: 0]
  ------------------
  729|      0|				LDAP_FREE( lo->ldo_defbase );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  730|      0|			lo->ldo_defbase = defbase;
  731|      0|		}
  732|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  733|      0|		break;
  734|       |
  735|      0|	case LDAP_OPT_DIAGNOSTIC_MESSAGE: {
  ------------------
  |  |  102|      0|#define LDAP_OPT_DIAGNOSTIC_MESSAGE		0x0032
  ------------------
  |  Branch (735:2): [True: 0, False: 10.1k]
  ------------------
  736|      0|			const char *err = (const char *) invalue;
  737|       |
  738|      0|			if(ld == NULL) {
  ------------------
  |  Branch (738:7): [True: 0, False: 0]
  ------------------
  739|       |				/* need a struct ldap */
  740|      0|				break;	/* LDAP_OPT_ERROR */
  741|      0|			}
  742|       |
  743|      0|			if( ld->ld_error ) {
  ------------------
  |  Branch (743:8): [True: 0, False: 0]
  ------------------
  744|      0|				LDAP_FREE(ld->ld_error);
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  745|      0|				ld->ld_error = NULL;
  746|      0|			}
  747|       |
  748|      0|			if ( err ) {
  ------------------
  |  Branch (748:9): [True: 0, False: 0]
  ------------------
  749|      0|				ld->ld_error = LDAP_STRDUP(err);
  ------------------
  |  |  650|      0|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  750|      0|			}
  751|      0|		}
  752|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  753|      0|		break;
  754|       |
  755|      0|	case LDAP_OPT_MATCHED_DN: {
  ------------------
  |  |  104|      0|#define LDAP_OPT_MATCHED_DN			0x0033
  ------------------
  |  Branch (755:2): [True: 0, False: 10.1k]
  ------------------
  756|      0|			const char *matched = (const char *) invalue;
  757|       |
  758|      0|			if (ld == NULL) {
  ------------------
  |  Branch (758:8): [True: 0, False: 0]
  ------------------
  759|       |				/* need a struct ldap */
  760|      0|				break;	/* LDAP_OPT_ERROR */
  761|      0|			}
  762|       |
  763|      0|			if( ld->ld_matched ) {
  ------------------
  |  Branch (763:8): [True: 0, False: 0]
  ------------------
  764|      0|				LDAP_FREE(ld->ld_matched);
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  765|      0|				ld->ld_matched = NULL;
  766|      0|			}
  767|       |
  768|      0|			if ( matched ) {
  ------------------
  |  Branch (768:9): [True: 0, False: 0]
  ------------------
  769|      0|				ld->ld_matched = LDAP_STRDUP( matched );
  ------------------
  |  |  650|      0|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  770|      0|			}
  771|      0|		}
  772|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  773|      0|		break;
  774|       |
  775|      0|	case LDAP_OPT_REFERRAL_URLS: {
  ------------------
  |  |  128|      0|#define LDAP_OPT_REFERRAL_URLS      0x5007  /* Referral URLs */
  ------------------
  |  Branch (775:2): [True: 0, False: 10.1k]
  ------------------
  776|      0|			char *const *referrals = (char *const *) invalue;
  777|       |			
  778|      0|			if(ld == NULL) {
  ------------------
  |  Branch (778:7): [True: 0, False: 0]
  ------------------
  779|       |				/* need a struct ldap */
  780|      0|				break;	/* LDAP_OPT_ERROR */
  781|      0|			}
  782|       |
  783|      0|			if( ld->ld_referrals ) {
  ------------------
  |  Branch (783:8): [True: 0, False: 0]
  ------------------
  784|      0|				LDAP_VFREE(ld->ld_referrals);
  ------------------
  |  |  649|      0|#define LDAP_VFREE(v)		(ber_memvfree_x((void **)(v),NULL))
  ------------------
  785|      0|			}
  786|       |
  787|      0|			if ( referrals ) {
  ------------------
  |  Branch (787:9): [True: 0, False: 0]
  ------------------
  788|      0|				ld->ld_referrals = ldap_value_dup(referrals);
  789|      0|			}
  790|      0|		}
  791|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  792|      0|		break;
  793|       |
  794|       |	/* Only accessed from inside this function by ldap_set_rebind_proc() */
  795|      0|	case LDAP_OPT_REBIND_PROC: {
  ------------------
  |  |   28|      0|#define LDAP_OPT_REBIND_PROC 0x4e814d
  ------------------
  |  Branch (795:2): [True: 0, False: 10.1k]
  ------------------
  796|      0|			lo->ldo_rebind_proc = (LDAP_REBIND_PROC *)invalue;		
  797|      0|		}
  798|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  799|      0|		break;
  800|      0|	case LDAP_OPT_REBIND_PARAMS: {
  ------------------
  |  |   29|      0|#define LDAP_OPT_REBIND_PARAMS 0x4e814e
  ------------------
  |  Branch (800:2): [True: 0, False: 10.1k]
  ------------------
  801|      0|			lo->ldo_rebind_params = (void *)invalue;		
  802|      0|		}
  803|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  804|      0|		break;
  805|       |
  806|       |	/* Only accessed from inside this function by ldap_set_nextref_proc() */
  807|      0|	case LDAP_OPT_NEXTREF_PROC: {
  ------------------
  |  |   31|      0|#define LDAP_OPT_NEXTREF_PROC 0x4e815d
  ------------------
  |  Branch (807:2): [True: 0, False: 10.1k]
  ------------------
  808|      0|			lo->ldo_nextref_proc = (LDAP_NEXTREF_PROC *)invalue;		
  809|      0|		}
  810|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  811|      0|		break;
  812|      0|	case LDAP_OPT_NEXTREF_PARAMS: {
  ------------------
  |  |   32|      0|#define LDAP_OPT_NEXTREF_PARAMS 0x4e815e
  ------------------
  |  Branch (812:2): [True: 0, False: 10.1k]
  ------------------
  813|      0|			lo->ldo_nextref_params = (void *)invalue;		
  814|      0|		}
  815|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  816|      0|		break;
  817|       |
  818|       |	/* Only accessed from inside this function by ldap_set_urllist_proc() */
  819|      0|	case LDAP_OPT_URLLIST_PROC: {
  ------------------
  |  |   34|      0|#define LDAP_OPT_URLLIST_PROC 0x4e816d
  ------------------
  |  Branch (819:2): [True: 0, False: 10.1k]
  ------------------
  820|      0|			lo->ldo_urllist_proc = (LDAP_URLLIST_PROC *)invalue;		
  821|      0|		}
  822|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  823|      0|		break;
  824|      0|	case LDAP_OPT_URLLIST_PARAMS: {
  ------------------
  |  |   35|      0|#define LDAP_OPT_URLLIST_PARAMS 0x4e816e
  ------------------
  |  Branch (824:2): [True: 0, False: 10.1k]
  ------------------
  825|      0|			lo->ldo_urllist_params = (void *)invalue;		
  826|      0|		}
  827|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  828|      0|		break;
  829|       |
  830|       |	/* read-only options */
  831|      0|	case LDAP_OPT_API_INFO:
  ------------------
  |  |   84|      0|#define LDAP_OPT_API_INFO			0x0000
  ------------------
  |  Branch (831:2): [True: 0, False: 10.1k]
  ------------------
  832|      0|	case LDAP_OPT_DESC:
  ------------------
  |  |   85|      0|#define LDAP_OPT_DESC				0x0001 /* historic */
  ------------------
  |  Branch (832:2): [True: 0, False: 10.1k]
  ------------------
  833|      0|	case LDAP_OPT_SOCKBUF:
  ------------------
  |  |  129|      0|#define LDAP_OPT_SOCKBUF            0x5008  /* sockbuf */
  ------------------
  |  Branch (833:2): [True: 0, False: 10.1k]
  ------------------
  834|      0|	case LDAP_OPT_API_FEATURE_INFO:
  ------------------
  |  |   97|      0|#define LDAP_OPT_API_FEATURE_INFO		0x0015
  ------------------
  |  Branch (834:2): [True: 0, False: 10.1k]
  ------------------
  835|      0|		break;	/* LDAP_OPT_ERROR */
  836|       |
  837|       |	/* options which cannot withstand invalue == NULL */
  838|      0|	case LDAP_OPT_DEREF:
  ------------------
  |  |   86|      0|#define LDAP_OPT_DEREF				0x0002
  ------------------
  |  Branch (838:2): [True: 0, False: 10.1k]
  ------------------
  839|      0|	case LDAP_OPT_SIZELIMIT:
  ------------------
  |  |   87|      0|#define LDAP_OPT_SIZELIMIT			0x0003
  ------------------
  |  Branch (839:2): [True: 0, False: 10.1k]
  ------------------
  840|      0|	case LDAP_OPT_TIMELIMIT:
  ------------------
  |  |   88|      0|#define LDAP_OPT_TIMELIMIT			0x0004
  ------------------
  |  Branch (840:2): [True: 0, False: 10.1k]
  ------------------
  841|  3.40k|	case LDAP_OPT_PROTOCOL_VERSION:
  ------------------
  |  |   93|  3.40k|#define LDAP_OPT_PROTOCOL_VERSION		0x0011
  ------------------
  |  Branch (841:2): [True: 3.40k, False: 6.78k]
  ------------------
  842|  3.40k|	case LDAP_OPT_RESULT_CODE:
  ------------------
  |  |  100|  3.40k|#define LDAP_OPT_RESULT_CODE			0x0031
  ------------------
  |  Branch (842:2): [True: 0, False: 10.1k]
  ------------------
  843|  3.40k|	case LDAP_OPT_DEBUG_LEVEL:
  ------------------
  |  |  123|  3.40k|#define LDAP_OPT_DEBUG_LEVEL		0x5001	/* debug level */
  ------------------
  |  Branch (843:2): [True: 0, False: 10.1k]
  ------------------
  844|  3.40k|	case LDAP_OPT_TIMEOUT:
  ------------------
  |  |  124|  3.40k|#define LDAP_OPT_TIMEOUT			0x5002	/* default timeout */
  ------------------
  |  Branch (844:2): [True: 0, False: 10.1k]
  ------------------
  845|  3.40k|	case LDAP_OPT_NETWORK_TIMEOUT:
  ------------------
  |  |  126|  3.40k|#define LDAP_OPT_NETWORK_TIMEOUT	0x5005	/* socket level timeout */
  ------------------
  |  Branch (845:2): [True: 0, False: 10.1k]
  ------------------
  846|  3.40k|	case LDAP_OPT_CONNECT_CB:
  ------------------
  |  |  132|  3.40k|#define	LDAP_OPT_CONNECT_CB			0x5011	/* connection callbacks */
  ------------------
  |  Branch (846:2): [True: 0, False: 10.1k]
  ------------------
  847|  3.40k|	case LDAP_OPT_X_KEEPALIVE_IDLE:
  ------------------
  |  |  212|  3.40k|#define LDAP_OPT_X_KEEPALIVE_IDLE		0x6300
  ------------------
  |  Branch (847:2): [True: 0, False: 10.1k]
  ------------------
  848|  3.40k|	case LDAP_OPT_X_KEEPALIVE_PROBES :
  ------------------
  |  |  213|  3.40k|#define LDAP_OPT_X_KEEPALIVE_PROBES		0x6301
  ------------------
  |  Branch (848:2): [True: 0, False: 10.1k]
  ------------------
  849|  3.40k|	case LDAP_OPT_X_KEEPALIVE_INTERVAL :
  ------------------
  |  |  214|  3.40k|#define LDAP_OPT_X_KEEPALIVE_INTERVAL	0x6302
  ------------------
  |  Branch (849:2): [True: 0, False: 10.1k]
  ------------------
  850|  3.40k|	case LDAP_OPT_TCP_USER_TIMEOUT:
  ------------------
  |  |  136|  3.40k|#define	LDAP_OPT_TCP_USER_TIMEOUT	0x5015	/* set TCP_USER_TIMEOUT if the OS supports it, ignored otherwise */
  ------------------
  |  Branch (850:2): [True: 0, False: 10.1k]
  ------------------
  851|  3.40k|		if(invalue == NULL) {
  ------------------
  |  Branch (851:6): [True: 0, False: 3.40k]
  ------------------
  852|       |			/* no place to set from */
  853|      0|			LDAP_MUTEX_UNLOCK( &lo->ldo_mutex );
  ------------------
  |  |  552|      0|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  854|      0|			return ( LDAP_OPT_ERROR );
  ------------------
  |  |  226|      0|#define	LDAP_OPT_ERROR		(-1)
  ------------------
  855|      0|		}
  856|  3.40k|		break;
  857|       |
  858|  3.40k|	default:
  ------------------
  |  Branch (858:2): [True: 0, False: 10.1k]
  ------------------
  859|       |#ifdef HAVE_TLS
  860|       |		if ( ldap_pvt_tls_set_option( ld, option, (void *)invalue ) == 0 ) {
  861|       |			LDAP_MUTEX_UNLOCK( &lo->ldo_mutex );
  862|       |			return ( LDAP_OPT_SUCCESS );
  863|       |		}
  864|       |#endif
  865|       |#ifdef HAVE_CYRUS_SASL
  866|       |		if ( ldap_int_sasl_set_option( ld, option, (void *)invalue ) == 0 ) {
  867|       |			LDAP_MUTEX_UNLOCK( &lo->ldo_mutex );
  868|       |			return ( LDAP_OPT_SUCCESS );
  869|       |		}
  870|       |#endif
  871|       |		/* bad param */
  872|      0|		break;	/* LDAP_OPT_ERROR */
  873|  10.1k|	}
  874|       |
  875|       |	/* options which cannot withstand invalue == NULL */
  876|       |
  877|  10.1k|	switch(option) {
  ------------------
  |  Branch (877:9): [True: 3.40k, False: 6.78k]
  ------------------
  878|      0|	case LDAP_OPT_DEREF:
  ------------------
  |  |   86|      0|#define LDAP_OPT_DEREF				0x0002
  ------------------
  |  Branch (878:2): [True: 0, False: 10.1k]
  ------------------
  879|       |		/* FIXME: check value for protocol compliance? */
  880|      0|		lo->ldo_deref = * (const int *) invalue;
  881|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  882|      0|		break;
  883|       |
  884|      0|	case LDAP_OPT_SIZELIMIT:
  ------------------
  |  |   87|      0|#define LDAP_OPT_SIZELIMIT			0x0003
  ------------------
  |  Branch (884:2): [True: 0, False: 10.1k]
  ------------------
  885|       |		/* FIXME: check value for protocol compliance? */
  886|      0|		lo->ldo_sizelimit = * (const int *) invalue;
  887|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  888|      0|		break;
  889|       |
  890|      0|	case LDAP_OPT_TIMELIMIT:
  ------------------
  |  |   88|      0|#define LDAP_OPT_TIMELIMIT			0x0004
  ------------------
  |  Branch (890:2): [True: 0, False: 10.1k]
  ------------------
  891|       |		/* FIXME: check value for protocol compliance? */
  892|      0|		lo->ldo_timelimit = * (const int *) invalue;
  893|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  894|      0|		break;
  895|       |
  896|      0|	case LDAP_OPT_TIMEOUT: {
  ------------------
  |  |  124|      0|#define LDAP_OPT_TIMEOUT			0x5002	/* default timeout */
  ------------------
  |  Branch (896:2): [True: 0, False: 10.1k]
  ------------------
  897|      0|			const struct timeval *tv = 
  898|      0|				(const struct timeval *) invalue;
  899|       |
  900|      0|			lo->ldo_tm_api = *tv;
  901|      0|		}
  902|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  903|      0|		break;
  904|       |
  905|      0|	case LDAP_OPT_NETWORK_TIMEOUT: {
  ------------------
  |  |  126|      0|#define LDAP_OPT_NETWORK_TIMEOUT	0x5005	/* socket level timeout */
  ------------------
  |  Branch (905:2): [True: 0, False: 10.1k]
  ------------------
  906|      0|			const struct timeval *tv = 
  907|      0|				(const struct timeval *) invalue;
  908|       |
  909|      0|			lo->ldo_tm_net = *tv;
  910|      0|		}
  911|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  912|      0|		break;
  913|       |
  914|  3.40k|	case LDAP_OPT_PROTOCOL_VERSION: {
  ------------------
  |  |   93|  3.40k|#define LDAP_OPT_PROTOCOL_VERSION		0x0011
  ------------------
  |  Branch (914:2): [True: 3.40k, False: 6.78k]
  ------------------
  915|  3.40k|			int vers = * (const int *) invalue;
  916|  3.40k|			if (vers < LDAP_VERSION_MIN || vers > LDAP_VERSION_MAX) {
  ------------------
  |  |   41|  3.40k|#define LDAP_VERSION_MIN	LDAP_VERSION2
  |  |  ------------------
  |  |  |  |   38|  6.81k|#define LDAP_VERSION2	2
  |  |  ------------------
  ------------------
              			if (vers < LDAP_VERSION_MIN || vers > LDAP_VERSION_MAX) {
  ------------------
  |  |   43|  3.40k|#define LDAP_VERSION_MAX	LDAP_VERSION3
  |  |  ------------------
  |  |  |  |   39|  3.40k|#define LDAP_VERSION3	3
  |  |  ------------------
  ------------------
  |  Branch (916:8): [True: 0, False: 3.40k]
  |  Branch (916:35): [True: 0, False: 3.40k]
  ------------------
  917|       |				/* not supported */
  918|      0|				break;
  919|      0|			}
  920|  3.40k|			lo->ldo_version = vers;
  921|  3.40k|		}
  922|  3.40k|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|  3.40k|#define LDAP_OPT_SUCCESS	0
  ------------------
  923|  3.40k|		break;
  924|       |
  925|      0|	case LDAP_OPT_RESULT_CODE: {
  ------------------
  |  |  100|      0|#define LDAP_OPT_RESULT_CODE			0x0031
  ------------------
  |  Branch (925:2): [True: 0, False: 10.1k]
  ------------------
  926|      0|			int err = * (const int *) invalue;
  927|       |
  928|      0|			if(ld == NULL) {
  ------------------
  |  Branch (928:7): [True: 0, False: 0]
  ------------------
  929|       |				/* need a struct ldap */
  930|      0|				break;
  931|      0|			}
  932|       |
  933|      0|			ld->ld_errno = err;
  934|      0|		}
  935|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  936|      0|		break;
  937|       |
  938|      0|	case LDAP_OPT_DEBUG_LEVEL:
  ------------------
  |  |  123|      0|#define LDAP_OPT_DEBUG_LEVEL		0x5001	/* debug level */
  ------------------
  |  Branch (938:2): [True: 0, False: 10.1k]
  ------------------
  939|      0|		lo->ldo_debug = * (const int *) invalue;
  940|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  941|      0|		break;
  942|       |
  943|      0|	case LDAP_OPT_CONNECT_CB:
  ------------------
  |  |  132|      0|#define	LDAP_OPT_CONNECT_CB			0x5011	/* connection callbacks */
  ------------------
  |  Branch (943:2): [True: 0, False: 10.1k]
  ------------------
  944|      0|		{
  945|       |			/* setting pushes the callback */
  946|      0|			ldaplist *ll;
  947|      0|			ll = LDAP_MALLOC( sizeof( *ll ));
  ------------------
  |  |  645|      0|#define LDAP_MALLOC(s)		(ber_memalloc_x((s),NULL))
  ------------------
  948|      0|			if ( ll == NULL ) {
  ------------------
  |  Branch (948:9): [True: 0, False: 0]
  ------------------
  949|      0|				rc = LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  950|      0|				break;
  951|      0|			}
  952|       |
  953|      0|			ll->ll_data = (void *)invalue;
  954|      0|			ll->ll_next = lo->ldo_conn_cbs;
  955|      0|			lo->ldo_conn_cbs = ll;
  956|      0|		}
  957|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  958|      0|		break;
  959|      0|	case LDAP_OPT_X_KEEPALIVE_IDLE:
  ------------------
  |  |  212|      0|#define LDAP_OPT_X_KEEPALIVE_IDLE		0x6300
  ------------------
  |  Branch (959:2): [True: 0, False: 10.1k]
  ------------------
  960|      0|		lo->ldo_keepalive_idle = * (const int *) invalue;
  961|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  962|      0|		break;
  963|      0|	case LDAP_OPT_X_KEEPALIVE_PROBES :
  ------------------
  |  |  213|      0|#define LDAP_OPT_X_KEEPALIVE_PROBES		0x6301
  ------------------
  |  Branch (963:2): [True: 0, False: 10.1k]
  ------------------
  964|      0|		lo->ldo_keepalive_probes = * (const int *) invalue;
  965|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  966|      0|		break;
  967|      0|	case LDAP_OPT_X_KEEPALIVE_INTERVAL :
  ------------------
  |  |  214|      0|#define LDAP_OPT_X_KEEPALIVE_INTERVAL	0x6302
  ------------------
  |  Branch (967:2): [True: 0, False: 10.1k]
  ------------------
  968|      0|		lo->ldo_keepalive_interval = * (const int *) invalue;
  969|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  970|      0|		break;
  971|      0|	case LDAP_OPT_TCP_USER_TIMEOUT:
  ------------------
  |  |  136|      0|#define	LDAP_OPT_TCP_USER_TIMEOUT	0x5015	/* set TCP_USER_TIMEOUT if the OS supports it, ignored otherwise */
  ------------------
  |  Branch (971:2): [True: 0, False: 10.1k]
  ------------------
  972|      0|		lo->ldo_tcp_user_timeout = * (const unsigned int *) invalue;
  973|      0|		rc = LDAP_OPT_SUCCESS;
  ------------------
  |  |  225|      0|#define LDAP_OPT_SUCCESS	0
  ------------------
  974|      0|		break;
  975|       |	
  976|  10.1k|	}
  977|  10.1k|	LDAP_MUTEX_UNLOCK( &lo->ldo_mutex );
  ------------------
  |  |  552|  10.1k|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  978|  10.1k|	return ( rc );
  979|  10.1k|}

ldap_mark_select_read:
 1023|  7.71k|{
 1024|  7.71k|	struct selectinfo	*sip;
 1025|  7.71k|	ber_socket_t		sd;
 1026|       |
 1027|  7.71k|	sip = (struct selectinfo *)ld->ld_selectinfo;
  ------------------
  |  |  475|  7.71k|#define	ld_selectinfo		ldc->ldc_selectinfo
  ------------------
 1028|       |
 1029|  7.71k|	ber_sockbuf_ctrl( sb, LBER_SB_OPT_GET_FD, &sd );
  ------------------
  |  |  134|  7.71k|#define LBER_SB_OPT_GET_FD		1
  ------------------
 1030|       |
 1031|  7.71k|#ifdef HAVE_POLL
 1032|       |	/* for UNIX poll(2) */
 1033|  7.71k|	{
 1034|  7.71k|		int empty=-1;
 1035|  7.71k|		int i;
 1036|  7.71k|		for(i=0; i < sip->si_maxfd; i++) {
  ------------------
  |  Branch (1036:12): [True: 4.31k, False: 3.39k]
  ------------------
 1037|  4.31k|			if( sip->si_fds[i].fd == sd ) {
  ------------------
  |  Branch (1037:8): [True: 4.31k, False: 0]
  ------------------
 1038|  4.31k|				sip->si_fds[i].events |= POLL_READ;
  ------------------
  |  |  260|  4.31k|#define POLL_READ    (POLLIN|POLLPRI|POLL_OTHER)
  |  |  ------------------
  |  |  |  |  258|  4.31k|#define POLL_OTHER   (POLLERR|POLLHUP)
  |  |  ------------------
  ------------------
 1039|  4.31k|				return;
 1040|  4.31k|			}
 1041|      0|			if( empty==-1 && sip->si_fds[i].fd == -1 ) {
  ------------------
  |  Branch (1041:8): [True: 0, False: 0]
  |  Branch (1041:21): [True: 0, False: 0]
  ------------------
 1042|      0|				empty=i;
 1043|      0|			}
 1044|      0|		}
 1045|       |
 1046|  3.39k|		if( empty == -1 ) {
  ------------------
  |  Branch (1046:7): [True: 3.39k, False: 0]
  ------------------
 1047|  3.39k|			if( sip->si_maxfd >= FD_SETSIZE ) {
  ------------------
  |  Branch (1047:8): [True: 0, False: 3.39k]
  ------------------
 1048|       |				/* FIXME */
 1049|      0|				return;
 1050|      0|			}
 1051|  3.39k|			empty = sip->si_maxfd++;
 1052|  3.39k|		}
 1053|       |
 1054|  3.39k|		sip->si_fds[empty].fd = sd;
 1055|  3.39k|		sip->si_fds[empty].events = POLL_READ;
  ------------------
  |  |  260|  3.39k|#define POLL_READ    (POLLIN|POLLPRI|POLL_OTHER)
  |  |  ------------------
  |  |  |  |  258|  3.39k|#define POLL_OTHER   (POLLERR|POLLHUP)
  |  |  ------------------
  ------------------
 1056|  3.39k|	}
 1057|       |#else
 1058|       |	/* for UNIX select(2) */
 1059|       |	if ( !FD_ISSET( sd, &sip->si_readfds )) {
 1060|       |		FD_SET( sd, &sip->si_readfds );
 1061|       |	}
 1062|       |#endif
 1063|  3.39k|}
ldap_mark_select_clear:
 1068|  1.93k|{
 1069|  1.93k|	struct selectinfo	*sip;
 1070|  1.93k|	ber_socket_t		sd;
 1071|       |
 1072|  1.93k|	sip = (struct selectinfo *)ld->ld_selectinfo;
  ------------------
  |  |  475|  1.93k|#define	ld_selectinfo		ldc->ldc_selectinfo
  ------------------
 1073|       |
 1074|  1.93k|	ber_sockbuf_ctrl( sb, LBER_SB_OPT_GET_FD, &sd );
  ------------------
  |  |  134|  1.93k|#define LBER_SB_OPT_GET_FD		1
  ------------------
 1075|       |
 1076|  1.93k|#ifdef HAVE_POLL
 1077|       |	/* for UNIX poll(2) */
 1078|  1.93k|	{
 1079|  1.93k|		int i;
 1080|  3.86k|		for(i=0; i < sip->si_maxfd; i++) {
  ------------------
  |  Branch (1080:12): [True: 1.93k, False: 1.93k]
  ------------------
 1081|  1.93k|			if( sip->si_fds[i].fd == sd ) {
  ------------------
  |  Branch (1081:8): [True: 1.93k, False: 0]
  ------------------
 1082|  1.93k|				sip->si_fds[i].fd = -1;
 1083|  1.93k|			}
 1084|  1.93k|		}
 1085|  1.93k|	}
 1086|       |#else
 1087|       |	/* for UNIX select(2) */
 1088|       |	FD_CLR( sd, &sip->si_writefds );
 1089|       |	FD_CLR( sd, &sip->si_readfds );
 1090|       |#endif
 1091|  1.93k|}
ldap_clear_select_write:
 1095|  4.31k|{
 1096|  4.31k|	struct selectinfo	*sip;
 1097|  4.31k|	ber_socket_t		sd;
 1098|       |
 1099|  4.31k|	sip = (struct selectinfo *)ld->ld_selectinfo;
  ------------------
  |  |  475|  4.31k|#define	ld_selectinfo		ldc->ldc_selectinfo
  ------------------
 1100|       |
 1101|  4.31k|	ber_sockbuf_ctrl( sb, LBER_SB_OPT_GET_FD, &sd );
  ------------------
  |  |  134|  4.31k|#define LBER_SB_OPT_GET_FD		1
  ------------------
 1102|       |
 1103|  4.31k|#ifdef HAVE_POLL
 1104|       |	/* for UNIX poll(2) */
 1105|  4.31k|	{
 1106|  4.31k|		int i;
 1107|  8.63k|		for(i=0; i < sip->si_maxfd; i++) {
  ------------------
  |  Branch (1107:12): [True: 4.31k, False: 4.31k]
  ------------------
 1108|  4.31k|			if( sip->si_fds[i].fd == sd ) {
  ------------------
  |  Branch (1108:8): [True: 4.31k, False: 0]
  ------------------
 1109|  4.31k|				sip->si_fds[i].events &= ~POLL_WRITE;
  ------------------
  |  |  262|  4.31k|#define POLL_WRITE   (POLLOUT|POLL_OTHER)
  |  |  ------------------
  |  |  |  |  258|  4.31k|#define POLL_OTHER   (POLLERR|POLLHUP)
  |  |  ------------------
  ------------------
 1110|  4.31k|			}
 1111|  4.31k|		}
 1112|  4.31k|	}
 1113|       |#else
 1114|       |	/* for UNIX select(2) */
 1115|       |	FD_CLR( sd, &sip->si_writefds );
 1116|       |#endif
 1117|  4.31k|}
ldap_is_read_ready:
 1151|  5.46k|{
 1152|  5.46k|	struct selectinfo	*sip;
 1153|  5.46k|	ber_socket_t		sd;
 1154|       |
 1155|  5.46k|	sip = (struct selectinfo *)ld->ld_selectinfo;
  ------------------
  |  |  475|  5.46k|#define	ld_selectinfo		ldc->ldc_selectinfo
  ------------------
 1156|       |
 1157|  5.46k|	if (ber_sockbuf_ctrl( sb, LBER_SB_OPT_DATA_READY, NULL ))
  ------------------
  |  |  139|  5.46k|#define LBER_SB_OPT_DATA_READY		8
  ------------------
  |  Branch (1157:6): [True: 0, False: 5.46k]
  ------------------
 1158|      0|		return 1;
 1159|       |
 1160|  5.46k|	ber_sockbuf_ctrl( sb, LBER_SB_OPT_GET_FD, &sd );
  ------------------
  |  |  134|  5.46k|#define LBER_SB_OPT_GET_FD		1
  ------------------
 1161|       |
 1162|  5.46k|#ifdef HAVE_POLL
 1163|       |	/* for UNIX poll(2) */
 1164|  5.46k|	{
 1165|  5.46k|		int i;
 1166|  5.46k|		for(i=0; i < sip->si_maxfd; i++) {
  ------------------
  |  Branch (1166:12): [True: 5.46k, False: 0]
  ------------------
 1167|  5.46k|			if( sip->si_fds[i].fd == sd ) {
  ------------------
  |  Branch (1167:8): [True: 5.46k, False: 0]
  ------------------
 1168|  5.46k|				return sip->si_fds[i].revents & POLL_READ;
  ------------------
  |  |  260|  5.46k|#define POLL_READ    (POLLIN|POLLPRI|POLL_OTHER)
  |  |  ------------------
  |  |  |  |  258|  5.46k|#define POLL_OTHER   (POLLERR|POLLHUP)
  |  |  ------------------
  ------------------
 1169|  5.46k|			}
 1170|  5.46k|		}
 1171|       |
 1172|      0|		return 0;
 1173|  5.46k|	}
 1174|       |#else
 1175|       |	/* for UNIX select(2) */
 1176|       |	return( FD_ISSET( sd, &sip->si_use_readfds ));
 1177|       |#endif
 1178|  5.46k|}
ldap_new_select_info:
 1183|  3.39k|{
 1184|  3.39k|	struct selectinfo	*sip;
 1185|       |
 1186|  3.39k|	sip = (struct selectinfo *)LDAP_CALLOC( 1, sizeof( struct selectinfo ));
  ------------------
  |  |  646|  3.39k|#define LDAP_CALLOC(n,s)	(ber_memcalloc_x((n),(s),NULL))
  ------------------
 1187|       |
 1188|  3.39k|	if ( sip == NULL ) return NULL;
  ------------------
  |  Branch (1188:7): [True: 0, False: 3.39k]
  ------------------
 1189|       |
 1190|  3.39k|#ifdef HAVE_POLL
 1191|       |	/* for UNIX poll(2) */
 1192|       |	/* sip->si_maxfd=0 */
 1193|       |#else
 1194|       |	/* for UNIX select(2) */
 1195|       |	FD_ZERO( &sip->si_readfds );
 1196|       |	FD_ZERO( &sip->si_writefds );
 1197|       |#endif
 1198|       |
 1199|  3.39k|	return( (void *)sip );
 1200|  3.39k|}
ldap_free_select_info:
 1205|  3.39k|{
 1206|       |	LDAP_FREE( sip );
  ------------------
  |  |  648|  3.39k|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1207|  3.39k|}
ldap_int_select:
 1237|  7.79k|{
 1238|  7.79k|	int rc;
 1239|  7.79k|	struct selectinfo	*sip;
 1240|       |
 1241|  7.79k|	Debug0( LDAP_DEBUG_TRACE, "ldap_int_select\n" );
  ------------------
  |  |   87|  7.79k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  7.79k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  7.79k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  7.79k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 7.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|  7.79k|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|  7.79k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 7.79k]
  |  |  ------------------
  ------------------
 1242|       |
 1243|       |#ifndef HAVE_POLL
 1244|       |	if ( ldap_int_tblsize == 0 ) ldap_int_ip_init();
 1245|       |#endif
 1246|       |
 1247|  7.79k|	sip = (struct selectinfo *)ld->ld_selectinfo;
  ------------------
  |  |  475|  7.79k|#define	ld_selectinfo		ldc->ldc_selectinfo
  ------------------
 1248|  7.79k|	assert( sip != NULL );
  ------------------
  |  Branch (1248:2): [True: 0, False: 7.79k]
  |  Branch (1248:2): [True: 7.79k, False: 0]
  ------------------
 1249|       |
 1250|  7.79k|#ifdef HAVE_POLL
 1251|  7.79k|	{
 1252|  7.79k|		int to = timeout ? TV2MILLISEC( timeout ) : INFTIM;
  ------------------
  |  |   52|  7.79k|#define TV2MILLISEC(tv) (((tv)->tv_sec * 1000) + ((tv)->tv_usec/1000))
  ------------------
              		int to = timeout ? TV2MILLISEC( timeout ) : INFTIM;
  ------------------
  |  |  255|  7.79k|#  define INFTIM (-1)
  ------------------
  |  Branch (1252:12): [True: 7.79k, False: 0]
  ------------------
 1253|  7.79k|		rc = poll( sip->si_fds, sip->si_maxfd, to );
 1254|  7.79k|	}
 1255|       |#else
 1256|       |	sip->si_use_readfds = sip->si_readfds;
 1257|       |	sip->si_use_writefds = sip->si_writefds;
 1258|       |	
 1259|       |	rc = select( ldap_int_tblsize,
 1260|       |		&sip->si_use_readfds, &sip->si_use_writefds,
 1261|       |		NULL, timeout );
 1262|       |#endif
 1263|       |
 1264|  7.79k|	return rc;
 1265|  7.79k|}

ldap_alloc_ber_with_options:
   94|  13.0k|{
   95|  13.0k|	BerElement	*ber;
   96|       |
   97|  13.0k|	ber = ber_alloc_t( ld->ld_lberoptions );
  ------------------
  |  |  443|  13.0k|#define	ld_lberoptions		ldc->ldc_lberoptions
  ------------------
   98|  13.0k|	if ( ber == NULL ) {
  ------------------
  |  Branch (98:7): [True: 0, False: 13.0k]
  ------------------
   99|      0|		ld->ld_errno = LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  100|      0|	}
  101|       |
  102|  13.0k|	return( ber );
  103|  13.0k|}
ldap_send_initial_request:
  122|  4.31k|{
  123|  4.31k|	int rc = 1;
  124|  4.31k|	ber_socket_t sd = AC_SOCKET_INVALID;
  ------------------
  |  |  163|  4.31k|#	define AC_SOCKET_INVALID	(-1)
  ------------------
  125|       |
  126|  4.31k|	Debug0( LDAP_DEBUG_TRACE, "ldap_send_initial_request\n" );
  ------------------
  |  |   87|  4.31k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  4.31k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  4.31k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  4.31k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 4.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|  4.31k|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|  4.31k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 4.31k]
  |  |  ------------------
  ------------------
  127|       |
  128|  4.31k|	LDAP_MUTEX_LOCK( &ld->ld_conn_mutex );
  ------------------
  |  |  551|  4.31k|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  129|  4.31k|	if ( ber_sockbuf_ctrl( ld->ld_sb, LBER_SB_OPT_GET_FD, &sd ) == -1 ) {
  ------------------
  |  |  440|  4.31k|#define ld_sb			ldc->ldc_sb
  ------------------
              	if ( ber_sockbuf_ctrl( ld->ld_sb, LBER_SB_OPT_GET_FD, &sd ) == -1 ) {
  ------------------
  |  |  134|  4.31k|#define LBER_SB_OPT_GET_FD		1
  ------------------
  |  Branch (129:7): [True: 0, False: 4.31k]
  ------------------
  130|       |		/* not connected yet */
  131|      0|		rc = ldap_open_defconn( ld );
  132|      0|		if ( rc == 0 ) {
  ------------------
  |  Branch (132:8): [True: 0, False: 0]
  ------------------
  133|      0|			ber_sockbuf_ctrl( ld->ld_defconn->lconn_sb,
  ------------------
  |  |  471|      0|#define	ld_defconn		ldc->ldc_defconn
  ------------------
  134|      0|				LBER_SB_OPT_GET_FD, &sd );
  ------------------
  |  |  134|      0|#define LBER_SB_OPT_GET_FD		1
  ------------------
  135|      0|		}
  136|      0|	}
  137|  4.31k|	if ( ld->ld_defconn && ld->ld_defconn->lconn_status == LDAP_CONNST_CONNECTING )
  ------------------
  |  |  471|  8.63k|#define	ld_defconn		ldc->ldc_defconn
  ------------------
              	if ( ld->ld_defconn && ld->ld_defconn->lconn_status == LDAP_CONNST_CONNECTING )
  ------------------
  |  |  471|  4.31k|#define	ld_defconn		ldc->ldc_defconn
  ------------------
              	if ( ld->ld_defconn && ld->ld_defconn->lconn_status == LDAP_CONNST_CONNECTING )
  ------------------
  |  |  369|  4.31k|#define LDAP_CONNST_CONNECTING		2
  ------------------
  |  Branch (137:7): [True: 4.31k, False: 0]
  |  Branch (137:25): [True: 0, False: 4.31k]
  ------------------
  138|      0|		rc = ldap_int_check_async_open( ld, sd );
  139|  4.31k|	if( rc < 0 ) {
  ------------------
  |  Branch (139:6): [True: 0, False: 4.31k]
  ------------------
  140|      0|		ber_free( ber, 1 );
  141|      0|		LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex );
  ------------------
  |  |  552|      0|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  142|      0|		return( -1 );
  143|  4.31k|	} else if ( rc == 0 ) {
  ------------------
  |  Branch (143:14): [True: 0, False: 4.31k]
  ------------------
  144|      0|		Debug0( LDAP_DEBUG_TRACE,
  ------------------
  |  |   87|      0|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      0|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|      0|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|      0|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  145|      0|			"ldap_open_defconn: successful\n" );
  146|      0|	}
  147|       |
  148|       |#ifdef LDAP_CONNECTIONLESS
  149|       |	if (LDAP_IS_UDP(ld)) {
  150|       |		if (msgtype == LDAP_REQ_BIND) {
  151|       |			LDAP_MUTEX_LOCK( &ld->ld_options.ldo_mutex );
  152|       |			if (ld->ld_options.ldo_cldapdn)
  153|       |				ldap_memfree(ld->ld_options.ldo_cldapdn);
  154|       |			ld->ld_options.ldo_cldapdn = ldap_strdup(dn);
  155|       |			ber_free( ber, 1 );
  156|       |			LDAP_MUTEX_UNLOCK( &ld->ld_options.ldo_mutex );
  157|       |			LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex );
  158|       |			return 0;
  159|       |		}
  160|       |		if (msgtype != LDAP_REQ_ABANDON && msgtype != LDAP_REQ_SEARCH)
  161|       |		{
  162|       |			ber_free( ber, 1 );
  163|       |			LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex );
  164|       |			return LDAP_PARAM_ERROR;
  165|       |		}
  166|       |	}
  167|       |#endif
  168|  4.31k|	LDAP_MUTEX_LOCK( &ld->ld_req_mutex );
  ------------------
  |  |  551|  4.31k|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  169|  4.31k|	rc = ldap_send_server_request( ld, ber, msgid, NULL,
  170|  4.31k|		NULL, NULL, NULL, 0, 0 );
  171|  4.31k|	LDAP_MUTEX_UNLOCK( &ld->ld_req_mutex );
  ------------------
  |  |  552|  4.31k|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  172|  4.31k|	LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex );
  ------------------
  |  |  552|  4.31k|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  173|  4.31k|	return(rc);
  174|  4.31k|}
ldap_int_flush_request:
  182|  4.31k|{
  183|  4.31k|	LDAPConn *lc = lr->lr_conn;
  184|       |
  185|  4.31k|	LDAP_ASSERT_MUTEX_OWNER( &ld->ld_conn_mutex );
  ------------------
  |  |  554|  4.31k|	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex)
  |  |  ------------------
  |  |  |  |  134|  4.31k|#define	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex) ((void) 0)
  |  |  ------------------
  ------------------
  186|  4.31k|	if ( ber_flush2( lc->lconn_sb, lr->lr_ber, LBER_FLUSH_FREE_NEVER ) != 0 ) {
  ------------------
  |  |  476|  4.31k|#define LBER_FLUSH_FREE_NEVER		(0x0)	/* traditional behavior */
  ------------------
  |  Branch (186:7): [True: 0, False: 4.31k]
  ------------------
  187|      0|		if (( sock_errno() == EAGAIN ) || ( sock_errno() == ENOTCONN )) {
  ------------------
  |  |   84|      0|#define sock_errno()	errno
  ------------------
              		if (( sock_errno() == EAGAIN ) || ( sock_errno() == ENOTCONN )) {
  ------------------
  |  |   84|      0|#define sock_errno()	errno
  ------------------
  |  Branch (187:7): [True: 0, False: 0]
  |  Branch (187:37): [True: 0, False: 0]
  ------------------
  188|       |			/* ENOTCONN is returned in Solaris 10 */
  189|       |			/* need to continue write later */
  190|      0|			lr->lr_status = LDAP_REQST_WRITING;
  ------------------
  |  |  389|      0|#define LDAP_REQST_WRITING	4
  ------------------
  191|      0|			ldap_mark_select_write( ld, lc->lconn_sb );
  192|      0|			ld->ld_errno = LDAP_BUSY;
  ------------------
  |  |  658|      0|#define LDAP_BUSY					0x33
  ------------------
  193|      0|			return -2;
  194|      0|		} else {
  195|      0|			ld->ld_errno = LDAP_SERVER_DOWN;
  ------------------
  |  |  736|      0|#define LDAP_SERVER_DOWN				(-1)
  ------------------
  196|      0|			ldap_free_request( ld, lr );
  197|      0|			ldap_free_connection( ld, lc, 0, 0 );
  198|      0|			return( -1 );
  199|      0|		}
  200|  4.31k|	} else {
  201|  4.31k|		if ( lr->lr_parent == NULL ) {
  ------------------
  |  Branch (201:8): [True: 4.31k, False: 0]
  ------------------
  202|  4.31k|			lr->lr_ber->ber_end = lr->lr_ber->ber_ptr;
  203|  4.31k|			lr->lr_ber->ber_ptr = lr->lr_ber->ber_buf;
  204|  4.31k|		}
  205|  4.31k|		lr->lr_status = LDAP_REQST_INPROGRESS;
  ------------------
  |  |  386|  4.31k|#define LDAP_REQST_INPROGRESS	1
  ------------------
  206|       |
  207|       |		/* sent -- waiting for a response */
  208|  4.31k|		ldap_mark_select_read( ld, lc->lconn_sb );
  209|  4.31k|		ldap_clear_select_write( ld, lc->lconn_sb );
  210|  4.31k|	}
  211|  4.31k|	return 0;
  212|  4.31k|}
ldap_send_server_request:
  232|  4.31k|{
  233|  4.31k|	LDAPRequest	*lr;
  234|  4.31k|	int		incparent, rc;
  235|       |
  236|  4.31k|	LDAP_ASSERT_MUTEX_OWNER( &ld->ld_req_mutex );
  ------------------
  |  |  554|  4.31k|	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex)
  |  |  ------------------
  |  |  |  |  134|  4.31k|#define	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex) ((void) 0)
  |  |  ------------------
  ------------------
  237|  4.31k|	Debug0( LDAP_DEBUG_TRACE, "ldap_send_server_request\n" );
  ------------------
  |  |   87|  4.31k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  4.31k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  4.31k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  4.31k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 4.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|  4.31k|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|  4.31k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 4.31k]
  |  |  ------------------
  ------------------
  238|       |
  239|  4.31k|	incparent = 0;
  240|  4.31k|	ld->ld_errno = LDAP_SUCCESS;	/* optimistic */
  ------------------
  |  |  610|  4.31k|#define LDAP_SUCCESS				0x00
  ------------------
  241|       |
  242|  4.31k|	LDAP_CONN_LOCK_IF(m_noconn);
  ------------------
  |  |   60|  4.31k|	{ if (nolock) LDAP_MUTEX_LOCK( &ld->ld_conn_mutex ); }
  |  |  ------------------
  |  |  |  |  551|      0|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  |  |  ------------------
  |  |  |  Branch (60:8): [True: 0, False: 4.31k]
  |  |  ------------------
  ------------------
  243|  4.31k|	if ( lc == NULL ) {
  ------------------
  |  Branch (243:7): [True: 4.31k, False: 0]
  ------------------
  244|  4.31k|		if ( srvlist == NULL ) {
  ------------------
  |  Branch (244:8): [True: 4.31k, False: 0]
  ------------------
  245|  4.31k|			lc = ld->ld_defconn;
  ------------------
  |  |  471|  4.31k|#define	ld_defconn		ldc->ldc_defconn
  ------------------
  246|  4.31k|		} else {
  247|      0|			lc = find_connection( ld, *srvlist, 1 );
  248|      0|			if ( lc == NULL ) {
  ------------------
  |  Branch (248:9): [True: 0, False: 0]
  ------------------
  249|      0|				if ( (bind != NULL) && (parentreq != NULL) ) {
  ------------------
  |  Branch (249:10): [True: 0, False: 0]
  |  Branch (249:28): [True: 0, False: 0]
  ------------------
  250|       |					/* Remember the bind in the parent */
  251|      0|					incparent = 1;
  252|      0|					++parentreq->lr_outrefcnt;
  253|      0|				}
  254|      0|				lc = ldap_new_connection( ld, srvlist, 0,
  255|      0|					1, bind, 1, m_res );
  256|      0|			}
  257|      0|		}
  258|  4.31k|	}
  259|       |
  260|       |	/* async connect... */
  261|  4.31k|	if ( lc != NULL && lc->lconn_status == LDAP_CONNST_CONNECTING ) {
  ------------------
  |  |  369|  4.31k|#define LDAP_CONNST_CONNECTING		2
  ------------------
  |  Branch (261:7): [True: 4.31k, False: 0]
  |  Branch (261:21): [True: 0, False: 4.31k]
  ------------------
  262|      0|		ber_socket_t	sd = AC_SOCKET_ERROR;
  ------------------
  |  |  166|      0|#	define AC_SOCKET_ERROR		(-1)
  ------------------
  263|      0|		struct timeval	tv = { 0 };
  264|       |
  265|      0|		ber_sockbuf_ctrl( lc->lconn_sb, LBER_SB_OPT_GET_FD, &sd );
  ------------------
  |  |  134|      0|#define LBER_SB_OPT_GET_FD		1
  ------------------
  266|       |
  267|       |		/* poll ... */
  268|      0|		switch ( ldap_int_poll( ld, sd, &tv, 1 ) ) {
  269|      0|		case 0:
  ------------------
  |  Branch (269:3): [True: 0, False: 0]
  ------------------
  270|       |			/* go on! */
  271|      0|			lc->lconn_status = LDAP_CONNST_CONNECTED;
  ------------------
  |  |  370|      0|#define LDAP_CONNST_CONNECTED		3
  ------------------
  272|      0|			break;
  273|       |
  274|      0|		case -2:
  ------------------
  |  Branch (274:3): [True: 0, False: 0]
  ------------------
  275|       |			/* async only occurs if a network timeout is set */
  276|       |
  277|       |			/* honor network timeout */
  278|      0|			LDAP_MUTEX_LOCK( &ld->ld_options.ldo_mutex );
  ------------------
  |  |  551|      0|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  279|      0|			if ( time( NULL ) - lc->lconn_created <= ld->ld_options.ldo_tm_net.tv_sec )
  ------------------
  |  |  484|      0|#define ld_options		ldc->ldc_options
  ------------------
  |  Branch (279:9): [True: 0, False: 0]
  ------------------
  280|      0|			{
  281|       |				/* caller will have to call again */
  282|      0|				ld->ld_errno = LDAP_X_CONNECTING;
  ------------------
  |  |  753|      0|#define	LDAP_X_CONNECTING			(-18)
  ------------------
  283|      0|			}
  284|      0|			LDAP_MUTEX_UNLOCK( &ld->ld_options.ldo_mutex );
  ------------------
  |  |  552|      0|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  285|       |			/* fallthru */
  286|       |
  287|      0|		default:
  ------------------
  |  Branch (287:3): [True: 0, False: 0]
  ------------------
  288|       |			/* error */
  289|      0|			break;
  290|      0|		}
  291|      0|	}
  292|       |
  293|  4.31k|	if ( lc == NULL || lc->lconn_status != LDAP_CONNST_CONNECTED ) {
  ------------------
  |  |  370|  4.31k|#define LDAP_CONNST_CONNECTED		3
  ------------------
  |  Branch (293:7): [True: 0, False: 4.31k]
  |  Branch (293:21): [True: 0, False: 4.31k]
  ------------------
  294|      0|		if ( ld->ld_errno == LDAP_SUCCESS ) {
  ------------------
  |  |  610|      0|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (294:8): [True: 0, False: 0]
  ------------------
  295|      0|			ld->ld_errno = LDAP_SERVER_DOWN;
  ------------------
  |  |  736|      0|#define LDAP_SERVER_DOWN				(-1)
  ------------------
  296|      0|		}
  297|       |
  298|      0|		ber_free( ber, 1 );
  299|      0|		if ( incparent ) {
  ------------------
  |  Branch (299:8): [True: 0, False: 0]
  ------------------
  300|       |			/* Forget about the bind */
  301|      0|			--parentreq->lr_outrefcnt; 
  302|      0|		}
  303|      0|		LDAP_CONN_UNLOCK_IF(m_noconn);
  ------------------
  |  |   62|      0|	{ if (nolock) LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex ); }
  |  |  ------------------
  |  |  |  |  552|      0|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  |  |  ------------------
  |  |  |  Branch (62:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  304|      0|		return( -1 );
  305|      0|	}
  306|       |
  307|  4.31k|	use_connection( ld, lc );
  308|       |
  309|       |#ifdef LDAP_CONNECTIONLESS
  310|       |	if ( LDAP_IS_UDP( ld )) {
  311|       |		BerElement tmpber = *ber;
  312|       |		ber_rewind( &tmpber );
  313|       |		LDAP_MUTEX_LOCK( &ld->ld_options.ldo_mutex );
  314|       |		rc = ber_write( &tmpber, ld->ld_options.ldo_peer,
  315|       |			sizeof( struct sockaddr_storage ), 0 );
  316|       |		LDAP_MUTEX_UNLOCK( &ld->ld_options.ldo_mutex );
  317|       |		if ( rc == -1 ) {
  318|       |			ld->ld_errno = LDAP_ENCODING_ERROR;
  319|       |			ber_free( ber, 1 );
  320|       |			LDAP_CONN_UNLOCK_IF(m_noconn);
  321|       |			return rc;
  322|       |		}
  323|       |	}
  324|       |#endif
  325|       |
  326|       |	/* If we still have an incomplete write, try to finish it before
  327|       |	 * dealing with the new request. If we don't finish here, return
  328|       |	 * LDAP_BUSY and let the caller retry later. We only allow a single
  329|       |	 * request to be in WRITING state.
  330|       |	 */
  331|  4.31k|	rc = 0;
  332|  4.31k|	if ( ld->ld_requests != NULL ) {
  ------------------
  |  |  454|  4.31k|#define	ld_requests		ldc->ldc_requests
  ------------------
  |  Branch (332:7): [True: 7, False: 4.31k]
  ------------------
  333|      7|		TAvlnode *node = ldap_tavl_end( ld->ld_requests, TAVL_DIR_RIGHT );
  ------------------
  |  |  454|      7|#define	ld_requests		ldc->ldc_requests
  ------------------
              		TAvlnode *node = ldap_tavl_end( ld->ld_requests, TAVL_DIR_RIGHT );
  ------------------
  |  |  148|      7|#define	TAVL_DIR_RIGHT	1
  ------------------
  334|      7|		LDAPRequest *lr;
  335|       |
  336|      7|		assert( node != NULL );
  ------------------
  |  Branch (336:3): [True: 0, False: 7]
  |  Branch (336:3): [True: 7, False: 0]
  ------------------
  337|      7|		lr = node->avl_data;
  338|      7|		if ( lr->lr_status == LDAP_REQST_WRITING &&
  ------------------
  |  |  389|     14|#define LDAP_REQST_WRITING	4
  ------------------
  |  Branch (338:8): [True: 0, False: 7]
  ------------------
  339|      0|				ldap_int_flush_request( ld, lr ) < 0 ) {
  ------------------
  |  Branch (339:5): [True: 0, False: 0]
  ------------------
  340|      0|			rc = -1;
  341|      0|		}
  342|      7|	}
  343|  4.31k|	if ( rc ) {
  ------------------
  |  Branch (343:7): [True: 0, False: 4.31k]
  ------------------
  344|      0|		ber_free( ber, 1 );
  345|      0|		LDAP_CONN_UNLOCK_IF(m_noconn);
  ------------------
  |  |   62|      0|	{ if (nolock) LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex ); }
  |  |  ------------------
  |  |  |  |  552|      0|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  |  |  ------------------
  |  |  |  Branch (62:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  346|      0|		return rc;
  347|      0|	}
  348|       |
  349|  4.31k|	lr = (LDAPRequest *)LDAP_CALLOC( 1, sizeof( LDAPRequest ) );
  ------------------
  |  |  646|  4.31k|#define LDAP_CALLOC(n,s)	(ber_memcalloc_x((n),(s),NULL))
  ------------------
  350|  4.31k|	if ( lr == NULL ) {
  ------------------
  |  Branch (350:7): [True: 0, False: 4.31k]
  ------------------
  351|      0|		ld->ld_errno = LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  352|      0|		ldap_free_connection( ld, lc, 0, 0 );
  353|      0|		ber_free( ber, 1 );
  354|      0|		if ( incparent ) {
  ------------------
  |  Branch (354:8): [True: 0, False: 0]
  ------------------
  355|       |			/* Forget about the bind */
  356|      0|			--parentreq->lr_outrefcnt; 
  357|      0|		}
  358|      0|		LDAP_CONN_UNLOCK_IF(m_noconn);
  ------------------
  |  |   62|      0|	{ if (nolock) LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex ); }
  |  |  ------------------
  |  |  |  |  552|      0|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  |  |  ------------------
  |  |  |  Branch (62:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  359|      0|		return( -1 );
  360|      0|	} 
  361|  4.31k|	lr->lr_msgid = msgid;
  362|  4.31k|	lr->lr_status = LDAP_REQST_INPROGRESS;
  ------------------
  |  |  386|  4.31k|#define LDAP_REQST_INPROGRESS	1
  ------------------
  363|  4.31k|	lr->lr_res_errno = LDAP_SUCCESS;	/* optimistic */
  ------------------
  |  |  610|  4.31k|#define LDAP_SUCCESS				0x00
  ------------------
  364|  4.31k|	lr->lr_ber = ber;
  365|  4.31k|	lr->lr_conn = lc;
  366|  4.31k|	if ( parentreq != NULL ) {	/* sub-request */
  ------------------
  |  Branch (366:7): [True: 0, False: 4.31k]
  ------------------
  367|      0|		if ( !incparent ) { 
  ------------------
  |  Branch (367:8): [True: 0, False: 0]
  ------------------
  368|       |			/* Increment if we didn't do it before the bind */
  369|      0|			++parentreq->lr_outrefcnt;
  370|      0|		}
  371|      0|		lr->lr_origid = parentreq->lr_origid;
  372|      0|		lr->lr_parentcnt = ++parentreq->lr_parentcnt;
  373|      0|		lr->lr_parent = parentreq;
  374|      0|		lr->lr_refnext = parentreq->lr_child;
  375|      0|		parentreq->lr_child = lr;
  376|  4.31k|	} else {			/* original request */
  377|  4.31k|		lr->lr_origid = lr->lr_msgid;
  378|  4.31k|	}
  379|       |
  380|       |	/* Extract requestDN for future reference */
  381|       |#ifdef LDAP_CONNECTIONLESS
  382|       |	if ( !LDAP_IS_UDP(ld) )
  383|       |#endif
  384|  4.31k|	{
  385|  4.31k|		BerElement tmpber = *ber;
  386|  4.31k|		ber_int_t	bint;
  387|  4.31k|		ber_tag_t	tag, rtag;
  388|       |
  389|  4.31k|		ber_reset( &tmpber, 1 );
  390|  4.31k|		rtag = ber_scanf( &tmpber, "{it", /*}*/ &bint, &tag );
  391|  4.31k|		switch ( tag ) {
  392|  3.07k|		case LDAP_REQ_BIND:
  ------------------
  |  |  520|  3.07k|#define LDAP_REQ_BIND		((ber_tag_t) 0x60U)	/* application + constructed */
  ------------------
  |  Branch (392:3): [True: 3.07k, False: 1.24k]
  ------------------
  393|  3.07k|			rtag = ber_scanf( &tmpber, "{i" /*}*/, &bint );
  394|  3.07k|			break;
  395|      0|		case LDAP_REQ_DELETE:
  ------------------
  |  |  525|      0|#define LDAP_REQ_DELETE		((ber_tag_t) 0x4aU)	/* application + primitive   */
  ------------------
  |  Branch (395:3): [True: 0, False: 4.31k]
  ------------------
  396|      0|			break;
  397|  1.24k|		default:
  ------------------
  |  Branch (397:3): [True: 1.24k, False: 3.07k]
  ------------------
  398|  1.24k|			rtag = ber_scanf( &tmpber, "{" /*}*/ );
  399|  1.24k|		case LDAP_REQ_ABANDON:
  ------------------
  |  |  530|  1.24k|#define LDAP_REQ_ABANDON	((ber_tag_t) 0x50U)	/* application + primitive   */
  ------------------
  |  Branch (399:3): [True: 0, False: 4.31k]
  ------------------
  400|  1.24k|			break;
  401|  4.31k|		}
  402|  4.31k|		if ( tag != LDAP_REQ_ABANDON ) {
  ------------------
  |  |  530|  4.31k|#define LDAP_REQ_ABANDON	((ber_tag_t) 0x50U)	/* application + primitive   */
  ------------------
  |  Branch (402:8): [True: 4.31k, False: 0]
  ------------------
  403|  4.31k|			ber_skip_tag( &tmpber, &lr->lr_dn.bv_len );
  404|  4.31k|			lr->lr_dn.bv_val = tmpber.ber_ptr;
  405|  4.31k|		}
  406|  4.31k|	}
  407|       |
  408|  4.31k|	rc = ldap_tavl_insert( &ld->ld_requests, lr, ldap_req_cmp, ldap_avl_dup_error );
  ------------------
  |  |  454|  4.31k|#define	ld_requests		ldc->ldc_requests
  ------------------
  409|  4.31k|	assert( rc == LDAP_SUCCESS );
  ------------------
  |  Branch (409:2): [True: 0, False: 4.31k]
  |  Branch (409:2): [True: 4.31k, False: 0]
  ------------------
  410|       |
  411|  4.31k|	ld->ld_errno = LDAP_SUCCESS;
  ------------------
  |  |  610|  4.31k|#define LDAP_SUCCESS				0x00
  ------------------
  412|  4.31k|	if ( ldap_int_flush_request( ld, lr ) == -1 ) {
  ------------------
  |  Branch (412:7): [True: 0, False: 4.31k]
  ------------------
  413|      0|		msgid = -1;
  414|      0|	}
  415|       |
  416|  4.31k|	LDAP_CONN_UNLOCK_IF(m_noconn);
  ------------------
  |  |   62|  4.31k|	{ if (nolock) LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex ); }
  |  |  ------------------
  |  |  |  |  552|      0|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  |  |  ------------------
  |  |  |  Branch (62:8): [True: 0, False: 4.31k]
  |  |  ------------------
  ------------------
  417|  4.31k|	return( msgid );
  418|  4.31k|}
ldap_new_connection:
  453|  3.39k|{
  454|  3.39k|	LDAPConn	*lc;
  455|  3.39k|	int		async = 0;
  456|       |
  457|  3.39k|	LDAP_ASSERT_MUTEX_OWNER( &ld->ld_conn_mutex );
  ------------------
  |  |  554|  3.39k|	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex)
  |  |  ------------------
  |  |  |  |  134|  3.39k|#define	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex) ((void) 0)
  |  |  ------------------
  ------------------
  458|  3.39k|	Debug3( LDAP_DEBUG_TRACE, "ldap_new_connection %d %d %d\n",
  ------------------
  |  |  102|  3.39k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  3.39k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  3.39k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  3.39k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 3.39k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  3.39k|	ldap_log_printf( NULL, (level), fmt, arg1, arg2, arg3 ); \
  |  |  104|  3.39k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (104:12): [Folded, False: 3.39k]
  |  |  ------------------
  ------------------
  459|  3.39k|		use_ldsb, connect, (bind != NULL) );
  460|       |	/*
  461|       |	 * make a new LDAP server connection
  462|       |	 * XXX open connection synchronously for now
  463|       |	 */
  464|  3.39k|	lc = (LDAPConn *)LDAP_CALLOC( 1, sizeof( LDAPConn ) );
  ------------------
  |  |  646|  3.39k|#define LDAP_CALLOC(n,s)	(ber_memcalloc_x((n),(s),NULL))
  ------------------
  465|  3.39k|	if ( lc == NULL ) {
  ------------------
  |  Branch (465:7): [True: 0, False: 3.39k]
  ------------------
  466|      0|		ld->ld_errno = LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  467|      0|		return( NULL );
  468|      0|	}
  469|       |	
  470|  3.39k|	if ( use_ldsb ) {
  ------------------
  |  Branch (470:7): [True: 3.39k, False: 0]
  ------------------
  471|  3.39k|		assert( ld->ld_sb != NULL );
  ------------------
  |  Branch (471:3): [True: 0, False: 3.39k]
  |  Branch (471:3): [True: 3.39k, False: 0]
  ------------------
  472|  3.39k|		lc->lconn_sb = ld->ld_sb;
  ------------------
  |  |  440|  3.39k|#define ld_sb			ldc->ldc_sb
  ------------------
  473|       |
  474|  3.39k|	} else {
  475|      0|		lc->lconn_sb = ber_sockbuf_alloc();
  476|      0|		if ( lc->lconn_sb == NULL ) {
  ------------------
  |  Branch (476:8): [True: 0, False: 0]
  ------------------
  477|      0|			LDAP_FREE( (char *)lc );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  478|      0|			ld->ld_errno = LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  479|      0|			return( NULL );
  480|      0|		}
  481|      0|	}
  482|       |
  483|  3.39k|	if ( connect ) {
  ------------------
  |  Branch (483:7): [True: 0, False: 3.39k]
  ------------------
  484|      0|		LDAPURLDesc	**srvp, *srv = NULL;
  485|       |
  486|      0|		async = LDAP_BOOL_GET( &ld->ld_options, LDAP_BOOL_CONNECT_ASYNC );
  ------------------
  |  |  157|      0|	((lo)->ldo_booleans & LDAP_BOOL(bool) ? -1 : 0)
  |  |  ------------------
  |  |  |  |  155|      0|#define LDAP_BOOL(n)	((LDAP_BOOLEANS)1 << (n))
  |  |  ------------------
  |  |  |  Branch (157:3): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  487|       |
  488|      0|		for ( srvp = srvlist; *srvp != NULL; srvp = &(*srvp)->lud_next ) {
  ------------------
  |  Branch (488:25): [True: 0, False: 0]
  ------------------
  489|      0|			int		rc;
  490|       |
  491|      0|			rc = ldap_int_open_connection( ld, lc, *srvp, async );
  492|      0|			if ( rc != -1 ) {
  ------------------
  |  Branch (492:9): [True: 0, False: 0]
  ------------------
  493|      0|				srv = *srvp;
  494|       |
  495|       |				/* If we fully connected, async is moot */
  496|      0|				if ( rc == 0 )
  ------------------
  |  Branch (496:10): [True: 0, False: 0]
  ------------------
  497|      0|					async = 0;
  498|       |
  499|      0|				if ( ld->ld_urllist_proc && ( !async || rc != -2 ) ) {
  ------------------
  |  |  506|      0|#define ld_urllist_proc		ld_options.ldo_urllist_proc
  |  |  ------------------
  |  |  |  |  484|      0|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
  |  Branch (499:10): [True: 0, False: 0]
  |  Branch (499:35): [True: 0, False: 0]
  |  Branch (499:45): [True: 0, False: 0]
  ------------------
  500|      0|					ld->ld_urllist_proc( ld, srvlist, srvp, ld->ld_urllist_params );
  ------------------
  |  |  506|      0|#define ld_urllist_proc		ld_options.ldo_urllist_proc
  |  |  ------------------
  |  |  |  |  484|      0|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
              					ld->ld_urllist_proc( ld, srvlist, srvp, ld->ld_urllist_params );
  ------------------
  |  |  507|      0|#define ld_urllist_params	ld_options.ldo_urllist_params
  |  |  ------------------
  |  |  |  |  484|      0|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
  501|      0|				}
  502|       |
  503|      0|				break;
  504|      0|			}
  505|      0|		}
  506|       |
  507|      0|		if ( srv == NULL ) {
  ------------------
  |  Branch (507:8): [True: 0, False: 0]
  ------------------
  508|      0|			if ( !use_ldsb ) {
  ------------------
  |  Branch (508:9): [True: 0, False: 0]
  ------------------
  509|      0|				ber_sockbuf_free( lc->lconn_sb );
  510|      0|			}
  511|      0|			LDAP_FREE( (char *)lc );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  512|      0|			ld->ld_errno = LDAP_SERVER_DOWN;
  ------------------
  |  |  736|      0|#define LDAP_SERVER_DOWN				(-1)
  ------------------
  513|      0|			return( NULL );
  514|      0|		}
  515|       |
  516|      0|		lc->lconn_server = ldap_url_dup( srv );
  517|      0|		if ( !lc->lconn_server ) {
  ------------------
  |  Branch (517:8): [True: 0, False: 0]
  ------------------
  518|      0|			if ( !use_ldsb )
  ------------------
  |  Branch (518:9): [True: 0, False: 0]
  ------------------
  519|      0|				ber_sockbuf_free( lc->lconn_sb );
  520|      0|			LDAP_FREE( (char *)lc );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  521|      0|			ld->ld_errno = LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  522|      0|			return( NULL );
  523|      0|		}
  524|      0|	}
  525|       |
  526|  3.39k|	lc->lconn_status = async ? LDAP_CONNST_CONNECTING : LDAP_CONNST_CONNECTED;
  ------------------
  |  |  369|      0|#define LDAP_CONNST_CONNECTING		2
  ------------------
              	lc->lconn_status = async ? LDAP_CONNST_CONNECTING : LDAP_CONNST_CONNECTED;
  ------------------
  |  |  370|  6.78k|#define LDAP_CONNST_CONNECTED		3
  ------------------
  |  Branch (526:21): [True: 0, False: 3.39k]
  ------------------
  527|  3.39k|	lc->lconn_next = ld->ld_conns;
  ------------------
  |  |  473|  3.39k|#define	ld_conns		ldc->ldc_conns
  ------------------
  528|  3.39k|	ld->ld_conns = lc;
  ------------------
  |  |  473|  3.39k|#define	ld_conns		ldc->ldc_conns
  ------------------
  529|       |
  530|  3.39k|	if ( connect ) {
  ------------------
  |  Branch (530:7): [True: 0, False: 3.39k]
  ------------------
  531|       |#ifdef HAVE_TLS
  532|       |		if ( lc->lconn_server->lud_exts ) {
  533|       |			int rc, ext = find_tls_ext( lc->lconn_server );
  534|       |			if ( ext ) {
  535|       |				LDAPConn	*savedefconn;
  536|       |
  537|       |				savedefconn = ld->ld_defconn;
  538|       |				++lc->lconn_refcnt;	/* avoid premature free */
  539|       |				ld->ld_defconn = lc;
  540|       |
  541|       |				LDAP_REQ_UNLOCK_IF(m_req);
  542|       |				LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex );
  543|       |				LDAP_RES_UNLOCK_IF(m_res);
  544|       |				rc = ldap_start_tls_s( ld, NULL, NULL );
  545|       |				LDAP_RES_LOCK_IF(m_res);
  546|       |				LDAP_MUTEX_LOCK( &ld->ld_conn_mutex );
  547|       |				LDAP_REQ_LOCK_IF(m_req);
  548|       |				ld->ld_defconn = savedefconn;
  549|       |				--lc->lconn_refcnt;
  550|       |
  551|       |				if ( rc != LDAP_SUCCESS && ext == 2 ) {
  552|       |					ldap_free_connection( ld, lc, 1, 0 );
  553|       |					return NULL;
  554|       |				}
  555|       |			}
  556|       |		}
  557|       |#endif
  558|      0|	}
  559|       |
  560|  3.39k|	if ( bind != NULL ) {
  ------------------
  |  Branch (560:7): [True: 0, False: 3.39k]
  ------------------
  561|      0|		int		err = 0;
  562|      0|		LDAPConn	*savedefconn;
  563|       |
  564|       |		/* Set flag to prevent additional referrals
  565|       |		 * from being processed on this
  566|       |		 * connection until the bind has completed
  567|       |		 */
  568|      0|		lc->lconn_rebind_inprogress = 1;
  569|       |		/* V3 rebind function */
  570|      0|		if ( ld->ld_rebind_proc != NULL) {
  ------------------
  |  |  502|      0|#define ld_rebind_proc		ld_options.ldo_rebind_proc
  |  |  ------------------
  |  |  |  |  484|      0|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
  |  Branch (570:8): [True: 0, False: 0]
  ------------------
  571|      0|			LDAPURLDesc	*srvfunc;
  572|       |
  573|      0|			srvfunc = ldap_url_dup( *srvlist );
  574|      0|			if ( srvfunc == NULL ) {
  ------------------
  |  Branch (574:9): [True: 0, False: 0]
  ------------------
  575|      0|				ld->ld_errno = LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  576|      0|				err = -1;
  577|      0|			} else {
  578|      0|				savedefconn = ld->ld_defconn;
  ------------------
  |  |  471|      0|#define	ld_defconn		ldc->ldc_defconn
  ------------------
  579|      0|				++lc->lconn_refcnt;	/* avoid premature free */
  580|      0|				ld->ld_defconn = lc;
  ------------------
  |  |  471|      0|#define	ld_defconn		ldc->ldc_defconn
  ------------------
  581|       |
  582|      0|				Debug0( LDAP_DEBUG_TRACE, "Call application rebind_proc\n" );
  ------------------
  |  |   87|      0|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      0|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|      0|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|      0|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  583|      0|				LDAP_REQ_UNLOCK_IF(m_req);
  ------------------
  |  |   66|      0|	{ if (nolock) LDAP_MUTEX_UNLOCK( &ld->ld_req_mutex ); }
  |  |  ------------------
  |  |  |  |  552|      0|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  |  |  ------------------
  |  |  |  Branch (66:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  584|      0|				LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex );
  ------------------
  |  |  552|      0|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  585|      0|				LDAP_RES_UNLOCK_IF(m_res);
  ------------------
  |  |   70|      0|	{ if (nolock) LDAP_MUTEX_UNLOCK( &ld->ld_res_mutex ); }
  |  |  ------------------
  |  |  |  |  552|      0|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  |  |  ------------------
  |  |  |  Branch (70:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  586|      0|				err = (*ld->ld_rebind_proc)( ld,
  ------------------
  |  |  502|      0|#define ld_rebind_proc		ld_options.ldo_rebind_proc
  |  |  ------------------
  |  |  |  |  484|      0|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
  587|      0|					bind->ri_url, bind->ri_request, bind->ri_msgid,
  588|      0|					ld->ld_rebind_params );
  ------------------
  |  |  503|      0|#define ld_rebind_params	ld_options.ldo_rebind_params
  |  |  ------------------
  |  |  |  |  484|      0|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
  589|      0|				LDAP_RES_LOCK_IF(m_res);
  ------------------
  |  |   68|      0|	{ if (nolock) LDAP_MUTEX_LOCK( &ld->ld_res_mutex ); }
  |  |  ------------------
  |  |  |  |  551|      0|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  |  |  ------------------
  |  |  |  Branch (68:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  590|      0|				LDAP_MUTEX_LOCK( &ld->ld_conn_mutex );
  ------------------
  |  |  551|      0|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  591|      0|				LDAP_REQ_LOCK_IF(m_req);
  ------------------
  |  |   64|      0|	{ if (nolock) LDAP_MUTEX_LOCK( &ld->ld_req_mutex ); }
  |  |  ------------------
  |  |  |  |  551|      0|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  |  |  ------------------
  |  |  |  Branch (64:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  592|       |
  593|      0|				ld->ld_defconn = savedefconn;
  ------------------
  |  |  471|      0|#define	ld_defconn		ldc->ldc_defconn
  ------------------
  594|      0|				--lc->lconn_refcnt;
  595|       |
  596|      0|				if ( err != 0 ) {
  ------------------
  |  Branch (596:10): [True: 0, False: 0]
  ------------------
  597|      0|					err = -1;
  598|      0|					ldap_free_connection( ld, lc, 1, 0 );
  599|      0|					lc = NULL;
  600|      0|				}
  601|      0|				ldap_free_urldesc( srvfunc );
  602|      0|			}
  603|       |
  604|      0|		} else {
  605|      0|			int		msgid, rc;
  606|      0|			struct berval	passwd = BER_BVNULL;
  ------------------
  |  |  206|      0|#define BER_BVNULL		{ 0L, NULL }
  ------------------
  607|       |
  608|      0|			savedefconn = ld->ld_defconn;
  ------------------
  |  |  471|      0|#define	ld_defconn		ldc->ldc_defconn
  ------------------
  609|      0|			++lc->lconn_refcnt;	/* avoid premature free */
  610|      0|			ld->ld_defconn = lc;
  ------------------
  |  |  471|      0|#define	ld_defconn		ldc->ldc_defconn
  ------------------
  611|       |
  612|      0|			Debug0( LDAP_DEBUG_TRACE,
  ------------------
  |  |   87|      0|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      0|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|      0|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|      0|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  613|      0|				"anonymous rebind via ldap_sasl_bind(\"\")\n" );
  614|       |
  615|      0|			LDAP_REQ_UNLOCK_IF(m_req);
  ------------------
  |  |   66|      0|	{ if (nolock) LDAP_MUTEX_UNLOCK( &ld->ld_req_mutex ); }
  |  |  ------------------
  |  |  |  |  552|      0|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  |  |  ------------------
  |  |  |  Branch (66:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  616|      0|			LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex );
  ------------------
  |  |  552|      0|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  617|      0|			LDAP_RES_UNLOCK_IF(m_res);
  ------------------
  |  |   70|      0|	{ if (nolock) LDAP_MUTEX_UNLOCK( &ld->ld_res_mutex ); }
  |  |  ------------------
  |  |  |  |  552|      0|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  |  |  ------------------
  |  |  |  Branch (70:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  618|      0|			rc = ldap_sasl_bind( ld, "", LDAP_SASL_SIMPLE, &passwd,
  ------------------
  |  |  553|      0|#define LDAP_SASL_SIMPLE	((char*)0)
  ------------------
  619|      0|				NULL, NULL, &msgid );
  620|      0|			if ( rc != LDAP_SUCCESS ) {
  ------------------
  |  |  610|      0|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (620:9): [True: 0, False: 0]
  ------------------
  621|      0|				err = -1;
  622|       |
  623|      0|			} else {
  624|      0|				for ( err = 1; err > 0; ) {
  ------------------
  |  Branch (624:20): [True: 0, False: 0]
  ------------------
  625|      0|					struct timeval	tv = { 0, 100000 };
  626|      0|					LDAPMessage	*res = NULL;
  627|       |
  628|      0|					switch ( ldap_result( ld, msgid, LDAP_MSG_ALL, &tv, &res ) ) {
  ------------------
  |  |  804|      0|#define LDAP_MSG_ALL			0x01
  ------------------
  629|      0|					case -1:
  ------------------
  |  Branch (629:6): [True: 0, False: 0]
  ------------------
  630|      0|						err = -1;
  631|      0|						break;
  632|       |
  633|      0|					case 0:
  ------------------
  |  Branch (633:6): [True: 0, False: 0]
  ------------------
  634|      0|#ifdef LDAP_R_COMPILE
  635|      0|						ldap_pvt_thread_yield();
  636|      0|#endif
  637|      0|						break;
  638|       |
  639|      0|					case LDAP_RES_BIND:
  ------------------
  |  |  534|      0|#define LDAP_RES_BIND		((ber_tag_t) 0x61U)	/* application + constructed */
  ------------------
  |  Branch (639:6): [True: 0, False: 0]
  ------------------
  640|      0|						rc = ldap_parse_result( ld, res, &err, NULL, NULL, NULL, NULL, 1 );
  641|      0|						if ( rc != LDAP_SUCCESS ) {
  ------------------
  |  |  610|      0|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (641:12): [True: 0, False: 0]
  ------------------
  642|      0|							err = -1;
  643|       |
  644|      0|						} else if ( err != LDAP_SUCCESS ) {
  ------------------
  |  |  610|      0|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (644:19): [True: 0, False: 0]
  ------------------
  645|      0|							err = -1;
  646|      0|						}
  647|       |						/* else err == LDAP_SUCCESS == 0 */
  648|      0|						break;
  649|       |
  650|      0|					default:
  ------------------
  |  Branch (650:6): [True: 0, False: 0]
  ------------------
  651|      0|						Debug3( LDAP_DEBUG_TRACE,
  ------------------
  |  |  102|      0|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      0|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|      0|	ldap_log_printf( NULL, (level), fmt, arg1, arg2, arg3 ); \
  |  |  104|      0|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (104:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  652|      0|							"ldap_new_connection %p: "
  653|      0|							"unexpected response %d "
  654|      0|							"from BIND request id=%d\n",
  655|      0|							(void *) ld, ldap_msgtype( res ), msgid );
  656|      0|						err = -1;
  657|      0|						break;
  658|      0|					}
  659|      0|				}
  660|      0|			}
  661|      0|			LDAP_RES_LOCK_IF(m_res);
  ------------------
  |  |   68|      0|	{ if (nolock) LDAP_MUTEX_LOCK( &ld->ld_res_mutex ); }
  |  |  ------------------
  |  |  |  |  551|      0|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  |  |  ------------------
  |  |  |  Branch (68:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  662|      0|			LDAP_MUTEX_LOCK( &ld->ld_conn_mutex );
  ------------------
  |  |  551|      0|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  663|      0|			LDAP_REQ_LOCK_IF(m_req);
  ------------------
  |  |   64|      0|	{ if (nolock) LDAP_MUTEX_LOCK( &ld->ld_req_mutex ); }
  |  |  ------------------
  |  |  |  |  551|      0|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  |  |  ------------------
  |  |  |  Branch (64:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  664|      0|			ld->ld_defconn = savedefconn;
  ------------------
  |  |  471|      0|#define	ld_defconn		ldc->ldc_defconn
  ------------------
  665|      0|			--lc->lconn_refcnt;
  666|       |
  667|      0|			if ( err != 0 ) {
  ------------------
  |  Branch (667:9): [True: 0, False: 0]
  ------------------
  668|      0|				ldap_free_connection( ld, lc, 1, 0 );
  669|      0|				lc = NULL;
  670|      0|			}
  671|      0|		}
  672|      0|		if ( lc != NULL )
  ------------------
  |  Branch (672:8): [True: 0, False: 0]
  ------------------
  673|      0|			lc->lconn_rebind_inprogress = 0;
  674|      0|	}
  675|  3.39k|	return( lc );
  676|  3.39k|}
ldap_free_connection:
  734|  3.64k|{
  735|  3.64k|	LDAPConn	*tmplc, *prevlc;
  736|       |
  737|  3.64k|	LDAP_ASSERT_MUTEX_OWNER( &ld->ld_conn_mutex );
  ------------------
  |  |  554|  3.64k|	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex)
  |  |  ------------------
  |  |  |  |  134|  3.64k|#define	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex) ((void) 0)
  |  |  ------------------
  ------------------
  738|  3.64k|	Debug2( LDAP_DEBUG_TRACE,
  ------------------
  |  |   97|  3.64k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  3.64k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  3.64k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  3.64k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 3.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|  3.64k|	ldap_log_printf( NULL, (level), fmt, arg1, arg2 ); \
  |  |   99|  3.64k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (99:12): [Folded, False: 3.64k]
  |  |  ------------------
  ------------------
  739|  3.64k|		"ldap_free_connection %d %d\n",
  740|  3.64k|		force, unbind );
  741|       |
  742|  3.64k|	if ( force || --lc->lconn_refcnt <= 0 ) {
  ------------------
  |  Branch (742:7): [True: 2.89k, False: 750]
  |  Branch (742:16): [True: 494, False: 256]
  ------------------
  743|       |		/* remove from connections list first */
  744|       |
  745|  3.39k|		for ( prevlc = NULL, tmplc = ld->ld_conns;
  ------------------
  |  |  473|  3.39k|#define	ld_conns		ldc->ldc_conns
  ------------------
  746|  3.39k|			tmplc != NULL;
  ------------------
  |  Branch (746:4): [True: 3.39k, False: 0]
  ------------------
  747|  3.39k|			tmplc = tmplc->lconn_next )
  748|  3.39k|		{
  749|  3.39k|			if ( tmplc == lc ) {
  ------------------
  |  Branch (749:9): [True: 3.39k, False: 0]
  ------------------
  750|  3.39k|				if ( prevlc == NULL ) {
  ------------------
  |  Branch (750:10): [True: 3.39k, False: 0]
  ------------------
  751|  3.39k|				    ld->ld_conns = tmplc->lconn_next;
  ------------------
  |  |  473|  3.39k|#define	ld_conns		ldc->ldc_conns
  ------------------
  752|  3.39k|				} else {
  753|      0|				    prevlc->lconn_next = tmplc->lconn_next;
  754|      0|				}
  755|  3.39k|				if ( ld->ld_defconn == lc ) {
  ------------------
  |  |  471|  3.39k|#define	ld_defconn		ldc->ldc_defconn
  ------------------
  |  Branch (755:10): [True: 3.39k, False: 0]
  ------------------
  756|  3.39k|					ld->ld_defconn = NULL;
  ------------------
  |  |  471|  3.39k|#define	ld_defconn		ldc->ldc_defconn
  ------------------
  757|  3.39k|				}
  758|  3.39k|				break;
  759|  3.39k|			}
  760|      0|			prevlc = tmplc;
  761|      0|		}
  762|       |
  763|       |		/* process connection callbacks */
  764|  3.39k|		{
  765|  3.39k|			struct ldapoptions *lo;
  766|  3.39k|			ldaplist *ll;
  767|  3.39k|			ldap_conncb *cb;
  768|       |
  769|  3.39k|			lo = &ld->ld_options;
  ------------------
  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  ------------------
  770|  3.39k|			LDAP_MUTEX_LOCK( &lo->ldo_mutex );
  ------------------
  |  |  551|  3.39k|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  771|  3.39k|			if ( lo->ldo_conn_cbs ) {
  ------------------
  |  Branch (771:9): [True: 0, False: 3.39k]
  ------------------
  772|      0|				for ( ll=lo->ldo_conn_cbs; ll; ll=ll->ll_next ) {
  ------------------
  |  Branch (772:32): [True: 0, False: 0]
  ------------------
  773|      0|					cb = ll->ll_data;
  774|      0|					cb->lc_del( ld, lc->lconn_sb, cb );
  775|      0|				}
  776|      0|			}
  777|  3.39k|			LDAP_MUTEX_UNLOCK( &lo->ldo_mutex );
  ------------------
  |  |  552|  3.39k|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  778|  3.39k|			lo = LDAP_INT_GLOBAL_OPT();
  ------------------
  |  |   70|  3.39k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  ------------------
  779|  3.39k|			LDAP_MUTEX_LOCK( &lo->ldo_mutex );
  ------------------
  |  |  551|  3.39k|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  780|  3.39k|			if ( lo->ldo_conn_cbs ) {
  ------------------
  |  Branch (780:9): [True: 0, False: 3.39k]
  ------------------
  781|      0|				for ( ll=lo->ldo_conn_cbs; ll; ll=ll->ll_next ) {
  ------------------
  |  Branch (781:32): [True: 0, False: 0]
  ------------------
  782|      0|					cb = ll->ll_data;
  783|      0|					cb->lc_del( ld, lc->lconn_sb, cb );
  784|      0|				}
  785|      0|			}
  786|  3.39k|			LDAP_MUTEX_UNLOCK( &lo->ldo_mutex );
  ------------------
  |  |  552|  3.39k|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  787|  3.39k|		}
  788|       |
  789|  3.39k|		if ( lc->lconn_status == LDAP_CONNST_CONNECTED ) {
  ------------------
  |  |  370|  3.39k|#define LDAP_CONNST_CONNECTED		3
  ------------------
  |  Branch (789:8): [True: 1.93k, False: 1.45k]
  ------------------
  790|  1.93k|			ldap_mark_select_clear( ld, lc->lconn_sb );
  791|  1.93k|			if ( unbind ) {
  ------------------
  |  Branch (791:9): [True: 1.93k, False: 0]
  ------------------
  792|  1.93k|				ldap_send_unbind( ld, lc->lconn_sb,
  793|  1.93k|						NULL, NULL );
  794|  1.93k|			}
  795|  1.93k|		}
  796|       |
  797|  3.39k|		if ( lc->lconn_ber != NULL ) {
  ------------------
  |  Branch (797:8): [True: 1.81k, False: 1.57k]
  ------------------
  798|  1.81k|			ber_free( lc->lconn_ber, 1 );
  799|  1.81k|		}
  800|       |
  801|  3.39k|		ldap_int_sasl_close( ld, lc );
  802|       |
  803|  3.39k|		ldap_free_urllist( lc->lconn_server );
  804|       |
  805|       |		/* FIXME: is this at all possible?
  806|       |		 * ldap_ld_free() in unbind.c calls ldap_free_connection()
  807|       |		 * with force == 1 __after__ explicitly calling
  808|       |		 * ldap_tavl_free on ld->ld_requests */
  809|  3.39k|		if ( force ) {
  ------------------
  |  Branch (809:8): [True: 2.89k, False: 494]
  ------------------
  810|  2.89k|			ldap_tavl_free( ld->ld_requests, ldap_do_free_request );
  ------------------
  |  |  454|  2.89k|#define	ld_requests		ldc->ldc_requests
  ------------------
  811|  2.89k|			ld->ld_requests = NULL;
  ------------------
  |  |  454|  2.89k|#define	ld_requests		ldc->ldc_requests
  ------------------
  812|  2.89k|		}
  813|       |
  814|  3.39k|		if ( lc->lconn_sb != ld->ld_sb ) {
  ------------------
  |  |  440|  3.39k|#define ld_sb			ldc->ldc_sb
  ------------------
  |  Branch (814:8): [True: 0, False: 3.39k]
  ------------------
  815|      0|			ber_sockbuf_free( lc->lconn_sb );
  816|  3.39k|		} else {
  817|  3.39k|			ber_int_sb_close( lc->lconn_sb );
  818|  3.39k|		}
  819|       |
  820|  3.39k|		if ( lc->lconn_rebind_queue != NULL) {
  ------------------
  |  Branch (820:8): [True: 0, False: 3.39k]
  ------------------
  821|      0|			int i;
  822|      0|			for( i = 0; lc->lconn_rebind_queue[i] != NULL; i++ ) {
  ------------------
  |  Branch (822:16): [True: 0, False: 0]
  ------------------
  823|      0|				LDAP_VFREE( lc->lconn_rebind_queue[i] );
  ------------------
  |  |  649|      0|#define LDAP_VFREE(v)		(ber_memvfree_x((void **)(v),NULL))
  ------------------
  824|      0|			}
  825|      0|			LDAP_FREE( lc->lconn_rebind_queue );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  826|      0|		}
  827|       |
  828|  3.39k|		LDAP_FREE( lc );
  ------------------
  |  |  648|  3.39k|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  829|       |
  830|  3.39k|		Debug0( LDAP_DEBUG_TRACE,
  ------------------
  |  |   87|  3.39k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  3.39k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  3.39k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  3.39k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 3.39k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|  3.39k|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|  3.39k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 3.39k]
  |  |  ------------------
  ------------------
  831|  3.39k|			"ldap_free_connection: actually freed\n" );
  832|       |
  833|  3.39k|	} else {
  834|    256|		lc->lconn_lastused = time( NULL );
  835|       |		Debug1( LDAP_DEBUG_TRACE, "ldap_free_connection: refcnt %d\n",
  ------------------
  |  |   92|    256|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|    256|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|    256|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|    256|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 256]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|    256|	ldap_log_printf( NULL, (level), fmt, arg1 ); \
  |  |   94|    256|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 256]
  |  |  ------------------
  ------------------
  836|    256|				lc->lconn_refcnt );
  837|    256|	}
  838|  3.64k|}
ldap_do_free_request:
  959|  4.31k|{
  960|  4.31k|	LDAPRequest *lr = arg;
  961|       |
  962|  4.31k|	Debug3( LDAP_DEBUG_TRACE, "ldap_do_free_request: "
  ------------------
  |  |  102|  4.31k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  4.31k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  4.31k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  4.31k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 4.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  4.31k|	ldap_log_printf( NULL, (level), fmt, arg1, arg2, arg3 ); \
  |  |  104|  4.31k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (104:12): [Folded, False: 4.31k]
  |  |  ------------------
  ------------------
  963|  4.31k|			"asked to free lr %p msgid %d refcnt %d\n",
  964|  4.31k|			(void *) lr, lr->lr_msgid, lr->lr_refcnt );
  965|       |	/* if lr_refcnt > 0, the request has been looked up 
  966|       |	 * by ldap_find_request_by_msgid(); if in the meanwhile
  967|       |	 * the request is free()'d by someone else, just decrease
  968|       |	 * the reference count; later on, it will be freed. */
  969|  4.31k|	if ( lr->lr_refcnt > 0 ) {
  ------------------
  |  Branch (969:7): [True: 6, False: 4.31k]
  ------------------
  970|      6|		assert( lr->lr_refcnt == 1 );
  ------------------
  |  Branch (970:3): [True: 0, False: 6]
  |  Branch (970:3): [True: 6, False: 0]
  ------------------
  971|      6|		lr->lr_refcnt = -lr->lr_refcnt;
  972|      6|		return;
  973|      6|	}
  974|       |
  975|  4.31k|	if ( lr->lr_ber != NULL ) {
  ------------------
  |  Branch (975:7): [True: 4.31k, False: 0]
  ------------------
  976|  4.31k|		ber_free( lr->lr_ber, 1 );
  977|  4.31k|		lr->lr_ber = NULL;
  978|  4.31k|	}
  979|       |
  980|  4.31k|	if ( lr->lr_res_error != NULL ) {
  ------------------
  |  Branch (980:7): [True: 462, False: 3.85k]
  ------------------
  981|    462|		LDAP_FREE( lr->lr_res_error );
  ------------------
  |  |  648|    462|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  982|    462|		lr->lr_res_error = NULL;
  983|    462|	}
  984|       |
  985|  4.31k|	if ( lr->lr_res_matched != NULL ) {
  ------------------
  |  Branch (985:7): [True: 580, False: 3.73k]
  ------------------
  986|    580|		LDAP_FREE( lr->lr_res_matched );
  ------------------
  |  |  648|    580|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  987|    580|		lr->lr_res_matched = NULL;
  988|    580|	}
  989|       |
  990|       |	LDAP_FREE( lr );
  ------------------
  |  |  648|  4.31k|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  991|  4.31k|}
ldap_req_cmp:
  995|  9.67k|{
  996|  9.67k|	const LDAPRequest *left = l, *right = r;
  997|  9.67k|	return left->lr_msgid - right->lr_msgid;
  998|  9.67k|}
ldap_free_request:
 1019|  2.85k|{
 1020|  2.85k|	LDAP_ASSERT_MUTEX_OWNER( &ld->ld_req_mutex );
  ------------------
  |  |  554|  2.85k|	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex)
  |  |  ------------------
  |  |  |  |  134|  2.85k|#define	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex) ((void) 0)
  |  |  ------------------
  ------------------
 1021|  2.85k|	Debug2( LDAP_DEBUG_TRACE, "ldap_free_request (origid %d, msgid %d)\n",
  ------------------
  |  |   97|  2.85k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  2.85k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.85k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  2.85k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 2.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|  2.85k|	ldap_log_printf( NULL, (level), fmt, arg1, arg2 ); \
  |  |   99|  2.85k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (99:12): [Folded, False: 2.85k]
  |  |  ------------------
  ------------------
 1022|  2.85k|		lr->lr_origid, lr->lr_msgid );
 1023|       |
 1024|       |	/* free all referrals (child requests) */
 1025|  2.85k|	while ( lr->lr_child ) {
  ------------------
  |  Branch (1025:10): [True: 0, False: 2.85k]
  ------------------
 1026|      0|		ldap_free_request( ld, lr->lr_child );
 1027|      0|	}
 1028|       |
 1029|  2.85k|	if ( lr->lr_parent != NULL ) {
  ------------------
  |  Branch (1029:7): [True: 0, False: 2.85k]
  ------------------
 1030|      0|		LDAPRequest     **lrp;
 1031|       |
 1032|      0|		--lr->lr_parent->lr_outrefcnt;
 1033|      0|		for ( lrp = &lr->lr_parent->lr_child;
 1034|      0|			*lrp && *lrp != lr;
  ------------------
  |  Branch (1034:4): [True: 0, False: 0]
  |  Branch (1034:12): [True: 0, False: 0]
  ------------------
 1035|      0|			lrp = &(*lrp)->lr_refnext );
 1036|       |
 1037|      0|		if ( *lrp == lr ) {
  ------------------
  |  Branch (1037:8): [True: 0, False: 0]
  ------------------
 1038|      0|			*lrp = lr->lr_refnext;
 1039|      0|		}
 1040|      0|	}
 1041|  2.85k|	ldap_free_request_int( ld, lr );
 1042|  2.85k|}
ldap_find_request_by_msgid:
 1664|  2.74k|{
 1665|  2.74k|	LDAPRequest	*lr, needle = {0};
 1666|  2.74k|	needle.lr_msgid = msgid;
 1667|       |
 1668|  2.74k|	lr = ldap_tavl_find( ld->ld_requests, &needle, ldap_req_cmp );
  ------------------
  |  |  454|  2.74k|#define	ld_requests		ldc->ldc_requests
  ------------------
 1669|  2.74k|	if ( lr != NULL && lr->lr_status != LDAP_REQST_COMPLETED ) {
  ------------------
  |  |  385|  2.59k|#define LDAP_REQST_COMPLETED	0
  ------------------
  |  Branch (1669:7): [True: 2.59k, False: 151]
  |  Branch (1669:21): [True: 2.59k, False: 0]
  ------------------
 1670|       |		/* lr_refcnt is only negative when we removed it from ld_requests
 1671|       |		 * already, it is positive if we have sub-requests (referrals) */
 1672|  2.59k|		assert( lr->lr_refcnt >= 0 );
  ------------------
  |  Branch (1672:3): [True: 0, False: 2.59k]
  |  Branch (1672:3): [True: 2.59k, False: 0]
  ------------------
 1673|  2.59k|		lr->lr_refcnt++;
 1674|  2.59k|		Debug3( LDAP_DEBUG_TRACE, "ldap_find_request_by_msgid: "
  ------------------
  |  |  102|  2.59k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  2.59k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.59k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  2.59k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 2.59k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  2.59k|	ldap_log_printf( NULL, (level), fmt, arg1, arg2, arg3 ); \
  |  |  104|  2.59k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (104:12): [Folded, False: 2.59k]
  |  |  ------------------
  ------------------
 1675|  2.59k|				"msgid %d, lr %p lr->lr_refcnt = %d\n",
 1676|  2.59k|				msgid, (void *) lr, lr->lr_refcnt );
 1677|  2.59k|		return lr;
 1678|  2.59k|	}
 1679|       |
 1680|    151|	Debug2( LDAP_DEBUG_TRACE, "ldap_find_request_by_msgid: "
  ------------------
  |  |   97|    151|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|    151|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|    151|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|    151|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 151]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|    151|	ldap_log_printf( NULL, (level), fmt, arg1, arg2 ); \
  |  |   99|    151|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (99:12): [Folded, False: 151]
  |  |  ------------------
  ------------------
 1681|    151|			"msgid %d, lr %p\n", msgid, (void *) lr );
 1682|       |	return NULL;
 1683|  2.74k|}
ldap_return_request:
 1688|  2.59k|{
 1689|  2.59k|	LDAPRequest	*lr;
 1690|       |
 1691|  2.59k|	lr = ldap_tavl_find( ld->ld_requests, lrx, ldap_req_cmp );
  ------------------
  |  |  454|  2.59k|#define	ld_requests		ldc->ldc_requests
  ------------------
 1692|  2.59k|	Debug2( LDAP_DEBUG_TRACE, "ldap_return_request: "
  ------------------
  |  |   97|  2.59k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  2.59k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.59k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  2.59k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 2.59k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|  2.59k|	ldap_log_printf( NULL, (level), fmt, arg1, arg2 ); \
  |  |   99|  2.59k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (99:12): [Folded, False: 2.59k]
  |  |  ------------------
  ------------------
 1693|  2.59k|			"lrx %p, lr %p\n", (void *) lrx, (void *) lr );
 1694|  2.59k|	if ( lr ) {
  ------------------
  |  Branch (1694:7): [True: 2.59k, False: 0]
  ------------------
 1695|  2.59k|		assert( lr == lrx );
  ------------------
  |  Branch (1695:3): [True: 0, False: 2.59k]
  |  Branch (1695:3): [True: 2.59k, False: 0]
  ------------------
 1696|  2.59k|		if ( lr->lr_refcnt > 0 ) {
  ------------------
  |  Branch (1696:8): [True: 2.59k, False: 0]
  ------------------
 1697|  2.59k|			lr->lr_refcnt--;
 1698|  2.59k|		} else if ( lr->lr_refcnt < 0 ) {
  ------------------
  |  Branch (1698:15): [True: 0, False: 0]
  ------------------
 1699|      0|			lr->lr_refcnt++;
 1700|      0|			if ( lr->lr_refcnt == 0 ) {
  ------------------
  |  Branch (1700:9): [True: 0, False: 0]
  ------------------
 1701|      0|				lr = NULL;
 1702|      0|			}
 1703|      0|		}
 1704|  2.59k|	}
 1705|  2.59k|	Debug3( LDAP_DEBUG_TRACE, "ldap_return_request: "
  ------------------
  |  |  102|  2.59k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  2.59k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.59k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  2.59k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 2.59k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  2.59k|	ldap_log_printf( NULL, (level), fmt, arg1, arg2, arg3 ); \
  |  |  ------------------
  |  |  |  Branch (103:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|  2.59k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (104:12): [Folded, False: 2.59k]
  |  |  ------------------
  ------------------
 1706|  2.59k|			"lrx->lr_msgid %d, lrx->lr_refcnt is now %d, lr is %s present\n",
 1707|  2.59k|			lrx->lr_msgid, lrx->lr_refcnt, lr ? "still" : "not" );
 1708|       |	/* The request is not tracked anymore */
 1709|  2.59k|	if ( lr == NULL ) {
  ------------------
  |  Branch (1709:7): [True: 0, False: 2.59k]
  ------------------
 1710|      0|		ldap_free_request_int( ld, lrx );
 1711|  2.59k|	} else if ( freeit ) {
  ------------------
  |  Branch (1711:14): [True: 2.12k, False: 467]
  ------------------
 1712|  2.12k|		ldap_free_request( ld, lrx );
 1713|  2.12k|	}
 1714|  2.59k|}
request.c:use_connection:
  724|  4.31k|{
  725|  4.31k|	LDAP_ASSERT_MUTEX_OWNER( &ld->ld_conn_mutex );
  ------------------
  |  |  554|  4.31k|	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex)
  |  |  ------------------
  |  |  |  |  134|  4.31k|#define	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex) ((void) 0)
  |  |  ------------------
  ------------------
  726|  4.31k|	++lc->lconn_refcnt;
  727|       |	lc->lconn_lastused = time( NULL );
  728|  4.31k|}
request.c:ldap_free_request_int:
 1003|  2.85k|{
 1004|  2.85k|	LDAPRequest *removed;
 1005|       |
 1006|  2.85k|	LDAP_ASSERT_MUTEX_OWNER( &ld->ld_req_mutex );
  ------------------
  |  |  554|  2.85k|	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex)
  |  |  ------------------
  |  |  |  |  134|  2.85k|#define	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex) ((void) 0)
  |  |  ------------------
  ------------------
 1007|  2.85k|	removed = ldap_tavl_delete( &ld->ld_requests, lr, ldap_req_cmp );
  ------------------
  |  |  454|  2.85k|#define	ld_requests		ldc->ldc_requests
  ------------------
 1008|  2.85k|	assert( !removed || removed == lr );
  ------------------
  |  Branch (1008:2): [True: 2.85k, False: 0]
  |  Branch (1008:2): [True: 0, False: 0]
  |  Branch (1008:2): [True: 0, False: 2.85k]
  |  Branch (1008:2): [True: 2.85k, False: 0]
  ------------------
 1009|  2.85k|	Debug3( LDAP_DEBUG_TRACE, "ldap_free_request_int: "
  ------------------
  |  |  102|  2.85k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  2.85k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.85k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  2.85k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 2.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  2.85k|	ldap_log_printf( NULL, (level), fmt, arg1, arg2, arg3 ); \
  |  |  ------------------
  |  |  |  Branch (103:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|  2.85k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (104:12): [Folded, False: 2.85k]
  |  |  ------------------
  ------------------
 1010|  2.85k|			"lr %p msgid %d%s removed\n",
 1011|  2.85k|			(void *) lr, lr->lr_msgid, removed ? "" : " not" );
 1012|       |
 1013|  2.85k|	ldap_do_free_request( lr );
 1014|  2.85k|}

ldap_result:
  108|  7.79k|{
  109|  7.79k|	int		rc;
  110|       |
  111|  7.79k|	assert( ld != NULL );
  ------------------
  |  Branch (111:2): [True: 0, False: 7.79k]
  |  Branch (111:2): [True: 7.79k, False: 0]
  ------------------
  112|  7.79k|	assert( result != NULL );
  ------------------
  |  Branch (112:2): [True: 0, False: 7.79k]
  |  Branch (112:2): [True: 7.79k, False: 0]
  ------------------
  113|       |
  114|  7.79k|	Debug2( LDAP_DEBUG_TRACE, "ldap_result ld %p msgid %d\n", (void *)ld, msgid );
  ------------------
  |  |   97|  7.79k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  7.79k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  7.79k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  7.79k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 7.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|  7.79k|	ldap_log_printf( NULL, (level), fmt, arg1, arg2 ); \
  |  |   99|  7.79k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (99:12): [Folded, False: 7.79k]
  |  |  ------------------
  ------------------
  115|       |
  116|  7.79k|	if (ld->ld_errno == LDAP_LOCAL_ERROR || ld->ld_errno == LDAP_SERVER_DOWN)
  ------------------
  |  |  737|  15.5k|#define LDAP_LOCAL_ERROR				(-2)
  ------------------
              	if (ld->ld_errno == LDAP_LOCAL_ERROR || ld->ld_errno == LDAP_SERVER_DOWN)
  ------------------
  |  |  736|  7.79k|#define LDAP_SERVER_DOWN				(-1)
  ------------------
  |  Branch (116:6): [True: 1, False: 7.79k]
  |  Branch (116:42): [True: 1, False: 7.79k]
  ------------------
  117|      2|		return -1;
  118|       |
  119|  7.79k|	LDAP_MUTEX_LOCK( &ld->ld_res_mutex );
  ------------------
  |  |  551|  7.79k|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  120|  7.79k|	rc = wait4msg( ld, msgid, all, timeout, result );
  121|  7.79k|	LDAP_MUTEX_UNLOCK( &ld->ld_res_mutex );
  ------------------
  |  |  552|  7.79k|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  122|       |
  123|  7.79k|	return rc;
  124|  7.79k|}
ldap_msgtype:
 1322|    729|{
 1323|    729|	assert( lm != NULL );
  ------------------
  |  Branch (1323:2): [True: 0, False: 729]
  |  Branch (1323:2): [True: 729, False: 0]
  ------------------
 1324|    729|	return ( lm != NULL ) ? (int)lm->lm_msgtype : -1;
  ------------------
  |  Branch (1324:9): [True: 729, False: 0]
  ------------------
 1325|    729|}
ldap_int_msgtype2str:
 1339|     99|{
 1340|     99|	switch( tag ) {
  ------------------
  |  Branch (1340:10): [True: 14, False: 85]
  ------------------
 1341|      1|	case LDAP_RES_ADD: return "add";
  ------------------
  |  |  539|      1|#define LDAP_RES_ADD		((ber_tag_t) 0x69U)	/* application + constructed */
  ------------------
  |  Branch (1341:2): [True: 1, False: 98]
  ------------------
 1342|      5|	case LDAP_RES_BIND: return "bind";
  ------------------
  |  |  534|      5|#define LDAP_RES_BIND		((ber_tag_t) 0x61U)	/* application + constructed */
  ------------------
  |  Branch (1342:2): [True: 5, False: 94]
  ------------------
 1343|      2|	case LDAP_RES_COMPARE: return "compare";
  ------------------
  |  |  544|      2|#define LDAP_RES_COMPARE	((ber_tag_t) 0x6fU)	/* application + constructed */
  ------------------
  |  Branch (1343:2): [True: 2, False: 97]
  ------------------
 1344|      1|	case LDAP_RES_DELETE: return "delete";
  ------------------
  |  |  540|      1|#define LDAP_RES_DELETE		((ber_tag_t) 0x6bU)	/* application + constructed */
  ------------------
  |  Branch (1344:2): [True: 1, False: 98]
  ------------------
 1345|      2|	case LDAP_RES_EXTENDED: return "extended-result";
  ------------------
  |  |  545|      2|#define LDAP_RES_EXTENDED	((ber_tag_t) 0x78U)	/* V3: application + constructed */
  ------------------
  |  Branch (1345:2): [True: 2, False: 97]
  ------------------
 1346|      0|	case LDAP_RES_INTERMEDIATE: return "intermediate";
  ------------------
  |  |  546|      0|#define LDAP_RES_INTERMEDIATE	((ber_tag_t) 0x79U) /* V3+: application + constructed */
  ------------------
  |  Branch (1346:2): [True: 0, False: 99]
  ------------------
 1347|      1|	case LDAP_RES_MODIFY: return "modify";
  ------------------
  |  |  538|      1|#define LDAP_RES_MODIFY		((ber_tag_t) 0x67U)	/* application + constructed */
  ------------------
  |  Branch (1347:2): [True: 1, False: 98]
  ------------------
 1348|      2|	case LDAP_RES_RENAME: return "rename";
  ------------------
  |  |  543|      2|#define LDAP_RES_RENAME		LDAP_RES_MODDN	/* application + constructed */
  |  |  ------------------
  |  |  |  |  541|      2|#define LDAP_RES_MODDN		((ber_tag_t) 0x6dU)	/* application + constructed */
  |  |  ------------------
  ------------------
  |  Branch (1348:2): [True: 2, False: 97]
  ------------------
 1349|      0|	case LDAP_RES_SEARCH_ENTRY: return "search-entry";
  ------------------
  |  |  535|      0|#define LDAP_RES_SEARCH_ENTRY	((ber_tag_t) 0x64U)	/* application + constructed */
  ------------------
  |  Branch (1349:2): [True: 0, False: 99]
  ------------------
 1350|      0|	case LDAP_RES_SEARCH_REFERENCE: return "search-reference";
  ------------------
  |  |  536|      0|#define LDAP_RES_SEARCH_REFERENCE	((ber_tag_t) 0x73U)	/* V3: application + constructed */
  ------------------
  |  Branch (1350:2): [True: 0, False: 99]
  ------------------
 1351|      0|	case LDAP_RES_SEARCH_RESULT: return "search-result";
  ------------------
  |  |  537|      0|#define LDAP_RES_SEARCH_RESULT	((ber_tag_t) 0x65U)	/* application + constructed */
  ------------------
  |  Branch (1351:2): [True: 0, False: 99]
  ------------------
 1352|     99|	}
 1353|     85|	return "unknown";
 1354|     99|}
ldap_msgfree:
 1358|  2.58k|{
 1359|  2.58k|	LDAPMessage	*next;
 1360|  2.58k|	int		type = 0;
 1361|       |
 1362|  2.58k|	Debug0( LDAP_DEBUG_TRACE, "ldap_msgfree\n" );
  ------------------
  |  |   87|  2.58k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  2.58k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.58k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  2.58k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 2.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|  2.58k|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|  2.58k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 2.58k]
  |  |  ------------------
  ------------------
 1363|       |
 1364|  5.16k|	for ( ; lm != NULL; lm = next ) {
  ------------------
  |  Branch (1364:10): [True: 2.58k, False: 2.58k]
  ------------------
 1365|  2.58k|		next = lm->lm_chain;
 1366|  2.58k|		type = lm->lm_msgtype;
 1367|  2.58k|		ber_free( lm->lm_ber, 1 );
 1368|  2.58k|		LDAP_FREE( (char *) lm );
  ------------------
  |  |  648|  2.58k|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1369|  2.58k|	}
 1370|       |
 1371|  2.58k|	return type;
 1372|  2.58k|}
ldap_msgdelete:
 1381|    769|{
 1382|    769|	LDAPMessage	*lm, *prev;
 1383|    769|	int		rc = 0;
 1384|       |
 1385|    769|	assert( ld != NULL );
  ------------------
  |  Branch (1385:2): [True: 0, False: 769]
  |  Branch (1385:2): [True: 769, False: 0]
  ------------------
 1386|       |
 1387|    769|	Debug2( LDAP_DEBUG_TRACE, "ldap_msgdelete ld=%p msgid=%d\n",
  ------------------
  |  |   97|    769|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|    769|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|    769|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|    769|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 769]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|    769|	ldap_log_printf( NULL, (level), fmt, arg1, arg2 ); \
  |  |   99|    769|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (99:12): [Folded, False: 769]
  |  |  ------------------
  ------------------
 1388|    769|		(void *)ld, msgid );
 1389|       |
 1390|    769|	LDAP_MUTEX_LOCK( &ld->ld_res_mutex );
  ------------------
  |  |  551|    769|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
 1391|    769|	prev = NULL;
 1392|    773|	for ( lm = ld->ld_responses; lm != NULL; lm = lm->lm_next ) {
  ------------------
  |  |  455|    769|#define	ld_responses		ldc->ldc_responses
  ------------------
  |  Branch (1392:31): [True: 4, False: 769]
  ------------------
 1393|      4|		if ( lm->lm_msgid == msgid ) {
  ------------------
  |  Branch (1393:8): [True: 0, False: 4]
  ------------------
 1394|      0|			break;
 1395|      0|		}
 1396|      4|		prev = lm;
 1397|      4|	}
 1398|       |
 1399|    769|	if ( lm == NULL ) {
  ------------------
  |  Branch (1399:7): [True: 769, False: 0]
  ------------------
 1400|    769|		rc = -1;
 1401|       |
 1402|    769|	} else {
 1403|      0|		if ( prev == NULL ) {
  ------------------
  |  Branch (1403:8): [True: 0, False: 0]
  ------------------
 1404|      0|			ld->ld_responses = lm->lm_next;
  ------------------
  |  |  455|      0|#define	ld_responses		ldc->ldc_responses
  ------------------
 1405|      0|		} else {
 1406|      0|			prev->lm_next = lm->lm_next;
 1407|      0|		}
 1408|      0|	}
 1409|    769|	LDAP_MUTEX_UNLOCK( &ld->ld_res_mutex );
  ------------------
  |  |  552|    769|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
 1410|    769|	if ( lm ) {
  ------------------
  |  Branch (1410:7): [True: 0, False: 769]
  ------------------
 1411|      0|		switch ( ldap_msgfree( lm ) ) {
 1412|      0|		case LDAP_RES_SEARCH_ENTRY:
  ------------------
  |  |  535|      0|#define LDAP_RES_SEARCH_ENTRY	((ber_tag_t) 0x64U)	/* application + constructed */
  ------------------
  |  Branch (1412:3): [True: 0, False: 0]
  ------------------
 1413|      0|		case LDAP_RES_SEARCH_REFERENCE:
  ------------------
  |  |  536|      0|#define LDAP_RES_SEARCH_REFERENCE	((ber_tag_t) 0x73U)	/* V3: application + constructed */
  ------------------
  |  Branch (1413:3): [True: 0, False: 0]
  ------------------
 1414|      0|		case LDAP_RES_INTERMEDIATE:
  ------------------
  |  |  546|      0|#define LDAP_RES_INTERMEDIATE	((ber_tag_t) 0x79U) /* V3+: application + constructed */
  ------------------
  |  Branch (1414:3): [True: 0, False: 0]
  ------------------
 1415|      0|			rc = -1;
 1416|      0|			break;
 1417|       |
 1418|      0|		default:
  ------------------
  |  Branch (1418:3): [True: 0, False: 0]
  ------------------
 1419|      0|			break;
 1420|      0|		}
 1421|      0|	}
 1422|       |
 1423|    769|	return rc;
 1424|    769|}
result.c:wait4msg:
  268|  7.79k|{
  269|  7.79k|	int		rc;
  270|  7.79k|	struct timeval	tv = { 0 },
  271|  7.79k|			tv0 = { 0 },
  272|  7.79k|			start_time_tv = { 0 },
  273|  7.79k|			*tvp = NULL;
  274|  7.79k|	LDAPConn	*lc;
  275|       |
  276|  7.79k|	assert( ld != NULL );
  ------------------
  |  Branch (276:2): [True: 0, False: 7.79k]
  |  Branch (276:2): [True: 7.79k, False: 0]
  ------------------
  277|  7.79k|	assert( result != NULL );
  ------------------
  |  Branch (277:2): [True: 0, False: 7.79k]
  |  Branch (277:2): [True: 7.79k, False: 0]
  ------------------
  278|       |
  279|  7.79k|	LDAP_ASSERT_MUTEX_OWNER( &ld->ld_res_mutex );
  ------------------
  |  |  554|  7.79k|	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex)
  |  |  ------------------
  |  |  |  |  134|  7.79k|#define	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex) ((void) 0)
  |  |  ------------------
  ------------------
  280|       |
  281|  7.79k|	if ( timeout == NULL && ld->ld_options.ldo_tm_api.tv_sec >= 0 ) {
  ------------------
  |  |  484|      0|#define ld_options		ldc->ldc_options
  ------------------
  |  Branch (281:7): [True: 0, False: 7.79k]
  |  Branch (281:26): [True: 0, False: 0]
  ------------------
  282|      0|		tv = ld->ld_options.ldo_tm_api;
  ------------------
  |  |  484|      0|#define ld_options		ldc->ldc_options
  ------------------
  283|      0|		timeout = &tv;
  284|      0|	}
  285|       |
  286|  7.79k|#ifdef LDAP_DEBUG
  287|  7.79k|	if ( timeout == NULL ) {
  ------------------
  |  Branch (287:7): [True: 0, False: 7.79k]
  ------------------
  288|      0|		Debug2( LDAP_DEBUG_TRACE, "wait4msg ld %p msgid %d (infinite timeout)\n",
  ------------------
  |  |   97|      0|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      0|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|      0|	ldap_log_printf( NULL, (level), fmt, arg1, arg2 ); \
  |  |   99|      0|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (99:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  289|      0|			(void *)ld, msgid );
  290|  7.79k|	} else {
  291|  7.79k|		Debug3( LDAP_DEBUG_TRACE, "wait4msg ld %p msgid %d (timeout %ld usec)\n",
  ------------------
  |  |  102|  7.79k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  7.79k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  7.79k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  7.79k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 7.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  7.79k|	ldap_log_printf( NULL, (level), fmt, arg1, arg2, arg3 ); \
  |  |  104|  7.79k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (104:12): [Folded, False: 7.79k]
  |  |  ------------------
  ------------------
  292|  7.79k|			(void *)ld, msgid, (long)timeout->tv_sec * 1000000 + timeout->tv_usec );
  293|  7.79k|	}
  294|  7.79k|#endif /* LDAP_DEBUG */
  295|       |
  296|  7.79k|	if ( timeout != NULL && timeout->tv_sec != -1 ) {
  ------------------
  |  Branch (296:7): [True: 7.79k, False: 0]
  |  Branch (296:26): [True: 7.79k, False: 0]
  ------------------
  297|  7.79k|		tv0 = *timeout;
  298|  7.79k|		tv = *timeout;
  299|  7.79k|		tvp = &tv;
  300|  7.79k|#ifdef HAVE_GETTIMEOFDAY
  301|  7.79k|		gettimeofday( &start_time_tv, NULL );
  302|       |#else /* ! HAVE_GETTIMEOFDAY */
  303|       |		start_time_tv.tv_sec = time( NULL );
  304|       |		start_time_tv.tv_usec = 0;
  305|       |#endif /* ! HAVE_GETTIMEOFDAY */
  306|  7.79k|	}
  307|       |		    
  308|  7.79k|	rc = LDAP_MSG_X_KEEP_LOOKING;
  ------------------
  |  |   79|  7.79k|#define LDAP_MSG_X_KEEP_LOOKING		(-2)
  ------------------
  309|  12.0k|	while ( rc == LDAP_MSG_X_KEEP_LOOKING ) {
  ------------------
  |  |   79|  12.0k|#define LDAP_MSG_X_KEEP_LOOKING		(-2)
  ------------------
  |  Branch (309:10): [True: 7.79k, False: 4.23k]
  ------------------
  310|  7.79k|#ifdef LDAP_DEBUG
  311|  7.79k|		if ( ldap_debug & LDAP_DEBUG_TRACE ) {
  ------------------
  |  |   75|  7.79k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  ------------------
  |  |  |  |   70|  7.79k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  ------------------
  ------------------
              		if ( ldap_debug & LDAP_DEBUG_TRACE ) {
  ------------------
  |  |  107|  7.79k|#define LDAP_DEBUG_TRACE	0x0001
  ------------------
  |  Branch (311:8): [True: 0, False: 7.79k]
  ------------------
  312|      0|			Debug3( LDAP_DEBUG_TRACE, "wait4msg continue ld %p msgid %d all %d\n",
  ------------------
  |  |  102|      0|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      0|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|      0|	ldap_log_printf( NULL, (level), fmt, arg1, arg2, arg3 ); \
  |  |  104|      0|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (104:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  313|      0|				(void *)ld, msgid, all );
  314|      0|			ldap_dump_connection( ld, ld->ld_conns, 1 );
  ------------------
  |  |  473|      0|#define	ld_conns		ldc->ldc_conns
  ------------------
  315|      0|			LDAP_MUTEX_LOCK( &ld->ld_req_mutex );
  ------------------
  |  |  551|      0|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  316|      0|			ldap_dump_requests_and_responses( ld );
  317|      0|			LDAP_MUTEX_UNLOCK( &ld->ld_req_mutex );
  ------------------
  |  |  552|      0|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  318|      0|		}
  319|  7.79k|#endif /* LDAP_DEBUG */
  320|       |
  321|  7.79k|		if ( ( *result = chkResponseList( ld, msgid, all ) ) != NULL ) {
  ------------------
  |  Branch (321:8): [True: 0, False: 7.79k]
  ------------------
  322|      0|			rc = (*result)->lm_msgtype;
  323|       |
  324|  7.79k|		} else {
  325|  7.79k|			int lc_ready = 0;
  326|       |
  327|  7.79k|			LDAP_MUTEX_LOCK( &ld->ld_conn_mutex );
  ------------------
  |  |  551|  7.79k|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  328|  15.5k|			for ( lc = ld->ld_conns; lc != NULL; lc = lc->lconn_next ) {
  ------------------
  |  |  473|  7.79k|#define	ld_conns		ldc->ldc_conns
  ------------------
  |  Branch (328:29): [True: 7.79k, False: 7.79k]
  ------------------
  329|  7.79k|				if ( ber_sockbuf_ctrl( lc->lconn_sb,
  ------------------
  |  Branch (329:10): [True: 0, False: 7.79k]
  ------------------
  330|  7.79k|					LBER_SB_OPT_DATA_READY, NULL ) )
  ------------------
  |  |  139|  7.79k|#define LBER_SB_OPT_DATA_READY		8
  ------------------
  331|      0|				{
  332|      0|					lc_ready = 2;	/* ready at ber level, not socket level */
  333|      0|					break;
  334|      0|				}
  335|  7.79k|			}
  336|       |
  337|  7.79k|			if ( !lc_ready ) {
  ------------------
  |  Branch (337:9): [True: 7.79k, False: 0]
  ------------------
  338|  7.79k|				int err;
  339|  7.79k|				rc = ldap_int_select( ld, tvp );
  340|  7.79k|				if ( rc == -1 ) {
  ------------------
  |  Branch (340:10): [True: 0, False: 7.79k]
  ------------------
  341|      0|					err = sock_errno();
  ------------------
  |  |   84|      0|#define sock_errno()	errno
  ------------------
  342|      0|#ifdef LDAP_DEBUG
  343|      0|					Debug1( LDAP_DEBUG_TRACE,
  ------------------
  |  |   92|      0|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      0|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      0|	ldap_log_printf( NULL, (level), fmt, arg1 ); \
  |  |   94|      0|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  344|      0|						"ldap_int_select returned -1: errno %d\n",
  345|      0|						err );
  346|      0|#endif
  347|      0|				}
  348|       |
  349|  7.79k|				if ( rc == 0 || ( rc == -1 && (
  ------------------
  |  Branch (349:10): [True: 2.32k, False: 5.46k]
  |  Branch (349:23): [True: 0, False: 5.46k]
  ------------------
  350|      0|					!LDAP_BOOL_GET(&ld->ld_options, LDAP_BOOL_RESTART)
  ------------------
  |  |  157|      0|	((lo)->ldo_booleans & LDAP_BOOL(bool) ? -1 : 0)
  |  |  ------------------
  |  |  |  |  155|      0|#define LDAP_BOOL(n)	((LDAP_BOOLEANS)1 << (n))
  |  |  ------------------
  |  |  |  Branch (157:3): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (350:6): [True: 0, False: 0]
  ------------------
  351|      0|						|| err != EINTR ) ) )
  ------------------
  |  Branch (351:10): [True: 0, False: 0]
  ------------------
  352|  2.32k|				{
  353|  2.32k|					ld->ld_errno = (rc == -1 ? LDAP_SERVER_DOWN :
  ------------------
  |  |  736|      0|#define LDAP_SERVER_DOWN				(-1)
  ------------------
  |  Branch (353:22): [True: 0, False: 2.32k]
  ------------------
  354|  2.32k|						LDAP_TIMEOUT);
  ------------------
  |  |  740|  2.32k|#define LDAP_TIMEOUT					(-5)
  ------------------
  355|  2.32k|					LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex );
  ------------------
  |  |  552|  2.32k|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  356|  2.32k|					return( rc );
  357|  2.32k|				}
  358|       |
  359|  5.46k|				if ( rc == -1 ) {
  ------------------
  |  Branch (359:10): [True: 0, False: 5.46k]
  ------------------
  360|      0|					rc = LDAP_MSG_X_KEEP_LOOKING;	/* select interrupted: loop */
  ------------------
  |  |   79|      0|#define LDAP_MSG_X_KEEP_LOOKING		(-2)
  ------------------
  361|       |
  362|  5.46k|				} else {
  363|  5.46k|					lc_ready = 1;
  364|  5.46k|				}
  365|  5.46k|			}
  366|  5.46k|			if ( lc_ready ) {
  ------------------
  |  Branch (366:9): [True: 5.46k, False: 0]
  ------------------
  367|  5.46k|				LDAPConn *lnext;
  368|  5.46k|				int serviced = 0;
  369|  5.46k|				rc = LDAP_MSG_X_KEEP_LOOKING;
  ------------------
  |  |   79|  5.46k|#define LDAP_MSG_X_KEEP_LOOKING		(-2)
  ------------------
  370|  5.46k|				LDAP_MUTEX_LOCK( &ld->ld_req_mutex );
  ------------------
  |  |  551|  5.46k|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  371|  5.46k|				if ( ld->ld_requests != NULL ) {
  ------------------
  |  |  454|  5.46k|#define	ld_requests		ldc->ldc_requests
  ------------------
  |  Branch (371:10): [True: 5.42k, False: 42]
  ------------------
  372|  5.42k|					TAvlnode *node = ldap_tavl_end( ld->ld_requests, TAVL_DIR_RIGHT );
  ------------------
  |  |  454|  5.42k|#define	ld_requests		ldc->ldc_requests
  ------------------
              					TAvlnode *node = ldap_tavl_end( ld->ld_requests, TAVL_DIR_RIGHT );
  ------------------
  |  |  148|  5.42k|#define	TAVL_DIR_RIGHT	1
  ------------------
  373|  5.42k|					LDAPRequest *lr;
  374|       |
  375|  5.42k|					assert( node != NULL );
  ------------------
  |  Branch (375:6): [True: 0, False: 5.42k]
  |  Branch (375:6): [True: 5.42k, False: 0]
  ------------------
  376|  5.42k|					lr = node->avl_data;
  377|  5.42k|					if ( lr->lr_status == LDAP_REQST_WRITING &&
  ------------------
  |  |  389|  10.8k|#define LDAP_REQST_WRITING	4
  ------------------
  |  Branch (377:11): [True: 0, False: 5.42k]
  ------------------
  378|      0|							ldap_is_write_ready( ld, lr->lr_conn->lconn_sb ) ) {
  ------------------
  |  Branch (378:8): [True: 0, False: 0]
  ------------------
  379|      0|						serviced = 1;
  380|      0|						ldap_int_flush_request( ld, lr );
  381|      0|					}
  382|  5.42k|				}
  383|  5.46k|				for ( lc = ld->ld_conns;
  ------------------
  |  |  473|  5.46k|#define	ld_conns		ldc->ldc_conns
  ------------------
  384|  10.9k|					rc == LDAP_MSG_X_KEEP_LOOKING && lc != NULL;
  ------------------
  |  |   79|  21.8k|#define LDAP_MSG_X_KEEP_LOOKING		(-2)
  ------------------
  |  Branch (384:6): [True: 6.69k, False: 4.23k]
  |  Branch (384:39): [True: 5.46k, False: 1.23k]
  ------------------
  385|  5.46k|					lc = lnext )
  386|  5.46k|				{
  387|  5.46k|					if ( lc->lconn_status == LDAP_CONNST_CONNECTED &&
  ------------------
  |  |  370|  10.9k|#define LDAP_CONNST_CONNECTED		3
  ------------------
  |  Branch (387:11): [True: 5.46k, False: 0]
  ------------------
  388|  5.46k|						ldap_is_read_ready( ld, lc->lconn_sb ) )
  ------------------
  |  Branch (388:7): [True: 5.46k, False: 0]
  ------------------
  389|  5.46k|					{
  390|  5.46k|						serviced = 1;
  391|       |						/* Don't let it get freed out from under us */
  392|  5.46k|						++lc->lconn_refcnt;
  393|  5.46k|						rc = try_read1msg( ld, msgid, all, lc, result );
  394|  5.46k|						lnext = lc->lconn_next;
  395|       |
  396|       |						/* Only take locks if we're really freeing */
  397|  5.46k|						if ( lc->lconn_refcnt <= 1 ) {
  ------------------
  |  Branch (397:12): [True: 21, False: 5.44k]
  ------------------
  398|     21|							ldap_free_connection( ld, lc, 0, 1 );
  399|  5.44k|						} else {
  400|  5.44k|							--lc->lconn_refcnt;
  401|  5.44k|						}
  402|  5.46k|					} else {
  403|      0|						lnext = lc->lconn_next;
  404|      0|					}
  405|  5.46k|				}
  406|  5.46k|				LDAP_MUTEX_UNLOCK( &ld->ld_req_mutex );
  ------------------
  |  |  552|  5.46k|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  407|       |				/* Quit looping if no one handled any socket events */
  408|  5.46k|				if (!serviced && lc_ready == 1)
  ------------------
  |  Branch (408:9): [True: 0, False: 5.46k]
  |  Branch (408:22): [True: 0, False: 0]
  ------------------
  409|      0|					rc = -1;
  410|  5.46k|			}
  411|  5.46k|			LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex );
  ------------------
  |  |  552|  5.46k|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  412|  5.46k|		}
  413|       |
  414|  5.46k|		if ( all == LDAP_MSG_RECEIVED ) {
  ------------------
  |  |  805|  5.46k|#define LDAP_MSG_RECEIVED		0x02
  ------------------
  |  Branch (414:8): [True: 0, False: 5.46k]
  ------------------
  415|       |			/*
  416|       |			 * ITS#10229: we looped over all ready connections accumulating
  417|       |			 * messages in ld_responses, check if we have something to return
  418|       |			 * right now.
  419|       |			 */
  420|      0|			LDAPMessage **lp, *lm = ld->ld_responses;
  ------------------
  |  |  455|      0|#define	ld_responses		ldc->ldc_responses
  ------------------
  421|       |
  422|      0|			if ( lm && msgid == LDAP_RES_ANY ) {
  ------------------
  |  |  548|      0|#define LDAP_RES_ANY			(-1)
  ------------------
  |  Branch (422:9): [True: 0, False: 0]
  |  Branch (422:15): [True: 0, False: 0]
  ------------------
  423|      0|				*result = lm;
  424|       |
  425|      0|				ld->ld_responses = NULL;
  ------------------
  |  |  455|      0|#define	ld_responses		ldc->ldc_responses
  ------------------
  426|      0|				while ( lm->lm_next ) {
  ------------------
  |  Branch (426:13): [True: 0, False: 0]
  ------------------
  427|      0|					lm->lm_chain_tail->lm_chain = lm->lm_next;
  428|      0|					lm->lm_chain_tail = lm->lm_next->lm_chain_tail;
  429|      0|					lm->lm_next = lm->lm_next->lm_next;
  430|      0|				}
  431|      0|				rc = lm->lm_msgtype;
  432|      0|				break;
  433|      0|			}
  434|       |
  435|      0|			for ( lp = &ld->ld_responses; lm; lp = &lm->lm_next, lm = *lp ) {
  ------------------
  |  |  455|      0|#define	ld_responses		ldc->ldc_responses
  ------------------
  |  Branch (435:34): [True: 0, False: 0]
  ------------------
  436|      0|				if ( msgid == lm->lm_msgid ) break;
  ------------------
  |  Branch (436:10): [True: 0, False: 0]
  ------------------
  437|      0|			}
  438|      0|			if ( lm ) {
  ------------------
  |  Branch (438:9): [True: 0, False: 0]
  ------------------
  439|      0|				*lp = lm->lm_next;
  440|      0|				*result = lm;
  441|      0|				rc = lm->lm_msgtype;
  442|      0|			}
  443|      0|		}
  444|       |
  445|  5.46k|		if ( rc == LDAP_MSG_X_KEEP_LOOKING && tvp != NULL ) {
  ------------------
  |  |   79|  10.9k|#define LDAP_MSG_X_KEEP_LOOKING		(-2)
  ------------------
  |  Branch (445:8): [True: 1.23k, False: 4.23k]
  |  Branch (445:41): [True: 1.23k, False: 0]
  ------------------
  446|  1.23k|			struct timeval	curr_time_tv = { 0 },
  447|  1.23k|					delta_time_tv = { 0 };
  448|       |
  449|  1.23k|#ifdef HAVE_GETTIMEOFDAY
  450|  1.23k|			gettimeofday( &curr_time_tv, NULL );
  451|       |#else /* ! HAVE_GETTIMEOFDAY */
  452|       |			curr_time_tv.tv_sec = time( NULL );
  453|       |			curr_time_tv.tv_usec = 0;
  454|       |#endif /* ! HAVE_GETTIMEOFDAY */
  455|       |
  456|       |			/* delta_time = tmp_time - start_time */
  457|  1.23k|			delta_time_tv.tv_sec = curr_time_tv.tv_sec - start_time_tv.tv_sec;
  458|  1.23k|			delta_time_tv.tv_usec = curr_time_tv.tv_usec - start_time_tv.tv_usec;
  459|  1.23k|			if ( delta_time_tv.tv_usec < 0 ) {
  ------------------
  |  Branch (459:9): [True: 0, False: 1.23k]
  ------------------
  460|      0|				delta_time_tv.tv_sec--;
  461|      0|				delta_time_tv.tv_usec += 1000000;
  462|      0|			}
  463|       |
  464|       |			/* tv0 < delta_time ? */
  465|  1.23k|			if ( ( tv0.tv_sec < delta_time_tv.tv_sec ) ||
  ------------------
  |  Branch (465:9): [True: 0, False: 1.23k]
  ------------------
  466|  1.23k|			     ( ( tv0.tv_sec == delta_time_tv.tv_sec ) && ( tv0.tv_usec < delta_time_tv.tv_usec ) ) )
  ------------------
  |  Branch (466:11): [True: 1.23k, False: 0]
  |  Branch (466:53): [True: 1.23k, False: 0]
  ------------------
  467|  1.23k|			{
  468|  1.23k|				rc = 0; /* timed out */
  469|  1.23k|				ld->ld_errno = LDAP_TIMEOUT;
  ------------------
  |  |  740|  1.23k|#define LDAP_TIMEOUT					(-5)
  ------------------
  470|  1.23k|				break;
  471|  1.23k|			}
  472|       |
  473|       |			/* tv0 -= delta_time */
  474|      0|			tv0.tv_sec -= delta_time_tv.tv_sec;
  475|      0|			tv0.tv_usec -= delta_time_tv.tv_usec;
  476|      0|			if ( tv0.tv_usec < 0 ) {
  ------------------
  |  Branch (476:9): [True: 0, False: 0]
  ------------------
  477|      0|				tv0.tv_sec--;
  478|      0|				tv0.tv_usec += 1000000;
  479|      0|			}
  480|       |
  481|      0|			tv.tv_sec = tv0.tv_sec;
  482|      0|			tv.tv_usec = tv0.tv_usec;
  483|       |
  484|      0|			Debug3( LDAP_DEBUG_TRACE, "wait4msg ld %p %ld s %ld us to go\n",
  ------------------
  |  |  102|      0|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      0|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|      0|	ldap_log_printf( NULL, (level), fmt, arg1, arg2, arg3 ); \
  |  |  104|      0|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (104:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  485|      0|				(void *)ld, (long) tv.tv_sec, (long) tv.tv_usec );
  486|       |
  487|      0|			start_time_tv.tv_sec = curr_time_tv.tv_sec;
  488|      0|			start_time_tv.tv_usec = curr_time_tv.tv_usec;
  489|      0|		}
  490|  5.46k|	}
  491|       |
  492|  5.46k|	return( rc );
  493|  7.79k|}
result.c:chkResponseList:
  132|  7.79k|{
  133|  7.79k|	LDAPMessage	*lm, **lastlm, *nextlm;
  134|  7.79k|	int		cnt = 0;
  135|       |
  136|       |	/*
  137|       |	 * Look through the list of responses we have received on
  138|       |	 * this association and see if the response we're interested in
  139|       |	 * is there.  If it is, return it.  If not, call wait4msg() to
  140|       |	 * wait until it arrives or timeout occurs.
  141|       |	 */
  142|       |
  143|  7.79k|	LDAP_ASSERT_MUTEX_OWNER( &ld->ld_res_mutex );
  ------------------
  |  |  554|  7.79k|	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex)
  |  |  ------------------
  |  |  |  |  134|  7.79k|#define	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex) ((void) 0)
  |  |  ------------------
  ------------------
  144|       |
  145|  7.79k|	Debug3( LDAP_DEBUG_TRACE,
  ------------------
  |  |  102|  7.79k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  7.79k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  7.79k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  7.79k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 7.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  7.79k|	ldap_log_printf( NULL, (level), fmt, arg1, arg2, arg3 ); \
  |  |  104|  7.79k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (104:12): [Folded, False: 7.79k]
  |  |  ------------------
  ------------------
  146|  7.79k|		"ldap_chkResponseList ld %p msgid %d all %d\n",
  147|  7.79k|		(void *)ld, msgid, all );
  148|       |
  149|  7.79k|	lm = ld->ld_responses;
  ------------------
  |  |  455|  7.79k|#define	ld_responses		ldc->ldc_responses
  ------------------
  150|  7.79k|	if ( lm && msgid == LDAP_RES_ANY && all == LDAP_MSG_RECEIVED ) {
  ------------------
  |  |  548|  7.92k|#define LDAP_RES_ANY			(-1)
  ------------------
              	if ( lm && msgid == LDAP_RES_ANY && all == LDAP_MSG_RECEIVED ) {
  ------------------
  |  |  805|      0|#define LDAP_MSG_RECEIVED		0x02
  ------------------
  |  Branch (150:7): [True: 129, False: 7.66k]
  |  Branch (150:13): [True: 0, False: 129]
  |  Branch (150:38): [True: 0, False: 0]
  ------------------
  151|       |		/*
  152|       |		 * ITS#10229: asked to return all messages received so far,
  153|       |		 * draft-ietf-ldapext-ldap-c-api which defines LDAP_MSG_RECEIVED lets
  154|       |		 * us mix different msgids in what we return
  155|       |		 *
  156|       |		 * We have two choices in *how* we return the messages:
  157|       |		 * - we link all chains together
  158|       |		 * - we keep the chains intact and use lm_next
  159|       |		 *
  160|       |		 * The former will make life harder for ldap_parse_result finding a
  161|       |		 * result message, the latter affects routines that iterate over
  162|       |		 * messages. This take does the former.
  163|       |		 */
  164|      0|		ld->ld_responses = NULL;
  ------------------
  |  |  455|      0|#define	ld_responses		ldc->ldc_responses
  ------------------
  165|      0|		while ( lm->lm_next ) {
  ------------------
  |  Branch (165:11): [True: 0, False: 0]
  ------------------
  166|      0|			lm->lm_chain_tail->lm_chain = lm->lm_next;
  167|      0|			lm->lm_chain_tail = lm->lm_next->lm_chain_tail;
  168|      0|			lm->lm_next = lm->lm_next->lm_next;
  169|      0|		}
  170|      0|		return lm;
  171|      0|	}
  172|       |
  173|  7.79k|	lastlm = &ld->ld_responses;
  ------------------
  |  |  455|  7.79k|#define	ld_responses		ldc->ldc_responses
  ------------------
  174|  7.92k|	for ( ; lm != NULL; lm = nextlm ) {
  ------------------
  |  Branch (174:10): [True: 129, False: 7.79k]
  ------------------
  175|    129|		nextlm = lm->lm_next;
  176|    129|		++cnt;
  177|       |
  178|    129|		if ( ldap_abandoned( ld, lm->lm_msgid ) ) {
  ------------------
  |  Branch (178:8): [True: 0, False: 129]
  ------------------
  179|      0|			Debug2( LDAP_DEBUG_ANY,
  ------------------
  |  |   97|      0|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      0|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|      0|	ldap_log_printf( NULL, (level), fmt, arg1, arg2 ); \
  |  |   99|      0|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (99:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  180|      0|				"response list msg abandoned, "
  181|      0|				"msgid %d message type %s\n",
  182|      0|				lm->lm_msgid, ldap_int_msgtype2str( lm->lm_msgtype ) );
  183|       |
  184|      0|			switch ( lm->lm_msgtype ) {
  185|      0|			case LDAP_RES_SEARCH_ENTRY:
  ------------------
  |  |  535|      0|#define LDAP_RES_SEARCH_ENTRY	((ber_tag_t) 0x64U)	/* application + constructed */
  ------------------
  |  Branch (185:4): [True: 0, False: 0]
  ------------------
  186|      0|			case LDAP_RES_SEARCH_REFERENCE:
  ------------------
  |  |  536|      0|#define LDAP_RES_SEARCH_REFERENCE	((ber_tag_t) 0x73U)	/* V3: application + constructed */
  ------------------
  |  Branch (186:4): [True: 0, False: 0]
  ------------------
  187|      0|			case LDAP_RES_INTERMEDIATE:
  ------------------
  |  |  546|      0|#define LDAP_RES_INTERMEDIATE	((ber_tag_t) 0x79U) /* V3+: application + constructed */
  ------------------
  |  Branch (187:4): [True: 0, False: 0]
  ------------------
  188|      0|				break;
  189|       |
  190|      0|			default:
  ------------------
  |  Branch (190:4): [True: 0, False: 0]
  ------------------
  191|       |				/* there's no need to keep the id
  192|       |				 * in the abandoned list any longer */
  193|      0|				ldap_mark_abandoned( ld, lm->lm_msgid );
  194|      0|				break;
  195|      0|			}
  196|       |
  197|       |			/* Remove this entry from list */
  198|      0|			*lastlm = nextlm;
  199|       |
  200|      0|			ldap_msgfree( lm );
  201|       |
  202|      0|			continue;
  203|      0|		}
  204|       |
  205|    129|		if ( msgid == LDAP_RES_ANY || lm->lm_msgid == msgid ) {
  ------------------
  |  |  548|    258|#define LDAP_RES_ANY			(-1)
  ------------------
  |  Branch (205:8): [True: 0, False: 129]
  |  Branch (205:33): [True: 0, False: 129]
  ------------------
  206|      0|			LDAPMessage	*tmp;
  207|       |
  208|      0|			if ( all == LDAP_MSG_ONE ||
  ------------------
  |  |  803|      0|#define LDAP_MSG_ONE			0x00
  ------------------
  |  Branch (208:9): [True: 0, False: 0]
  ------------------
  209|      0|				all == LDAP_MSG_RECEIVED ||
  ------------------
  |  |  805|      0|#define LDAP_MSG_RECEIVED		0x02
  ------------------
  |  Branch (209:5): [True: 0, False: 0]
  ------------------
  210|      0|				msgid == LDAP_RES_UNSOLICITED )
  ------------------
  |  |  549|      0|#define LDAP_RES_UNSOLICITED	(0)
  ------------------
  |  Branch (210:5): [True: 0, False: 0]
  ------------------
  211|      0|			{
  212|      0|				break;
  213|      0|			}
  214|       |
  215|      0|			tmp = lm->lm_chain_tail;
  216|      0|			if ( tmp->lm_msgtype == LDAP_RES_SEARCH_ENTRY ||
  ------------------
  |  |  535|      0|#define LDAP_RES_SEARCH_ENTRY	((ber_tag_t) 0x64U)	/* application + constructed */
  ------------------
  |  Branch (216:9): [True: 0, False: 0]
  ------------------
  217|      0|				tmp->lm_msgtype == LDAP_RES_SEARCH_REFERENCE ||
  ------------------
  |  |  536|      0|#define LDAP_RES_SEARCH_REFERENCE	((ber_tag_t) 0x73U)	/* V3: application + constructed */
  ------------------
  |  Branch (217:5): [True: 0, False: 0]
  ------------------
  218|      0|				tmp->lm_msgtype == LDAP_RES_INTERMEDIATE )
  ------------------
  |  |  546|      0|#define LDAP_RES_INTERMEDIATE	((ber_tag_t) 0x79U) /* V3+: application + constructed */
  ------------------
  |  Branch (218:5): [True: 0, False: 0]
  ------------------
  219|      0|			{
  220|      0|				tmp = NULL;
  221|      0|			}
  222|       |
  223|      0|			if ( tmp == NULL ) {
  ------------------
  |  Branch (223:9): [True: 0, False: 0]
  ------------------
  224|      0|				lm = NULL;
  225|      0|			}
  226|       |
  227|      0|			break;
  228|      0|		}
  229|    129|		lastlm = &lm->lm_next;
  230|    129|	}
  231|       |
  232|  7.79k|	if ( lm != NULL ) {
  ------------------
  |  Branch (232:7): [True: 0, False: 7.79k]
  ------------------
  233|       |		/* Found an entry, remove it from the list */
  234|      0|		if ( all == LDAP_MSG_ONE && lm->lm_chain != NULL ) {
  ------------------
  |  |  803|      0|#define LDAP_MSG_ONE			0x00
  ------------------
  |  Branch (234:8): [True: 0, False: 0]
  |  Branch (234:31): [True: 0, False: 0]
  ------------------
  235|      0|			*lastlm = lm->lm_chain;
  236|      0|			lm->lm_chain->lm_next = lm->lm_next;
  237|      0|			lm->lm_chain->lm_chain_tail = ( lm->lm_chain_tail != lm ) ? lm->lm_chain_tail : lm->lm_chain;
  ------------------
  |  Branch (237:34): [True: 0, False: 0]
  ------------------
  238|      0|			lm->lm_chain = NULL;
  239|      0|			lm->lm_chain_tail = NULL;
  240|      0|		} else {
  241|      0|			*lastlm = lm->lm_next;
  242|      0|		}
  243|      0|		lm->lm_next = NULL;
  244|      0|	}
  245|       |
  246|  7.79k|#ifdef LDAP_DEBUG
  247|  7.79k|	if ( lm == NULL) {
  ------------------
  |  Branch (247:7): [True: 7.79k, False: 0]
  ------------------
  248|  7.79k|		Debug1( LDAP_DEBUG_TRACE,
  ------------------
  |  |   92|  7.79k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  7.79k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  7.79k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  7.79k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 7.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|  7.79k|	ldap_log_printf( NULL, (level), fmt, arg1 ); \
  |  |   94|  7.79k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 7.79k]
  |  |  ------------------
  ------------------
  249|  7.79k|			"ldap_chkResponseList returns ld %p NULL\n", (void *)ld );
  250|  7.79k|	} else {
  251|      0|		Debug3( LDAP_DEBUG_TRACE,
  ------------------
  |  |  102|      0|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      0|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|      0|	ldap_log_printf( NULL, (level), fmt, arg1, arg2, arg3 ); \
  |  |  104|      0|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (104:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  252|      0|			"ldap_chkResponseList returns ld %p msgid %d, type 0x%02lx\n",
  253|      0|			(void *)ld, lm->lm_msgid, (unsigned long)lm->lm_msgtype );
  254|      0|	}
  255|  7.79k|#endif
  256|       |
  257|  7.79k|	return lm;
  258|  7.79k|}
result.c:ldap_abandoned:
 1435|  2.87k|{
 1436|  2.87k|	int	ret, idx;
 1437|  2.87k|	assert( msgid >= 0 );
  ------------------
  |  Branch (1437:2): [True: 0, False: 2.87k]
  |  Branch (1437:2): [True: 2.87k, False: 0]
  ------------------
 1438|       |
 1439|  2.87k|	LDAP_MUTEX_LOCK( &ld->ld_abandon_mutex );
  ------------------
  |  |  551|  2.87k|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
 1440|  2.87k|	ret = ldap_int_bisect_find( ld->ld_abandoned, ld->ld_nabandoned, msgid, &idx );
  ------------------
  |  |  461|  2.87k|#define	ld_abandoned		ldc->ldc_abandoned
  ------------------
              	ret = ldap_int_bisect_find( ld->ld_abandoned, ld->ld_nabandoned, msgid, &idx );
  ------------------
  |  |  460|  2.87k|#define	ld_nabandoned		ldc->ldc_nabandoned
  ------------------
 1441|  2.87k|	LDAP_MUTEX_UNLOCK( &ld->ld_abandon_mutex );
  ------------------
  |  |  552|  2.87k|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
 1442|  2.87k|	return ret;
 1443|  2.87k|}
result.c:try_read1msg:
  504|  5.46k|{
  505|  5.46k|	BerElement	*ber;
  506|  5.46k|	LDAPMessage	*newmsg, *l, *prev;
  507|  5.46k|	ber_int_t	id;
  508|  5.46k|	ber_tag_t	tag;
  509|  5.46k|	ber_len_t	len;
  510|  5.46k|	int		foundit = 0;
  511|  5.46k|	LDAPRequest	*lr, *tmplr, dummy_lr = { 0 };
  512|  5.46k|	BerElement	tmpber;
  513|  5.46k|	int		rc, refer_cnt, hadref, simple_request, err;
  514|  5.46k|	ber_int_t	lderr = -1;
  515|       |
  516|       |#ifdef LDAP_CONNECTIONLESS
  517|       |	LDAPMessage	*tmp = NULL, *chain_head = NULL;
  518|       |	int		moremsgs = 0, isv2 = 0;
  519|       |#endif
  520|       |
  521|  5.46k|	assert( ld != NULL );
  ------------------
  |  Branch (521:2): [True: 0, False: 5.46k]
  |  Branch (521:2): [True: 5.46k, False: 0]
  ------------------
  522|  5.46k|	assert( lc != NULL );
  ------------------
  |  Branch (522:2): [True: 0, False: 5.46k]
  |  Branch (522:2): [True: 5.46k, False: 0]
  ------------------
  523|       |	
  524|  5.46k|	LDAP_ASSERT_MUTEX_OWNER( &ld->ld_res_mutex );
  ------------------
  |  |  554|  5.46k|	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex)
  |  |  ------------------
  |  |  |  |  134|  5.46k|#define	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex) ((void) 0)
  |  |  ------------------
  ------------------
  525|  5.46k|	LDAP_ASSERT_MUTEX_OWNER( &ld->ld_conn_mutex );
  ------------------
  |  |  554|  5.46k|	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex)
  |  |  ------------------
  |  |  |  |  134|  5.46k|#define	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex) ((void) 0)
  |  |  ------------------
  ------------------
  526|  5.46k|	LDAP_ASSERT_MUTEX_OWNER( &ld->ld_req_mutex );
  ------------------
  |  |  554|  5.46k|	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex)
  |  |  ------------------
  |  |  |  |  134|  5.46k|#define	LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER(mutex) ((void) 0)
  |  |  ------------------
  ------------------
  527|       |
  528|  5.46k|	Debug3( LDAP_DEBUG_TRACE, "read1msg: ld %p msgid %d all %d\n",
  ------------------
  |  |  102|  5.46k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  5.46k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  5.46k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  5.46k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 5.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  5.46k|	ldap_log_printf( NULL, (level), fmt, arg1, arg2, arg3 ); \
  |  |  104|  5.46k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (104:12): [Folded, False: 5.46k]
  |  |  ------------------
  ------------------
  529|  5.46k|		(void *)ld, msgid, all );
  530|       |
  531|  5.46k|retry:
  532|  5.46k|	if ( lc->lconn_ber == NULL ) {
  ------------------
  |  Branch (532:7): [True: 5.18k, False: 281]
  ------------------
  533|  5.18k|		lc->lconn_ber = ldap_alloc_ber_with_options( ld );
  534|       |
  535|  5.18k|		if ( lc->lconn_ber == NULL ) {
  ------------------
  |  Branch (535:8): [True: 0, False: 5.18k]
  ------------------
  536|      0|			return -1;
  537|      0|		}
  538|  5.18k|	}
  539|       |
  540|  5.46k|	ber = lc->lconn_ber;
  541|  5.46k|	assert( LBER_VALID (ber) );
  ------------------
  |  Branch (541:2): [True: 0, False: 5.46k]
  |  Branch (541:2): [True: 5.46k, False: 0]
  ------------------
  542|       |
  543|       |	/* get the next message */
  544|  5.46k|	sock_errset(0);
  ------------------
  |  |   86|  5.46k|#define sock_errset(e)	((void) (errno = (e)))
  ------------------
  545|       |#ifdef LDAP_CONNECTIONLESS
  546|       |	if ( LDAP_IS_UDP(ld) ) {
  547|       |		struct sockaddr_storage from;
  548|       |		if ( ber_int_sb_read( lc->lconn_sb, &from, sizeof(struct sockaddr_storage) ) < 0 )
  549|       |			goto fail;
  550|       |		if ( ld->ld_options.ldo_version == LDAP_VERSION2 ) isv2 = 1;
  551|       |	}
  552|       |nextresp3:
  553|       |#endif
  554|  5.46k|	tag = ber_get_next( lc->lconn_sb, &len, ber );
  555|  5.46k|	switch ( tag ) {
  556|  3.28k|	case LDAP_TAG_MESSAGE:
  ------------------
  |  |  498|  3.28k|#define LDAP_TAG_MESSAGE	((ber_tag_t) 0x30U)	/* constructed + 16 */
  ------------------
  |  Branch (556:2): [True: 3.28k, False: 2.18k]
  ------------------
  557|       |		/*
  558|       |	 	 * We read a complete message.
  559|       |	 	 * The connection should no longer need this ber.
  560|       |	 	 */
  561|  3.28k|		lc->lconn_ber = NULL;
  562|  3.28k|		break;
  563|       |
  564|     89|	default:
  ------------------
  |  Branch (564:2): [True: 89, False: 5.37k]
  ------------------
  565|       |		/*
  566|       |		 * We read a BerElement that isn't LDAP or the stream has desync'd.
  567|       |		 * In either case, anything we read from now on is probably garbage,
  568|       |		 * just drop the connection.
  569|       |		 */
  570|     89|		ber_free( ber, 1 );
  571|     89|		lc->lconn_ber = NULL;
  572|       |		/* FALLTHRU */
  573|       |
  574|  2.18k|	case LBER_DEFAULT:
  ------------------
  |  |   80|  2.18k|#define LBER_DEFAULT		((ber_tag_t) -1)
  ------------------
  |  Branch (574:2): [True: 2.09k, False: 3.37k]
  ------------------
  575|  2.18k|fail:
  576|  2.18k|		err = sock_errno();
  ------------------
  |  |   84|  2.18k|#define sock_errno()	errno
  ------------------
  577|  2.18k|#ifdef LDAP_DEBUG		   
  578|  2.18k|		Debug1( LDAP_DEBUG_CONNS,
  ------------------
  |  |   92|  2.18k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  2.18k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.18k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  2.18k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 2.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|  2.18k|	ldap_log_printf( NULL, (level), fmt, arg1 ); \
  |  |   94|  2.18k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 2.18k]
  |  |  ------------------
  ------------------
  579|  2.18k|			"ber_get_next failed, errno=%d.\n", err );
  580|  2.18k|#endif		   
  581|  2.18k|		if ( err == EWOULDBLOCK ) return LDAP_MSG_X_KEEP_LOOKING;
  ------------------
  |  |   79|    727|#define LDAP_MSG_X_KEEP_LOOKING		(-2)
  ------------------
  |  Branch (581:8): [True: 727, False: 1.45k]
  ------------------
  582|  1.45k|		if ( err == EAGAIN ) return LDAP_MSG_X_KEEP_LOOKING;
  ------------------
  |  |   79|      0|#define LDAP_MSG_X_KEEP_LOOKING		(-2)
  ------------------
  |  Branch (582:8): [True: 0, False: 1.45k]
  ------------------
  583|  1.45k|		ld->ld_errno = LDAP_SERVER_DOWN;
  ------------------
  |  |  736|  1.45k|#define LDAP_SERVER_DOWN				(-1)
  ------------------
  584|  1.45k|		if ( !LDAP_BOOL_GET( &ld->ld_options, LDAP_BOOL_KEEPCONN )) {
  ------------------
  |  |  157|  1.45k|	((lo)->ldo_booleans & LDAP_BOOL(bool) ? -1 : 0)
  |  |  ------------------
  |  |  |  |  155|  1.45k|#define LDAP_BOOL(n)	((LDAP_BOOLEANS)1 << (n))
  |  |  ------------------
  |  |  |  Branch (157:3): [True: 0, False: 1.45k]
  |  |  ------------------
  ------------------
  |  Branch (584:8): [True: 1.45k, False: 0]
  ------------------
  585|  1.45k|			--lc->lconn_refcnt;
  586|  1.45k|		}
  587|  1.45k|		lc->lconn_status = 0;
  588|  1.45k|		return -1;
  589|  5.46k|	}
  590|       |
  591|       |	/* message id */
  592|  3.28k|	if ( ber_get_int( ber, &id ) == LBER_ERROR ) {
  ------------------
  |  |   79|  3.28k|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  |  Branch (592:7): [True: 81, False: 3.20k]
  ------------------
  593|     81|		ber_free( ber, 1 );
  594|     81|		ld->ld_errno = LDAP_DECODING_ERROR;
  ------------------
  |  |  739|     81|#define LDAP_DECODING_ERROR				(-4)
  ------------------
  595|     81|		return( -1 );
  596|     81|	}
  597|       |
  598|       |	/* id == 0 iff unsolicited notification message (RFC 4511) */
  599|       |
  600|       |	/* id < 0 is invalid, just toss it. FIXME: should we disconnect? */
  601|  3.20k|	if ( id < 0 ) {
  ------------------
  |  Branch (601:7): [True: 102, False: 3.10k]
  ------------------
  602|    102|		goto retry_ber;
  603|    102|	}
  604|       |	
  605|       |	/* if it's been abandoned, toss it */
  606|  3.10k|	if ( id > 0 ) {
  ------------------
  |  Branch (606:7): [True: 2.74k, False: 351]
  ------------------
  607|  2.74k|		if ( ldap_abandoned( ld, id ) ) {
  ------------------
  |  Branch (607:8): [True: 0, False: 2.74k]
  ------------------
  608|       |			/* the message type */
  609|      0|			tag = ber_peek_tag( ber, &len );
  610|      0|			switch ( tag ) {
  611|      0|			case LDAP_RES_SEARCH_ENTRY:
  ------------------
  |  |  535|      0|#define LDAP_RES_SEARCH_ENTRY	((ber_tag_t) 0x64U)	/* application + constructed */
  ------------------
  |  Branch (611:4): [True: 0, False: 0]
  ------------------
  612|      0|			case LDAP_RES_SEARCH_REFERENCE:
  ------------------
  |  |  536|      0|#define LDAP_RES_SEARCH_REFERENCE	((ber_tag_t) 0x73U)	/* V3: application + constructed */
  ------------------
  |  Branch (612:4): [True: 0, False: 0]
  ------------------
  613|      0|			case LDAP_RES_INTERMEDIATE:
  ------------------
  |  |  546|      0|#define LDAP_RES_INTERMEDIATE	((ber_tag_t) 0x79U) /* V3+: application + constructed */
  ------------------
  |  Branch (613:4): [True: 0, False: 0]
  ------------------
  614|      0|			case LBER_ERROR:
  ------------------
  |  |   79|      0|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  |  Branch (614:4): [True: 0, False: 0]
  ------------------
  615|      0|				break;
  616|       |
  617|      0|			default:
  ------------------
  |  Branch (617:4): [True: 0, False: 0]
  ------------------
  618|       |				/* there's no need to keep the id
  619|       |				 * in the abandoned list any longer */
  620|      0|				ldap_mark_abandoned( ld, id );
  621|      0|				break;
  622|      0|			}
  623|       |
  624|      0|			Debug3( LDAP_DEBUG_ANY,
  ------------------
  |  |  102|      0|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      0|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|      0|	ldap_log_printf( NULL, (level), fmt, arg1, arg2, arg3 ); \
  |  |  104|      0|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (104:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  625|      0|				"abandoned/discarded ld %p msgid %d message type %s\n",
  626|      0|				(void *)ld, id, ldap_int_msgtype2str( tag ) );
  627|       |
  628|    370|retry_ber:
  629|    370|			ber_free( ber, 1 );
  630|    370|			if ( ber_sockbuf_ctrl( lc->lconn_sb, LBER_SB_OPT_DATA_READY, NULL ) ) {
  ------------------
  |  |  139|    370|#define LBER_SB_OPT_DATA_READY		8
  ------------------
  |  Branch (630:9): [True: 0, False: 370]
  ------------------
  631|      0|				goto retry;
  632|      0|			}
  633|    370|			return( LDAP_MSG_X_KEEP_LOOKING );	/* continue looking */
  ------------------
  |  |   79|    370|#define LDAP_MSG_X_KEEP_LOOKING		(-2)
  ------------------
  634|    370|		}
  635|       |
  636|  2.74k|		lr = ldap_find_request_by_msgid( ld, id );
  637|  2.74k|		if ( lr == NULL ) {
  ------------------
  |  Branch (637:8): [True: 151, False: 2.59k]
  ------------------
  638|    151|			const char	*msg = "unknown";
  639|       |
  640|       |			/* the message type */
  641|    151|			tag = ber_peek_tag( ber, &len );
  642|    151|			switch ( tag ) {
  643|     52|			case LBER_ERROR:
  ------------------
  |  |   79|     52|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  |  Branch (643:4): [True: 52, False: 99]
  ------------------
  644|     52|				break;
  645|       |
  646|     99|			default:
  ------------------
  |  Branch (646:4): [True: 99, False: 52]
  ------------------
  647|     99|				msg = ldap_int_msgtype2str( tag );
  648|     99|				break;
  649|    151|			}
  650|       |
  651|    151|			Debug3( LDAP_DEBUG_ANY,
  ------------------
  |  |  102|    151|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|    151|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|    151|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|    151|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 151]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|    151|	ldap_log_printf( NULL, (level), fmt, arg1, arg2, arg3 ); \
  |  |  104|    151|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (104:12): [Folded, False: 151]
  |  |  ------------------
  ------------------
  652|    151|				"no request for response on ld %p msgid %d message type %s (tossing)\n",
  653|    151|				(void *)ld, id, msg );
  654|       |
  655|    151|			goto retry_ber;
  656|    151|		}
  657|       |
  658|       |#ifdef LDAP_CONNECTIONLESS
  659|       |		if ( LDAP_IS_UDP(ld) && isv2 ) {
  660|       |			ber_scanf(ber, "x{");
  661|       |		}
  662|       |nextresp2:
  663|       |		;
  664|       |#endif
  665|  2.74k|	}
  666|       |
  667|       |	/* the message type */
  668|  2.94k|	tag = ber_peek_tag( ber, &len );
  669|  2.94k|	if ( tag == LBER_ERROR ) {
  ------------------
  |  |   79|  2.94k|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  |  Branch (669:7): [True: 55, False: 2.89k]
  ------------------
  670|     55|		ld->ld_errno = LDAP_DECODING_ERROR;
  ------------------
  |  |  739|     55|#define LDAP_DECODING_ERROR				(-4)
  ------------------
  671|     55|		ber_free( ber, 1 );
  672|     55|		return( -1 );
  673|     55|	}
  674|       |
  675|  2.89k|	Debug3( LDAP_DEBUG_TRACE,
  ------------------
  |  |  102|  2.89k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  2.89k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.89k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  2.89k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 2.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  2.89k|	ldap_log_printf( NULL, (level), fmt, arg1, arg2, arg3 ); \
  |  |  104|  2.89k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (104:12): [Folded, False: 2.89k]
  |  |  ------------------
  ------------------
  676|  2.89k|		"read1msg: ld %p msgid %d message type %s\n",
  677|  2.89k|		(void *)ld, id, ldap_int_msgtype2str( tag ) );
  678|       |
  679|  2.89k|	if ( id == 0 ) {
  ------------------
  |  Branch (679:7): [True: 302, False: 2.59k]
  ------------------
  680|       |		/* unsolicited notification message (RFC 4511) */
  681|    302|		if ( tag != LDAP_RES_EXTENDED ) {
  ------------------
  |  |  545|    302|#define LDAP_RES_EXTENDED	((ber_tag_t) 0x78U)	/* V3: application + constructed */
  ------------------
  |  Branch (681:8): [True: 117, False: 185]
  ------------------
  682|       |			/* toss it */
  683|    117|			goto retry_ber;
  684|       |
  685|       |			/* strictly speaking, it's an error; from RFC 4511:
  686|       |
  687|       |4.4.  Unsolicited Notification
  688|       |
  689|       |   An unsolicited notification is an LDAPMessage sent from the server to
  690|       |   the client that is not in response to any LDAPMessage received by the
  691|       |   server.  It is used to signal an extraordinary condition in the
  692|       |   server or in the LDAP session between the client and the server.  The
  693|       |   notification is of an advisory nature, and the server will not expect
  694|       |   any response to be returned from the client.
  695|       |
  696|       |   The unsolicited notification is structured as an LDAPMessage in which
  697|       |   the messageID is zero and protocolOp is set to the extendedResp
  698|       |   choice using the ExtendedResponse type (See Section 4.12).  The
  699|       |   responseName field of the ExtendedResponse always contains an LDAPOID
  700|       |   that is unique for this notification.
  701|       |
  702|       |			 * however, since unsolicited responses
  703|       |			 * are of advisory nature, better
  704|       |			 * toss it, right now
  705|       |			 */
  706|       |
  707|       |#if 0
  708|       |			ld->ld_errno = LDAP_DECODING_ERROR;
  709|       |			ber_free( ber, 1 );
  710|       |			return( -1 );
  711|       |#endif
  712|    117|		}
  713|       |
  714|    185|		lr = &dummy_lr;
  715|    185|	}
  716|       |
  717|  2.77k|	id = lr->lr_origid;
  718|  2.77k|	refer_cnt = 0;
  719|  2.77k|	hadref = simple_request = 0;
  720|  2.77k|	rc = LDAP_MSG_X_KEEP_LOOKING;	/* default is to keep looking (no response found) */
  ------------------
  |  |   79|  2.77k|#define LDAP_MSG_X_KEEP_LOOKING		(-2)
  ------------------
  721|  2.77k|	lr->lr_res_msgtype = tag;
  722|       |
  723|       |	/*
  724|       |	 * Check for V3 search reference
  725|       |	 */
  726|  2.77k|	if ( tag == LDAP_RES_SEARCH_REFERENCE ) {
  ------------------
  |  |  536|  2.77k|#define LDAP_RES_SEARCH_REFERENCE	((ber_tag_t) 0x73U)	/* V3: application + constructed */
  ------------------
  |  Branch (726:7): [True: 2, False: 2.77k]
  ------------------
  727|      2|		if ( ld->ld_version > LDAP_VERSION2 ) {
  ------------------
  |  |  509|      2|#define ld_version		ld_options.ldo_version
  |  |  ------------------
  |  |  |  |  484|      2|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
              		if ( ld->ld_version > LDAP_VERSION2 ) {
  ------------------
  |  |   38|      2|#define LDAP_VERSION2	2
  ------------------
  |  Branch (727:8): [True: 1, False: 1]
  ------------------
  728|       |			/* This is a V3 search reference */
  729|      1|			if ( LDAP_BOOL_GET(&ld->ld_options, LDAP_BOOL_REFERRALS) ||
  ------------------
  |  |  157|      2|	((lo)->ldo_booleans & LDAP_BOOL(bool) ? -1 : 0)
  |  |  ------------------
  |  |  |  |  155|      1|#define LDAP_BOOL(n)	((LDAP_BOOLEANS)1 << (n))
  |  |  ------------------
  |  |  |  Branch (157:2): [True: 0, False: 1]
  |  |  |  Branch (157:3): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  730|      1|					lr->lr_parent != NULL )
  ------------------
  |  Branch (730:6): [True: 0, False: 1]
  ------------------
  731|      0|			{
  732|      0|				char **refs = NULL;
  733|      0|				tmpber = *ber;
  734|       |
  735|       |				/* Get the referral list */
  736|      0|				if ( ber_scanf( &tmpber, "{v}", &refs ) == LBER_ERROR ) {
  ------------------
  |  |   79|      0|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  |  Branch (736:10): [True: 0, False: 0]
  ------------------
  737|      0|					rc = LDAP_DECODING_ERROR;
  ------------------
  |  |  739|      0|#define LDAP_DECODING_ERROR				(-4)
  ------------------
  738|       |
  739|      0|				} else {
  740|       |					/* Note: refs array is freed by ldap_chase_v3referrals */
  741|      0|					refer_cnt = ldap_chase_v3referrals( ld, lr, refs,
  742|      0|						1, &lr->lr_res_error, &hadref );
  743|      0|					if ( refer_cnt > 0 ) {
  ------------------
  |  Branch (743:11): [True: 0, False: 0]
  ------------------
  744|       |						/* successfully chased reference */
  745|       |						/* If haven't got end search, set chasing referrals */
  746|      0|						if ( lr->lr_status != LDAP_REQST_COMPLETED ) {
  ------------------
  |  |  385|      0|#define LDAP_REQST_COMPLETED	0
  ------------------
  |  Branch (746:12): [True: 0, False: 0]
  ------------------
  747|      0|							lr->lr_status = LDAP_REQST_CHASINGREFS;
  ------------------
  |  |  387|      0|#define LDAP_REQST_CHASINGREFS	2
  ------------------
  748|      0|							Debug1( LDAP_DEBUG_TRACE,
  ------------------
  |  |   92|      0|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      0|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      0|	ldap_log_printf( NULL, (level), fmt, arg1 ); \
  |  |   94|      0|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  749|      0|								"read1msg:  search ref chased, "
  750|      0|								"mark request chasing refs, "
  751|      0|								"id = %d\n",
  752|      0|								lr->lr_msgid );
  753|      0|						}
  754|      0|					}
  755|      0|				}
  756|      0|			}
  757|      1|		}
  758|       |
  759|  2.77k|	} else if ( tag != LDAP_RES_SEARCH_ENTRY && tag != LDAP_RES_INTERMEDIATE ) {
  ------------------
  |  |  535|  5.55k|#define LDAP_RES_SEARCH_ENTRY	((ber_tag_t) 0x64U)	/* application + constructed */
  ------------------
              	} else if ( tag != LDAP_RES_SEARCH_ENTRY && tag != LDAP_RES_INTERMEDIATE ) {
  ------------------
  |  |  546|  2.31k|#define LDAP_RES_INTERMEDIATE	((ber_tag_t) 0x79U) /* V3+: application + constructed */
  ------------------
  |  Branch (759:14): [True: 2.31k, False: 462]
  |  Branch (759:46): [True: 2.31k, False: 3]
  ------------------
  760|       |		/* All results that just return a status, i.e. don't return data
  761|       |		 * go through the following code.  This code also chases V2 referrals
  762|       |		 * and checks if all referrals have been chased.
  763|       |		 */
  764|  2.31k|		char		*lr_res_error = NULL;
  765|       |
  766|  2.31k|		tmpber = *ber; 	/* struct copy */
  767|  2.31k|		if ( ber_scanf( &tmpber, "{eAA", &lderr,
  ------------------
  |  Branch (767:8): [True: 2.07k, False: 233]
  ------------------
  768|  2.31k|				&lr->lr_res_matched, &lr_res_error )
  769|  2.31k|				!= LBER_ERROR )
  ------------------
  |  |   79|  2.31k|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  770|  2.07k|		{
  771|  2.07k|			if ( lr_res_error != NULL ) {
  ------------------
  |  Branch (771:9): [True: 476, False: 1.60k]
  ------------------
  772|    476|				if ( lr->lr_res_error != NULL ) {
  ------------------
  |  Branch (772:10): [True: 0, False: 476]
  ------------------
  773|      0|					(void)ldap_append_referral( ld, &lr->lr_res_error, lr_res_error );
  774|      0|					LDAP_FREE( (char *)lr_res_error );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  775|       |
  776|    476|				} else {
  777|    476|					lr->lr_res_error = lr_res_error;
  778|    476|				}
  779|    476|				lr_res_error = NULL;
  780|    476|			}
  781|       |
  782|       |			/* Do we need to check for referrals? */
  783|  2.07k|			if ( tag != LDAP_RES_BIND &&
  ------------------
  |  |  534|  4.15k|#define LDAP_RES_BIND		((ber_tag_t) 0x61U)	/* application + constructed */
  ------------------
  |  Branch (783:9): [True: 722, False: 1.35k]
  ------------------
  784|    722|				( LDAP_BOOL_GET(&ld->ld_options, LDAP_BOOL_REFERRALS) ||
  ------------------
  |  |  157|  1.44k|	((lo)->ldo_booleans & LDAP_BOOL(bool) ? -1 : 0)
  |  |  ------------------
  |  |  |  |  155|    722|#define LDAP_BOOL(n)	((LDAP_BOOLEANS)1 << (n))
  |  |  ------------------
  |  |  |  Branch (157:2): [True: 0, False: 722]
  |  |  |  Branch (157:3): [True: 0, False: 722]
  |  |  ------------------
  ------------------
  785|    722|					lr->lr_parent != NULL ))
  ------------------
  |  Branch (785:6): [True: 0, False: 722]
  ------------------
  786|      0|			{
  787|      0|				char		**refs = NULL;
  788|      0|				ber_len_t	len;
  789|       |
  790|       |				/* Check if V3 referral */
  791|      0|				if ( ber_peek_tag( &tmpber, &len ) == LDAP_TAG_REFERRAL ) {
  ------------------
  |  |  505|      0|#define LDAP_TAG_REFERRAL	((ber_tag_t) 0xa3U)	/* context specific + constructed + 3 */
  ------------------
  |  Branch (791:10): [True: 0, False: 0]
  ------------------
  792|      0|					if ( ld->ld_version > LDAP_VERSION2 ) {
  ------------------
  |  |  509|      0|#define ld_version		ld_options.ldo_version
  |  |  ------------------
  |  |  |  |  484|      0|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
              					if ( ld->ld_version > LDAP_VERSION2 ) {
  ------------------
  |  |   38|      0|#define LDAP_VERSION2	2
  ------------------
  |  Branch (792:11): [True: 0, False: 0]
  ------------------
  793|       |						/* Get the referral list */
  794|      0|						if ( ber_scanf( &tmpber, "{v}", &refs) == LBER_ERROR) {
  ------------------
  |  |   79|      0|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  |  Branch (794:12): [True: 0, False: 0]
  ------------------
  795|      0|							rc = LDAP_DECODING_ERROR;
  ------------------
  |  |  739|      0|#define LDAP_DECODING_ERROR				(-4)
  ------------------
  796|      0|							lr->lr_status = LDAP_REQST_COMPLETED;
  ------------------
  |  |  385|      0|#define LDAP_REQST_COMPLETED	0
  ------------------
  797|      0|							Debug2( LDAP_DEBUG_TRACE,
  ------------------
  |  |   97|      0|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      0|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|      0|	ldap_log_printf( NULL, (level), fmt, arg1, arg2 ); \
  |  |   99|      0|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (99:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  798|      0|								"read1msg: referral decode error, "
  799|      0|								"mark request completed, ld %p msgid %d\n",
  800|      0|								(void *)ld, lr->lr_msgid );
  801|       |
  802|      0|						} else {
  803|       |							/* Chase the referral 
  804|       |							 * refs array is freed by ldap_chase_v3referrals
  805|       |							 */
  806|      0|							refer_cnt = ldap_chase_v3referrals( ld, lr, refs,
  807|      0|								0, &lr->lr_res_error, &hadref );
  808|      0|							lr->lr_status = LDAP_REQST_COMPLETED;
  ------------------
  |  |  385|      0|#define LDAP_REQST_COMPLETED	0
  ------------------
  809|      0|							Debug3( LDAP_DEBUG_TRACE,
  ------------------
  |  |  102|      0|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      0|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|      0|	ldap_log_printf( NULL, (level), fmt, arg1, arg2, arg3 ); \
  |  |  ------------------
  |  |  |  Branch (103:39): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (104:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  810|      0|								"read1msg: referral %s chased, "
  811|      0|								"mark request completed, ld %p msgid %d\n",
  812|      0|								refer_cnt > 0 ? "" : "not",
  813|      0|								(void *)ld, lr->lr_msgid);
  814|      0|							if ( refer_cnt < 0 ) {
  ------------------
  |  Branch (814:13): [True: 0, False: 0]
  ------------------
  815|      0|								refer_cnt = 0;
  816|      0|							}
  817|      0|						}
  818|      0|					}
  819|      0|				} else {
  820|      0|					switch ( lderr ) {
  821|      0|					case LDAP_SUCCESS:
  ------------------
  |  |  610|      0|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (821:6): [True: 0, False: 0]
  ------------------
  822|      0|					case LDAP_COMPARE_TRUE:
  ------------------
  |  |  619|      0|#define LDAP_COMPARE_TRUE			0x06
  ------------------
  |  Branch (822:6): [True: 0, False: 0]
  ------------------
  823|      0|					case LDAP_COMPARE_FALSE:
  ------------------
  |  |  618|      0|#define LDAP_COMPARE_FALSE			0x05
  ------------------
  |  Branch (823:6): [True: 0, False: 0]
  ------------------
  824|      0|						break;
  825|       |
  826|      0|					default:
  ------------------
  |  Branch (826:6): [True: 0, False: 0]
  ------------------
  827|      0|						if ( lr->lr_res_error == NULL ) {
  ------------------
  |  Branch (827:12): [True: 0, False: 0]
  ------------------
  828|      0|							break;
  829|      0|						}
  830|       |
  831|       |						/* pedantic, should never happen */
  832|      0|						if ( lr->lr_res_error[ 0 ] == '\0' ) {
  ------------------
  |  Branch (832:12): [True: 0, False: 0]
  ------------------
  833|      0|							LDAP_FREE( lr->lr_res_error );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  834|      0|							lr->lr_res_error = NULL;
  835|      0|							break;	
  836|      0|						}
  837|       |
  838|       |						/* V2 referrals are in error string */
  839|      0|						refer_cnt = ldap_chase_referrals( ld, lr,
  840|      0|							&lr->lr_res_error, -1, &hadref );
  841|      0|						lr->lr_status = LDAP_REQST_COMPLETED;
  ------------------
  |  |  385|      0|#define LDAP_REQST_COMPLETED	0
  ------------------
  842|      0|						Debug1( LDAP_DEBUG_TRACE,
  ------------------
  |  |   92|      0|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      0|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      0|	ldap_log_printf( NULL, (level), fmt, arg1 ); \
  |  |   94|      0|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  843|      0|							"read1msg:  V2 referral chased, "
  844|      0|							"mark request completed, id = %d\n",
  845|      0|							lr->lr_msgid );
  846|      0|						break;
  847|      0|					}
  848|      0|				}
  849|      0|			}
  850|       |
  851|       |			/* save errno, message, and matched string */
  852|  2.07k|			if ( !hadref || lr->lr_res_error == NULL ) {
  ------------------
  |  Branch (852:9): [True: 2.07k, False: 0]
  |  Branch (852:20): [True: 0, False: 0]
  ------------------
  853|  2.07k|				lr->lr_res_errno =
  854|  2.07k|					lderr == LDAP_PARTIAL_RESULTS
  ------------------
  |  |  624|  2.07k|#define LDAP_PARTIAL_RESULTS		0x09	/* LDAPv2+ (not LDAPv3) */
  ------------------
  |  Branch (854:6): [True: 2, False: 2.07k]
  ------------------
  855|  2.07k|					? LDAP_SUCCESS : lderr;
  ------------------
  |  |  610|      2|#define LDAP_SUCCESS				0x00
  ------------------
  856|       |
  857|  2.07k|			} else if ( ld->ld_errno != LDAP_SUCCESS ) {
  ------------------
  |  |  610|      0|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (857:16): [True: 0, False: 0]
  ------------------
  858|      0|				lr->lr_res_errno = ld->ld_errno;
  859|       |
  860|      0|			} else {
  861|      0|				lr->lr_res_errno = LDAP_PARTIAL_RESULTS;
  ------------------
  |  |  624|      0|#define LDAP_PARTIAL_RESULTS		0x09	/* LDAPv2+ (not LDAPv3) */
  ------------------
  862|      0|			}
  863|  2.07k|		}
  864|       |
  865|       |		/* in any case, don't leave any lr_res_error 'round */
  866|  2.31k|		if ( lr_res_error ) {
  ------------------
  |  Branch (866:8): [True: 0, False: 2.31k]
  ------------------
  867|      0|			LDAP_FREE( lr_res_error );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  868|      0|		}
  869|       |
  870|  2.31k|		Debug2( LDAP_DEBUG_TRACE,
  ------------------
  |  |   97|  2.31k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  2.31k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.31k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  2.31k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 2.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|  2.31k|	ldap_log_printf( NULL, (level), fmt, arg1, arg2 ); \
  |  |   99|  2.31k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (99:12): [Folded, False: 2.31k]
  |  |  ------------------
  ------------------
  871|  2.31k|			"read1msg: ld %p %d new referrals\n",
  872|  2.31k|			(void *)ld, refer_cnt );
  873|       |
  874|  2.31k|		if ( refer_cnt != 0 ) {	/* chasing referrals */
  ------------------
  |  Branch (874:8): [True: 0, False: 2.31k]
  ------------------
  875|      0|			ber_free( ber, 1 );
  876|      0|			ber = NULL;
  877|      0|			if ( refer_cnt < 0 ) {
  ------------------
  |  Branch (877:9): [True: 0, False: 0]
  ------------------
  878|      0|				ldap_return_request( ld, lr, 0 );
  879|      0|				return( -1 );	/* fatal error */
  880|      0|			}
  881|      0|			lr->lr_res_errno = LDAP_SUCCESS; /* successfully chased referral */
  ------------------
  |  |  610|      0|#define LDAP_SUCCESS				0x00
  ------------------
  882|      0|			if ( lr->lr_res_matched ) {
  ------------------
  |  Branch (882:9): [True: 0, False: 0]
  ------------------
  883|      0|				LDAP_FREE( lr->lr_res_matched );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  884|      0|				lr->lr_res_matched = NULL;
  885|      0|			}
  886|       |
  887|  2.31k|		} else {
  888|  2.31k|			if ( lr->lr_outrefcnt <= 0 && lr->lr_parent == NULL ) {
  ------------------
  |  Branch (888:9): [True: 2.31k, False: 0]
  |  Branch (888:34): [True: 2.31k, False: 0]
  ------------------
  889|       |				/* request without any referrals */
  890|  2.31k|				simple_request = ( hadref ? 0 : 1 );
  ------------------
  |  Branch (890:24): [True: 0, False: 2.31k]
  ------------------
  891|       |
  892|  2.31k|			} else {
  893|       |				/* request with referrals or child request */
  894|      0|				ber_free( ber, 1 );
  895|      0|				ber = NULL;
  896|      0|			}
  897|       |
  898|  2.31k|			lr->lr_status = LDAP_REQST_COMPLETED; /* declare this request done */
  ------------------
  |  |  385|  2.31k|#define LDAP_REQST_COMPLETED	0
  ------------------
  899|  2.31k|			Debug2( LDAP_DEBUG_TRACE,
  ------------------
  |  |   97|  2.31k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  2.31k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.31k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  2.31k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 2.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|  2.31k|	ldap_log_printf( NULL, (level), fmt, arg1, arg2 ); \
  |  |   99|  2.31k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (99:12): [Folded, False: 2.31k]
  |  |  ------------------
  ------------------
  900|  2.31k|				"read1msg:  mark request completed, ld %p msgid %d\n",
  901|  2.31k|				(void *)ld, lr->lr_msgid );
  902|  2.31k|			tmplr = lr;
  903|  2.31k|			while ( lr->lr_parent != NULL ) {
  ------------------
  |  Branch (903:12): [True: 0, False: 2.31k]
  ------------------
  904|      0|				merge_error_info( ld, lr->lr_parent, lr );
  905|       |
  906|      0|				lr = lr->lr_parent;
  907|      0|				if ( --lr->lr_outrefcnt > 0 ) {
  ------------------
  |  Branch (907:10): [True: 0, False: 0]
  ------------------
  908|      0|					break;	/* not completely done yet */
  909|      0|				}
  910|      0|			}
  911|       |			/* ITS#6744: Original lr was refcounted when we retrieved it,
  912|       |			 * must release it now that we're working with the parent
  913|       |			 */
  914|  2.31k|			if ( tmplr->lr_parent ) {
  ------------------
  |  Branch (914:9): [True: 0, False: 2.31k]
  ------------------
  915|      0|				ldap_return_request( ld, tmplr, 0 );
  916|      0|			}
  917|       |
  918|       |			/* Check if all requests are finished, lr is now parent */
  919|  2.31k|			tmplr = lr;
  920|  2.31k|			if ( tmplr->lr_status == LDAP_REQST_COMPLETED ) {
  ------------------
  |  |  385|  2.31k|#define LDAP_REQST_COMPLETED	0
  ------------------
  |  Branch (920:9): [True: 2.31k, False: 0]
  ------------------
  921|  2.31k|				for ( tmplr = lr->lr_child;
  922|  2.31k|					tmplr != NULL;
  ------------------
  |  Branch (922:6): [True: 0, False: 2.31k]
  ------------------
  923|  2.31k|					tmplr = tmplr->lr_refnext )
  924|      0|				{
  925|      0|					if ( tmplr->lr_status != LDAP_REQST_COMPLETED ) break;
  ------------------
  |  |  385|      0|#define LDAP_REQST_COMPLETED	0
  ------------------
  |  Branch (925:11): [True: 0, False: 0]
  ------------------
  926|      0|				}
  927|  2.31k|			}
  928|       |
  929|       |			/* This is the parent request if the request has referrals */
  930|  2.31k|			if ( lr->lr_outrefcnt <= 0 &&
  ------------------
  |  Branch (930:9): [True: 2.31k, False: 0]
  ------------------
  931|  2.31k|				lr->lr_parent == NULL &&
  ------------------
  |  Branch (931:5): [True: 2.31k, False: 0]
  ------------------
  932|  2.31k|				tmplr == NULL )
  ------------------
  |  Branch (932:5): [True: 2.31k, False: 0]
  ------------------
  933|  2.31k|			{
  934|  2.31k|				id = lr->lr_msgid;
  935|  2.31k|				tag = lr->lr_res_msgtype;
  936|  2.31k|				Debug2( LDAP_DEBUG_TRACE, "request done: ld %p msgid %d\n",
  ------------------
  |  |   97|  2.31k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  2.31k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.31k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  2.31k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 2.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|  2.31k|	ldap_log_printf( NULL, (level), fmt, arg1, arg2 ); \
  |  |   99|  2.31k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (99:12): [Folded, False: 2.31k]
  |  |  ------------------
  ------------------
  937|  2.31k|					(void *)ld, id );
  938|  2.31k|				Debug3( LDAP_DEBUG_TRACE,
  ------------------
  |  |  102|  2.31k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  2.31k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.31k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  2.31k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 2.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  2.31k|	ldap_log_printf( NULL, (level), fmt, arg1, arg2, arg3 ); \
  |  |  ------------------
  |  |  |  Branch (103:45): [True: 0, False: 0]
  |  |  |  Branch (103:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|  2.31k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (104:12): [Folded, False: 2.31k]
  |  |  ------------------
  ------------------
  939|  2.31k|					"res_errno: %d, res_error: <%s>, "
  940|  2.31k|					"res_matched: <%s>\n",
  941|  2.31k|					lr->lr_res_errno,
  942|  2.31k|					lr->lr_res_error ? lr->lr_res_error : "",
  943|  2.31k|					lr->lr_res_matched ? lr->lr_res_matched : "" );
  944|  2.31k|				if ( !simple_request ) {
  ------------------
  |  Branch (944:10): [True: 0, False: 2.31k]
  ------------------
  945|      0|					ber_free( ber, 1 );
  946|      0|					ber = NULL;
  947|      0|					if ( build_result_ber( ld, &ber, lr )
  ------------------
  |  Branch (947:11): [True: 0, False: 0]
  ------------------
  948|      0|					    == LBER_ERROR )
  ------------------
  |  |   79|      0|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  949|      0|					{
  950|      0|						rc = -1; /* fatal error */
  951|      0|					}
  952|      0|				}
  953|       |
  954|  2.31k|				if ( lr != &dummy_lr ) {
  ------------------
  |  Branch (954:10): [True: 2.12k, False: 185]
  ------------------
  955|  2.12k|					ldap_return_request( ld, lr, 1 );
  956|  2.12k|				} else {
  957|    185|					if ( lr->lr_res_matched ) {
  ------------------
  |  Branch (957:11): [True: 62, False: 123]
  ------------------
  958|     62|						LDAP_FREE( lr->lr_res_matched );
  ------------------
  |  |  648|     62|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  959|     62|					}
  960|    185|					if ( lr->lr_res_error ) {
  ------------------
  |  Branch (960:11): [True: 14, False: 171]
  ------------------
  961|     14|						LDAP_FREE( lr->lr_res_error );
  ------------------
  |  |  648|     14|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  962|     14|					}
  963|    185|				}
  964|  2.31k|				lr = NULL;
  965|  2.31k|			}
  966|       |
  967|       |			/*
  968|       |			 * RFC 4511 unsolicited (id == 0) responses
  969|       |			 * shouldn't necessarily end the connection
  970|       |			 */
  971|  2.31k|			if ( lc != NULL && id != 0 &&
  ------------------
  |  Branch (971:9): [True: 2.31k, False: 0]
  |  Branch (971:23): [True: 2.12k, False: 185]
  ------------------
  972|  2.12k|			     !LDAP_BOOL_GET( &ld->ld_options, LDAP_BOOL_KEEPCONN )) {
  ------------------
  |  |  157|  2.12k|	((lo)->ldo_booleans & LDAP_BOOL(bool) ? -1 : 0)
  |  |  ------------------
  |  |  |  |  155|  2.12k|#define LDAP_BOOL(n)	((LDAP_BOOLEANS)1 << (n))
  |  |  ------------------
  |  |  |  Branch (157:3): [True: 0, False: 2.12k]
  |  |  ------------------
  ------------------
  |  Branch (972:9): [True: 2.12k, False: 0]
  ------------------
  973|  2.12k|				--lc->lconn_refcnt;
  974|  2.12k|				lc = NULL;
  975|  2.12k|			}
  976|  2.31k|		}
  977|  2.31k|	}
  978|       |
  979|  2.77k|	if ( lr != NULL ) {
  ------------------
  |  Branch (979:7): [True: 467, False: 2.31k]
  ------------------
  980|    467|		if ( lr != &dummy_lr ) {
  ------------------
  |  Branch (980:8): [True: 467, False: 0]
  ------------------
  981|    467|			ldap_return_request( ld, lr, 0 );
  982|    467|		}
  983|    467|		lr = NULL;
  984|    467|	}
  985|       |
  986|  2.77k|	if ( ber == NULL ) {
  ------------------
  |  Branch (986:7): [True: 0, False: 2.77k]
  ------------------
  987|      0|		return( rc );
  988|      0|	}
  989|       |
  990|       |	/* try to handle unsolicited responses as appropriate */
  991|  2.77k|	if ( id == 0 && msgid > LDAP_RES_UNSOLICITED ) {
  ------------------
  |  |  549|    185|#define LDAP_RES_UNSOLICITED	(0)
  ------------------
  |  Branch (991:7): [True: 185, False: 2.59k]
  |  Branch (991:18): [True: 183, False: 2]
  ------------------
  992|    183|		int	is_nod = 0;
  993|       |
  994|    183|		tag = ber_peek_tag( &tmpber, &len );
  995|       |
  996|       |		/* we have a res oid */
  997|    183|		if ( tag == LDAP_TAG_EXOP_RES_OID ) {
  ------------------
  |  |  511|    183|#define LDAP_TAG_EXOP_RES_OID   ((ber_tag_t) 0x8aU)	/* context specific + primitive */
  ------------------
  |  Branch (997:8): [True: 58, False: 125]
  ------------------
  998|     58|			static struct berval	bv_nod = BER_BVC( LDAP_NOTICE_OF_DISCONNECTION );
  ------------------
  |  |  205|     58|#define BER_BVC(s)		{ BER_STRLENOF(s), (char *)(s) }
  |  |  ------------------
  |  |  |  |  204|     58|#define BER_STRLENOF(s)	(sizeof(s)-1)
  |  |  ------------------
  ------------------
  999|     58|			struct berval		resoid = BER_BVNULL;
  ------------------
  |  |  206|     58|#define BER_BVNULL		{ 0L, NULL }
  ------------------
 1000|       |
 1001|     58|			if (( ber_scanf( &tmpber, "m", &resoid ) == LBER_ERROR ) ||
  ------------------
  |  |   79|     58|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  |  Branch (1001:8): [True: 0, False: 58]
  ------------------
 1002|     58|				BER_BVISEMPTY( &resoid )) {
  ------------------
  |  |  218|     58|#define BER_BVISEMPTY(bv)	((bv)->bv_len == 0)
  |  |  ------------------
  |  |  |  Branch (218:27): [True: 3, False: 55]
  |  |  ------------------
  ------------------
 1003|      3|				ld->ld_errno = LDAP_DECODING_ERROR;
  ------------------
  |  |  739|      3|#define LDAP_DECODING_ERROR				(-4)
  ------------------
 1004|      3|				ber_free( ber, 1 );
 1005|      3|				return -1;
 1006|      3|			}
 1007|       |
 1008|     55|			is_nod = ber_bvcmp( &resoid, &bv_nod ) == 0;
  ------------------
  |  |  675|     55|	((v1)->bv_len < (v2)->bv_len \
  |  |  ------------------
  |  |  |  Branch (675:3): [True: 3, False: 52]
  |  |  ------------------
  |  |  676|     55|		? -1 : ((v1)->bv_len > (v2)->bv_len \
  |  |  ------------------
  |  |  |  Branch (676:11): [True: 1, False: 51]
  |  |  ------------------
  |  |  677|     52|			? 1 : memcmp((v1)->bv_val, (v2)->bv_val, (v1)->bv_len) ))
  ------------------
 1009|       |
 1010|     55|			tag = ber_peek_tag( &tmpber, &len );
 1011|     55|		}
 1012|       |
 1013|       |#if 0 /* don't need right now */
 1014|       |		/* we have res data */
 1015|       |		if ( tag == LDAP_TAG_EXOP_RES_VALUE ) {
 1016|       |			struct berval resdata;
 1017|       |
 1018|       |			if ( ber_scanf( &tmpber, "m", &resdata ) == LBER_ERROR ) {
 1019|       |				ld->ld_errno = LDAP_DECODING_ERROR;
 1020|       |				ber_free( ber, 0 );
 1021|       |				return ld->ld_errno;
 1022|       |			}
 1023|       |
 1024|       |			/* use it... */
 1025|       |		}
 1026|       |#endif
 1027|       |
 1028|       |		/* handle RFC 4511 "Notice of Disconnection" locally */
 1029|       |
 1030|    180|		if ( is_nod ) {
  ------------------
  |  Branch (1030:8): [True: 48, False: 132]
  ------------------
 1031|     48|			if ( tag == LDAP_TAG_EXOP_RES_VALUE ) {
  ------------------
  |  |  512|     48|#define LDAP_TAG_EXOP_RES_VALUE ((ber_tag_t) 0x8bU)	/* context specific + primitive */
  ------------------
  |  Branch (1031:9): [True: 1, False: 47]
  ------------------
 1032|      1|				ld->ld_errno = LDAP_DECODING_ERROR;
  ------------------
  |  |  739|      1|#define LDAP_DECODING_ERROR				(-4)
  ------------------
 1033|      1|				ber_free( ber, 1 );
 1034|      1|				return -1;
 1035|      1|			}
 1036|       |
 1037|       |			/* get rid of the connection... */
 1038|     47|			if ( lc != NULL &&
  ------------------
  |  Branch (1038:9): [True: 47, False: 0]
  ------------------
 1039|     47|			     !LDAP_BOOL_GET( &ld->ld_options, LDAP_BOOL_KEEPCONN )) {
  ------------------
  |  |  157|     47|	((lo)->ldo_booleans & LDAP_BOOL(bool) ? -1 : 0)
  |  |  ------------------
  |  |  |  |  155|     47|#define LDAP_BOOL(n)	((LDAP_BOOLEANS)1 << (n))
  |  |  ------------------
  |  |  |  Branch (157:3): [True: 0, False: 47]
  |  |  ------------------
  ------------------
  |  Branch (1039:9): [True: 47, False: 0]
  ------------------
 1040|     47|				--lc->lconn_refcnt;
 1041|     47|			}
 1042|       |
 1043|       |			/* need to return -1, because otherwise
 1044|       |			 * a valid result is expected */
 1045|     47|			ld->ld_errno = lderr;
 1046|     47|			return -1;
 1047|     48|		}
 1048|    180|	}
 1049|       |
 1050|       |	/* make a new ldap message */
 1051|  2.72k|	newmsg = (LDAPMessage *) LDAP_CALLOC( 1, sizeof(LDAPMessage) );
  ------------------
  |  |  646|  2.72k|#define LDAP_CALLOC(n,s)	(ber_memcalloc_x((n),(s),NULL))
  ------------------
 1052|  2.72k|	if ( newmsg == NULL ) {
  ------------------
  |  Branch (1052:7): [True: 0, False: 2.72k]
  ------------------
 1053|      0|		ld->ld_errno = LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
 1054|      0|		return( -1 );
 1055|      0|	}
 1056|  2.72k|	newmsg->lm_msgid = (int)id;
 1057|  2.72k|	newmsg->lm_msgtype = tag;
 1058|  2.72k|	newmsg->lm_ber = ber;
 1059|  2.72k|	newmsg->lm_chain_tail = newmsg;
 1060|       |
 1061|       |#ifdef LDAP_CONNECTIONLESS
 1062|       |	/* CLDAP replies all fit in a single datagram. In LDAPv2 RFC1798
 1063|       |	 * the responses are all a sequence wrapped in one message. In
 1064|       |	 * LDAPv3 each response is in its own message. The datagram must
 1065|       |	 * end with a SearchResult. We can't just parse each response in
 1066|       |	 * separate calls to try_read1msg because the header info is only
 1067|       |	 * present at the beginning of the datagram, not at the beginning
 1068|       |	 * of each response. So parse all the responses at once and queue
 1069|       |	 * them up, then pull off the first response to return to the
 1070|       |	 * caller when all parsing is complete.
 1071|       |	 */
 1072|       |	if ( LDAP_IS_UDP(ld) ) {
 1073|       |		/* If not a result, look for more */
 1074|       |		if ( tag != LDAP_RES_SEARCH_RESULT ) {
 1075|       |			int ok = 0;
 1076|       |			moremsgs = 1;
 1077|       |			if (isv2) {
 1078|       |				/* LDAPv2: dup the current ber, skip past the current
 1079|       |				 * response, and see if there are any more after it.
 1080|       |				 */
 1081|       |				ber = ber_dup( ber );
 1082|       |				ber_scanf( ber, "x" );
 1083|       |				if ( ber_peek_tag( ber, &len ) != LBER_DEFAULT ) {
 1084|       |					/* There's more - dup the ber buffer so they can all be
 1085|       |					 * individually freed by ldap_msgfree.
 1086|       |					 */
 1087|       |					struct berval bv;
 1088|       |					ber_get_option( ber, LBER_OPT_BER_REMAINING_BYTES, &len );
 1089|       |					bv.bv_val = LDAP_MALLOC( len );
 1090|       |					if ( bv.bv_val ) {
 1091|       |						ok = 1;
 1092|       |						ber_read( ber, bv.bv_val, len );
 1093|       |						bv.bv_len = len;
 1094|       |						ber_init2( ber, &bv, ld->ld_lberoptions );
 1095|       |					}
 1096|       |				}
 1097|       |			} else {
 1098|       |				/* LDAPv3: Just allocate a new ber. Since this is a buffered
 1099|       |				 * datagram, if the sockbuf is readable we still have data
 1100|       |				 * to parse.
 1101|       |				 */
 1102|       |				ber = ldap_alloc_ber_with_options( ld );
 1103|       |				if ( ber == NULL ) {
 1104|       |					ld->ld_errno = LDAP_NO_MEMORY;
 1105|       |					return -1;
 1106|       |				}
 1107|       |
 1108|       |				if ( ber_sockbuf_ctrl( lc->lconn_sb, LBER_SB_OPT_DATA_READY, NULL ) ) ok = 1;
 1109|       |			}
 1110|       |			/* set up response chain */
 1111|       |			if ( tmp == NULL ) {
 1112|       |				newmsg->lm_next = ld->ld_responses;
 1113|       |				ld->ld_responses = newmsg;
 1114|       |				chain_head = newmsg;
 1115|       |			} else {
 1116|       |				tmp->lm_chain = newmsg;
 1117|       |			}
 1118|       |			chain_head->lm_chain_tail = newmsg;
 1119|       |			tmp = newmsg;
 1120|       |			/* "ok" means there's more to parse */
 1121|       |			if ( ok ) {
 1122|       |				if ( isv2 ) {
 1123|       |					goto nextresp2;
 1124|       |
 1125|       |				} else {
 1126|       |					goto nextresp3;
 1127|       |				}
 1128|       |			} else {
 1129|       |				/* got to end of datagram without a SearchResult. Free
 1130|       |				 * our dup'd ber, but leave any buffer alone. For v2 case,
 1131|       |				 * the previous response is still using this buffer. For v3,
 1132|       |				 * the new ber has no buffer to free yet.
 1133|       |				 */
 1134|       |				ber_free( ber, 0 );
 1135|       |				return -1;
 1136|       |			}
 1137|       |		} else if ( moremsgs ) {
 1138|       |		/* got search result, and we had multiple responses in 1 datagram.
 1139|       |		 * stick the result onto the end of the chain, and then pull the
 1140|       |		 * first response off the head of the chain.
 1141|       |		 */
 1142|       |			tmp->lm_chain = newmsg;
 1143|       |			chain_head->lm_chain_tail = newmsg;
 1144|       |			*result = chkResponseList( ld, msgid, all );
 1145|       |			ld->ld_errno = LDAP_SUCCESS;
 1146|       |			return( (*result)->lm_msgtype );
 1147|       |		}
 1148|       |	}
 1149|       |#endif /* LDAP_CONNECTIONLESS */
 1150|       |
 1151|       |	/* is this the one we're looking for? */
 1152|  2.72k|	if ( msgid == LDAP_RES_ANY || id == msgid ) {
  ------------------
  |  |  548|  5.45k|#define LDAP_RES_ANY			(-1)
  ------------------
  |  Branch (1152:7): [True: 0, False: 2.72k]
  |  Branch (1152:32): [True: 2.59k, False: 134]
  ------------------
 1153|  2.59k|		if ( msgid == LDAP_RES_ANY && all == LDAP_MSG_RECEIVED ) {
  ------------------
  |  |  548|  5.18k|#define LDAP_RES_ANY			(-1)
  ------------------
              		if ( msgid == LDAP_RES_ANY && all == LDAP_MSG_RECEIVED ) {
  ------------------
  |  |  805|      0|#define LDAP_MSG_RECEIVED		0x02
  ------------------
  |  Branch (1153:8): [True: 0, False: 2.59k]
  |  Branch (1153:33): [True: 0, False: 0]
  ------------------
 1154|       |			/* ITS#10229: We want to keep going so long as there's anything to
 1155|       |			 * read. */
 1156|  2.59k|		} else if ( all == LDAP_MSG_ONE
  ------------------
  |  |  803|  5.18k|#define LDAP_MSG_ONE			0x00
  ------------------
  |  Branch (1156:15): [True: 2.59k, False: 0]
  ------------------
 1157|      0|			|| ( newmsg->lm_msgtype != LDAP_RES_SEARCH_RESULT
  ------------------
  |  |  537|      0|#define LDAP_RES_SEARCH_RESULT	((ber_tag_t) 0x65U)	/* application + constructed */
  ------------------
  |  Branch (1157:9): [True: 0, False: 0]
  ------------------
 1158|      0|				&& newmsg->lm_msgtype != LDAP_RES_SEARCH_ENTRY
  ------------------
  |  |  535|      0|#define LDAP_RES_SEARCH_ENTRY	((ber_tag_t) 0x64U)	/* application + constructed */
  ------------------
  |  Branch (1158:8): [True: 0, False: 0]
  ------------------
 1159|      0|				&& newmsg->lm_msgtype != LDAP_RES_INTERMEDIATE
  ------------------
  |  |  546|      0|#define LDAP_RES_INTERMEDIATE	((ber_tag_t) 0x79U) /* V3+: application + constructed */
  ------------------
  |  Branch (1159:8): [True: 0, False: 0]
  ------------------
 1160|      0|			  	&& newmsg->lm_msgtype != LDAP_RES_SEARCH_REFERENCE ) )
  ------------------
  |  |  536|      0|#define LDAP_RES_SEARCH_REFERENCE	((ber_tag_t) 0x73U)	/* V3: application + constructed */
  ------------------
  |  Branch (1160:10): [True: 0, False: 0]
  ------------------
 1161|  2.59k|		{
 1162|  2.59k|			*result = newmsg;
 1163|  2.59k|			ld->ld_errno = LDAP_SUCCESS;
  ------------------
  |  |  610|  2.59k|#define LDAP_SUCCESS				0x00
  ------------------
 1164|  2.59k|			return( tag );
 1165|       |
 1166|  2.59k|		} else if ( newmsg->lm_msgtype == LDAP_RES_SEARCH_RESULT) {
  ------------------
  |  |  537|      0|#define LDAP_RES_SEARCH_RESULT	((ber_tag_t) 0x65U)	/* application + constructed */
  ------------------
  |  Branch (1166:15): [True: 0, False: 0]
  ------------------
 1167|      0|			foundit = 1;	/* return the chain later */
 1168|      0|		}
 1169|  2.59k|	}
 1170|       |
 1171|       |	/* 
 1172|       |	 * if not, we must add it to the list of responses.  if
 1173|       |	 * the msgid is already there, it must be part of an existing
 1174|       |	 * search response.
 1175|       |	 */
 1176|       |
 1177|    134|	prev = NULL;
 1178|    134|	for ( l = ld->ld_responses; l != NULL; l = l->lm_next ) {
  ------------------
  |  |  455|    134|#define	ld_responses		ldc->ldc_responses
  ------------------
  |  Branch (1178:30): [True: 7, False: 127]
  ------------------
 1179|      7|		if ( l->lm_msgid == newmsg->lm_msgid ) {
  ------------------
  |  Branch (1179:8): [True: 7, False: 0]
  ------------------
 1180|      7|			break;
 1181|      7|		}
 1182|      0|		prev = l;
 1183|      0|	}
 1184|       |
 1185|       |	/* not part of an existing search response */
 1186|    134|	if ( l == NULL ) {
  ------------------
  |  Branch (1186:7): [True: 127, False: 7]
  ------------------
 1187|    127|		if ( foundit ) {
  ------------------
  |  Branch (1187:8): [True: 0, False: 127]
  ------------------
 1188|      0|			*result = newmsg;
 1189|      0|			goto exit;
 1190|      0|		}
 1191|       |
 1192|    127|		newmsg->lm_next = ld->ld_responses;
  ------------------
  |  |  455|    127|#define	ld_responses		ldc->ldc_responses
  ------------------
 1193|    127|		ld->ld_responses = newmsg;
  ------------------
  |  |  455|    127|#define	ld_responses		ldc->ldc_responses
  ------------------
 1194|    127|		goto exit;
 1195|    127|	}
 1196|       |
 1197|      7|	Debug3( LDAP_DEBUG_TRACE, "adding response ld %p msgid %d type %ld:\n",
  ------------------
  |  |  102|      7|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      7|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      7|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      7|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 7]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|      7|	ldap_log_printf( NULL, (level), fmt, arg1, arg2, arg3 ); \
  |  |  104|      7|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (104:12): [Folded, False: 7]
  |  |  ------------------
  ------------------
 1198|      7|		(void *)ld, newmsg->lm_msgid, (long) newmsg->lm_msgtype );
 1199|       |
 1200|       |	/* part of a search response - add to end of list of entries */
 1201|      7|	l->lm_chain_tail->lm_chain = newmsg;
 1202|      7|	l->lm_chain_tail = newmsg;
 1203|       |
 1204|       |	/* return the whole chain if that's what we were looking for */
 1205|      7|	if ( foundit ) {
  ------------------
  |  Branch (1205:7): [True: 0, False: 7]
  ------------------
 1206|      0|		if ( prev == NULL ) {
  ------------------
  |  Branch (1206:8): [True: 0, False: 0]
  ------------------
 1207|      0|			ld->ld_responses = l->lm_next;
  ------------------
  |  |  455|      0|#define	ld_responses		ldc->ldc_responses
  ------------------
 1208|      0|		} else {
 1209|      0|			prev->lm_next = l->lm_next;
 1210|      0|		}
 1211|      0|		*result = l;
 1212|      0|	}
 1213|       |
 1214|    134|exit:
 1215|    134|	if ( foundit ) {
  ------------------
  |  Branch (1215:7): [True: 0, False: 134]
  ------------------
 1216|      0|		ld->ld_errno = LDAP_SUCCESS;
  ------------------
  |  |  610|      0|#define LDAP_SUCCESS				0x00
  ------------------
 1217|      0|		return( tag );
 1218|      0|	}
 1219|    134|	if ( lc && ber_sockbuf_ctrl( lc->lconn_sb, LBER_SB_OPT_DATA_READY, NULL ) ) {
  ------------------
  |  |  139|    133|#define LBER_SB_OPT_DATA_READY		8
  ------------------
  |  Branch (1219:7): [True: 133, False: 1]
  |  Branch (1219:13): [True: 0, False: 133]
  ------------------
 1220|      0|		goto retry;
 1221|      0|	}
 1222|    134|	return( LDAP_MSG_X_KEEP_LOOKING );	/* continue looking */
  ------------------
  |  |   79|    134|#define LDAP_MSG_X_KEEP_LOOKING		(-2)
  ------------------
 1223|    134|}

ldap_build_bind_req:
   56|  3.07k|{
   57|  3.07k|	BerElement	*ber;
   58|  3.07k|	int rc;
   59|       |
   60|  3.07k|	if( mechanism == LDAP_SASL_SIMPLE ) {
  ------------------
  |  |  553|  3.07k|#define LDAP_SASL_SIMPLE	((char*)0)
  ------------------
  |  Branch (60:6): [True: 3.07k, False: 0]
  ------------------
   61|  3.07k|		if( dn == NULL && cred != NULL && cred->bv_len ) {
  ------------------
  |  Branch (61:7): [True: 2.99k, False: 74]
  |  Branch (61:21): [True: 2.99k, False: 0]
  |  Branch (61:37): [True: 0, False: 2.99k]
  ------------------
   62|       |			/* use default binddn */
   63|      0|			dn = ld->ld_defbinddn;
  ------------------
  |  |  493|      0|#define ld_defbinddn		ld_options.ldo_defbinddn
  |  |  ------------------
  |  |  |  |  484|      0|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
   64|      0|		}
   65|       |
   66|  3.07k|	} else if( ld->ld_version < LDAP_VERSION3 ) {
  ------------------
  |  |  509|      0|#define ld_version		ld_options.ldo_version
  |  |  ------------------
  |  |  |  |  484|      0|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
              	} else if( ld->ld_version < LDAP_VERSION3 ) {
  ------------------
  |  |   39|      0|#define LDAP_VERSION3	3
  ------------------
  |  Branch (66:13): [True: 0, False: 0]
  ------------------
   67|      0|		ld->ld_errno = LDAP_NOT_SUPPORTED;
  ------------------
  |  |  747|      0|#define LDAP_NOT_SUPPORTED				(-12)
  ------------------
   68|      0|		return( NULL );
   69|      0|	}
   70|       |
   71|  3.07k|	if ( dn == NULL ) {
  ------------------
  |  Branch (71:7): [True: 2.99k, False: 74]
  ------------------
   72|  2.99k|		dn = "";
   73|  2.99k|	}
   74|       |
   75|       |	/* create a message to send */
   76|  3.07k|	if ( (ber = ldap_alloc_ber_with_options( ld )) == NULL ) {
  ------------------
  |  Branch (76:7): [True: 0, False: 3.07k]
  ------------------
   77|      0|		return( NULL );
   78|      0|	}
   79|       |
   80|  3.07k|	LDAP_NEXT_MSGID( ld, *msgidp );
  ------------------
  |  |  561|  3.07k|#define	LDAP_NEXT_MSGID(ld, id) do { \
  |  |  562|  3.07k|	LDAP_MUTEX_LOCK( &(ld)->ld_msgid_mutex ); \
  |  |  ------------------
  |  |  |  |  551|  3.07k|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  |  |  ------------------
  |  |  563|  3.07k|	(id) = ++(ld)->ld_msgid; \
  |  |  ------------------
  |  |  |  |  447|  3.07k|#define	ld_msgid		ldc->ldc_msgid
  |  |  ------------------
  |  |  564|  3.07k|	LDAP_MUTEX_UNLOCK( &(ld)->ld_msgid_mutex ); \
  |  |  ------------------
  |  |  |  |  552|  3.07k|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  |  |  ------------------
  |  |  565|  3.07k|} while (0)
  |  |  ------------------
  |  |  |  Branch (565:10): [Folded, False: 3.07k]
  |  |  ------------------
  ------------------
   81|  3.07k|	if( mechanism == LDAP_SASL_SIMPLE ) {
  ------------------
  |  |  553|  3.07k|#define LDAP_SASL_SIMPLE	((char*)0)
  ------------------
  |  Branch (81:6): [True: 3.07k, False: 0]
  ------------------
   82|       |		/* simple bind */
   83|  3.07k|		rc = ber_printf( ber, "{it{istON}" /*}*/,
   84|  3.07k|			*msgidp, LDAP_REQ_BIND,
  ------------------
  |  |  520|  3.07k|#define LDAP_REQ_BIND		((ber_tag_t) 0x60U)	/* application + constructed */
  ------------------
   85|  3.07k|			ld->ld_version, dn, LDAP_AUTH_SIMPLE,
  ------------------
  |  |  509|  3.07k|#define ld_version		ld_options.ldo_version
  |  |  ------------------
  |  |  |  |  484|  3.07k|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
              			ld->ld_version, dn, LDAP_AUTH_SIMPLE,
  ------------------
  |  |  559|  3.07k|#define LDAP_AUTH_SIMPLE ((ber_tag_t) 0x80U) /* context specific + primitive */
  ------------------
   86|  3.07k|			cred );
   87|       |		
   88|  3.07k|	} else if ( cred == NULL || cred->bv_val == NULL ) {
  ------------------
  |  Branch (88:14): [True: 0, False: 0]
  |  Branch (88:30): [True: 0, False: 0]
  ------------------
   89|       |		/* SASL bind w/o credentials */
   90|      0|		rc = ber_printf( ber, "{it{ist{sN}N}" /*}*/,
   91|      0|			*msgidp, LDAP_REQ_BIND,
  ------------------
  |  |  520|      0|#define LDAP_REQ_BIND		((ber_tag_t) 0x60U)	/* application + constructed */
  ------------------
   92|      0|			ld->ld_version, dn, LDAP_AUTH_SASL,
  ------------------
  |  |  509|      0|#define ld_version		ld_options.ldo_version
  |  |  ------------------
  |  |  |  |  484|      0|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
              			ld->ld_version, dn, LDAP_AUTH_SASL,
  ------------------
  |  |  560|      0|#define LDAP_AUTH_SASL   ((ber_tag_t) 0xa3U) /* context specific + constructed */
  ------------------
   93|      0|			mechanism );
   94|       |
   95|      0|	} else {
   96|       |		/* SASL bind w/ credentials */
   97|      0|		rc = ber_printf( ber, "{it{ist{sON}N}" /*}*/,
   98|      0|			*msgidp, LDAP_REQ_BIND,
  ------------------
  |  |  520|      0|#define LDAP_REQ_BIND		((ber_tag_t) 0x60U)	/* application + constructed */
  ------------------
   99|      0|			ld->ld_version, dn, LDAP_AUTH_SASL,
  ------------------
  |  |  509|      0|#define ld_version		ld_options.ldo_version
  |  |  ------------------
  |  |  |  |  484|      0|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
              			ld->ld_version, dn, LDAP_AUTH_SASL,
  ------------------
  |  |  560|      0|#define LDAP_AUTH_SASL   ((ber_tag_t) 0xa3U) /* context specific + constructed */
  ------------------
  100|      0|			mechanism, cred );
  101|      0|	}
  102|       |
  103|  3.07k|	if( rc == -1 ) {
  ------------------
  |  Branch (103:6): [True: 0, False: 3.07k]
  ------------------
  104|      0|		ld->ld_errno = LDAP_ENCODING_ERROR;
  ------------------
  |  |  738|      0|#define LDAP_ENCODING_ERROR				(-3)
  ------------------
  105|      0|		ber_free( ber, 1 );
  106|      0|		return( NULL );
  107|      0|	}
  108|       |
  109|       |	/* Put Server Controls */
  110|  3.07k|	if( ldap_int_put_controls( ld, sctrls, ber ) != LDAP_SUCCESS ) {
  ------------------
  |  |  610|  3.07k|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (110:6): [True: 0, False: 3.07k]
  ------------------
  111|      0|		ber_free( ber, 1 );
  112|      0|		return( NULL );
  113|      0|	}
  114|       |
  115|  3.07k|	if ( ber_printf( ber, /*{*/ "N}" ) == -1 ) {
  ------------------
  |  Branch (115:7): [True: 0, False: 3.07k]
  ------------------
  116|      0|		ld->ld_errno = LDAP_ENCODING_ERROR;
  ------------------
  |  |  738|      0|#define LDAP_ENCODING_ERROR				(-3)
  ------------------
  117|      0|		ber_free( ber, 1 );
  118|      0|		return( NULL );
  119|      0|	}
  120|       |
  121|  3.07k|	return( ber );
  122|  3.07k|}
ldap_sasl_bind:
  144|  3.07k|{
  145|  3.07k|	BerElement	*ber;
  146|  3.07k|	int rc;
  147|  3.07k|	ber_int_t id;
  148|       |
  149|  3.07k|	Debug0( LDAP_DEBUG_TRACE, "ldap_sasl_bind\n" );
  ------------------
  |  |   87|  3.07k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  3.07k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  3.07k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  3.07k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 3.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|  3.07k|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|  3.07k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 3.07k]
  |  |  ------------------
  ------------------
  150|       |
  151|  3.07k|	assert( ld != NULL );
  ------------------
  |  Branch (151:2): [True: 0, False: 3.07k]
  |  Branch (151:2): [True: 3.07k, False: 0]
  ------------------
  152|  3.07k|	assert( LDAP_VALID( ld ) );
  ------------------
  |  Branch (152:2): [True: 0, False: 3.07k]
  |  Branch (152:2): [True: 3.07k, False: 0]
  ------------------
  153|  3.07k|	assert( msgidp != NULL );
  ------------------
  |  Branch (153:2): [True: 0, False: 3.07k]
  |  Branch (153:2): [True: 3.07k, False: 0]
  ------------------
  154|       |
  155|       |	/* check client controls */
  156|  3.07k|	rc = ldap_int_client_controls( ld, cctrls );
  157|  3.07k|	if( rc != LDAP_SUCCESS ) return rc;
  ------------------
  |  |  610|  3.07k|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (157:6): [True: 0, False: 3.07k]
  ------------------
  158|       |
  159|  3.07k|	ber = ldap_build_bind_req( ld, dn, mechanism, cred, sctrls, cctrls, &id );
  160|  3.07k|	if( !ber )
  ------------------
  |  Branch (160:6): [True: 0, False: 3.07k]
  ------------------
  161|      0|		return ld->ld_errno;
  162|       |
  163|       |	/* send the message */
  164|  3.07k|	*msgidp = ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber, id );
  ------------------
  |  |  520|  3.07k|#define LDAP_REQ_BIND		((ber_tag_t) 0x60U)	/* application + constructed */
  ------------------
  165|       |
  166|  3.07k|	if(*msgidp < 0)
  ------------------
  |  Branch (166:5): [True: 0, False: 3.07k]
  ------------------
  167|      0|		return ld->ld_errno;
  168|       |
  169|  3.07k|	return LDAP_SUCCESS;
  ------------------
  |  |  610|  3.07k|#define LDAP_SUCCESS				0x00
  ------------------
  170|  3.07k|}
ldap_parse_sasl_bind_result:
  262|  1.48k|{
  263|  1.48k|	ber_int_t errcode;
  264|  1.48k|	struct berval* scred;
  265|       |
  266|  1.48k|	ber_tag_t tag;
  267|  1.48k|	BerElement	*ber;
  268|       |
  269|  1.48k|	Debug0( LDAP_DEBUG_TRACE, "ldap_parse_sasl_bind_result\n" );
  ------------------
  |  |   87|  1.48k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  1.48k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  1.48k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  1.48k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 1.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|  1.48k|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|  1.48k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 1.48k]
  |  |  ------------------
  ------------------
  270|       |
  271|  1.48k|	assert( ld != NULL );
  ------------------
  |  Branch (271:2): [True: 0, False: 1.48k]
  |  Branch (271:2): [True: 1.48k, False: 0]
  ------------------
  272|  1.48k|	assert( LDAP_VALID( ld ) );
  ------------------
  |  Branch (272:2): [True: 0, False: 1.48k]
  |  Branch (272:2): [True: 1.48k, False: 0]
  ------------------
  273|  1.48k|	assert( res != NULL );
  ------------------
  |  Branch (273:2): [True: 0, False: 1.48k]
  |  Branch (273:2): [True: 1.48k, False: 0]
  ------------------
  274|       |
  275|  1.48k|	if( servercredp != NULL ) {
  ------------------
  |  Branch (275:6): [True: 1.48k, False: 0]
  ------------------
  276|  1.48k|		if( ld->ld_version < LDAP_VERSION2 ) {
  ------------------
  |  |  509|  1.48k|#define ld_version		ld_options.ldo_version
  |  |  ------------------
  |  |  |  |  484|  1.48k|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
              		if( ld->ld_version < LDAP_VERSION2 ) {
  ------------------
  |  |   38|  1.48k|#define LDAP_VERSION2	2
  ------------------
  |  Branch (276:7): [True: 0, False: 1.48k]
  ------------------
  277|      0|			return LDAP_NOT_SUPPORTED;
  ------------------
  |  |  747|      0|#define LDAP_NOT_SUPPORTED				(-12)
  ------------------
  278|      0|		}
  279|  1.48k|		*servercredp = NULL;
  280|  1.48k|	}
  281|       |
  282|  1.48k|	if( res->lm_msgtype != LDAP_RES_BIND ) {
  ------------------
  |  |  534|  1.48k|#define LDAP_RES_BIND		((ber_tag_t) 0x61U)	/* application + constructed */
  ------------------
  |  Branch (282:6): [True: 200, False: 1.28k]
  ------------------
  283|    200|		ld->ld_errno = LDAP_PARAM_ERROR;
  ------------------
  |  |  744|    200|#define LDAP_PARAM_ERROR				(-9)
  ------------------
  284|    200|		return ld->ld_errno;
  285|    200|	}
  286|       |
  287|  1.28k|	scred = NULL;
  288|       |
  289|  1.28k|	if ( ld->ld_error ) {
  ------------------
  |  Branch (289:7): [True: 340, False: 942]
  ------------------
  290|    340|		LDAP_FREE( ld->ld_error );
  ------------------
  |  |  648|    340|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  291|    340|		ld->ld_error = NULL;
  292|    340|	}
  293|  1.28k|	if ( ld->ld_matched ) {
  ------------------
  |  Branch (293:7): [True: 470, False: 812]
  ------------------
  294|    470|		LDAP_FREE( ld->ld_matched );
  ------------------
  |  |  648|    470|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  295|    470|		ld->ld_matched = NULL;
  296|    470|	}
  297|       |
  298|       |	/* parse results */
  299|       |
  300|  1.28k|	ber = ber_dup( res->lm_ber );
  301|       |
  302|  1.28k|	if( ber == NULL ) {
  ------------------
  |  Branch (302:6): [True: 0, False: 1.28k]
  ------------------
  303|      0|		ld->ld_errno = LDAP_NO_MEMORY;
  ------------------
  |  |  745|      0|#define LDAP_NO_MEMORY					(-10)
  ------------------
  304|      0|		return ld->ld_errno;
  305|      0|	}
  306|       |
  307|  1.28k|	if ( ld->ld_version < LDAP_VERSION2 ) {
  ------------------
  |  |  509|  1.28k|#define ld_version		ld_options.ldo_version
  |  |  ------------------
  |  |  |  |  484|  1.28k|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
              	if ( ld->ld_version < LDAP_VERSION2 ) {
  ------------------
  |  |   38|  1.28k|#define LDAP_VERSION2	2
  ------------------
  |  Branch (307:7): [True: 0, False: 1.28k]
  ------------------
  308|      0|		tag = ber_scanf( ber, "{iA}",
  309|      0|			&errcode, &ld->ld_error );
  310|       |
  311|      0|		if( tag == LBER_ERROR ) {
  ------------------
  |  |   79|      0|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  |  Branch (311:7): [True: 0, False: 0]
  ------------------
  312|      0|			ber_free( ber, 0 );
  313|      0|			ld->ld_errno = LDAP_DECODING_ERROR;
  ------------------
  |  |  739|      0|#define LDAP_DECODING_ERROR				(-4)
  ------------------
  314|      0|			return ld->ld_errno;
  315|      0|		}
  316|       |
  317|  1.28k|	} else {
  318|  1.28k|		ber_len_t len;
  319|       |
  320|  1.28k|		tag = ber_scanf( ber, "{eAA" /*}*/,
  321|  1.28k|			&errcode, &ld->ld_matched, &ld->ld_error );
  322|       |
  323|  1.28k|		if( tag == LBER_ERROR ) {
  ------------------
  |  |   79|  1.28k|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  |  Branch (323:7): [True: 0, False: 1.28k]
  ------------------
  324|      0|			ber_free( ber, 0 );
  325|      0|			ld->ld_errno = LDAP_DECODING_ERROR;
  ------------------
  |  |  739|      0|#define LDAP_DECODING_ERROR				(-4)
  ------------------
  326|      0|			return ld->ld_errno;
  327|      0|		}
  328|       |
  329|  1.28k|		tag = ber_peek_tag(ber, &len);
  330|       |
  331|  1.28k|		if( tag == LDAP_TAG_REFERRAL ) {
  ------------------
  |  |  505|  1.28k|#define LDAP_TAG_REFERRAL	((ber_tag_t) 0xa3U)	/* context specific + constructed + 3 */
  ------------------
  |  Branch (331:7): [True: 6, False: 1.27k]
  ------------------
  332|       |			/* skip 'em */
  333|      6|			if( ber_scanf( ber, "x" ) == LBER_ERROR ) {
  ------------------
  |  |   79|      6|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  |  Branch (333:8): [True: 0, False: 6]
  ------------------
  334|      0|				ber_free( ber, 0 );
  335|      0|				ld->ld_errno = LDAP_DECODING_ERROR;
  ------------------
  |  |  739|      0|#define LDAP_DECODING_ERROR				(-4)
  ------------------
  336|      0|				return ld->ld_errno;
  337|      0|			}
  338|       |
  339|      6|			tag = ber_peek_tag(ber, &len);
  340|      6|		}
  341|       |
  342|  1.28k|		if( tag == LDAP_TAG_SASL_RES_CREDS ) {
  ------------------
  |  |  517|  1.28k|#define LDAP_TAG_SASL_RES_CREDS	((ber_tag_t) 0x87U)	/* context specific + primitive */
  ------------------
  |  Branch (342:7): [True: 4, False: 1.27k]
  ------------------
  343|      4|			if( ber_scanf( ber, "O", &scred ) == LBER_ERROR ) {
  ------------------
  |  |   79|      4|#define LBER_ERROR			((ber_tag_t) -1)
  ------------------
  |  Branch (343:8): [True: 0, False: 4]
  ------------------
  344|      0|				ber_free( ber, 0 );
  345|      0|				ld->ld_errno = LDAP_DECODING_ERROR;
  ------------------
  |  |  739|      0|#define LDAP_DECODING_ERROR				(-4)
  ------------------
  346|      0|				return ld->ld_errno;
  347|      0|			}
  348|      4|		}
  349|  1.28k|	}
  350|       |
  351|  1.28k|	ber_free( ber, 0 );
  352|       |
  353|  1.28k|	if ( servercredp != NULL ) {
  ------------------
  |  Branch (353:7): [True: 1.28k, False: 0]
  ------------------
  354|  1.28k|		*servercredp = scred;
  355|       |
  356|  1.28k|	} else if ( scred != NULL ) {
  ------------------
  |  Branch (356:14): [True: 0, False: 0]
  ------------------
  357|      0|		ber_bvfree( scred );
  358|      0|	}
  359|       |
  360|  1.28k|	ld->ld_errno = errcode;
  361|       |
  362|  1.28k|	if ( freeit ) {
  ------------------
  |  Branch (362:7): [True: 0, False: 1.28k]
  ------------------
  363|      0|		ldap_msgfree( res );
  364|      0|	}
  365|       |
  366|  1.28k|	return( LDAP_SUCCESS );
  ------------------
  |  |  610|  1.28k|#define LDAP_SUCCESS				0x00
  ------------------
  367|  1.28k|}

ldap_search_ext:
   68|  1.56k|{
   69|  1.56k|	return ldap_pvt_search( ld, base, scope, filter, attrs,
   70|  1.56k|		attrsonly, sctrls, cctrls, timeout, sizelimit, -1, msgidp );
   71|  1.56k|}
ldap_pvt_search:
   87|  1.56k|{
   88|  1.56k|	int rc;
   89|  1.56k|	BerElement	*ber;
   90|  1.56k|	int timelimit;
   91|  1.56k|	ber_int_t id;
   92|       |
   93|  1.56k|	Debug0( LDAP_DEBUG_TRACE, "ldap_search_ext\n" );
  ------------------
  |  |   87|  1.56k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  1.56k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  1.56k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  1.56k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 1.56k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|  1.56k|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|  1.56k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 1.56k]
  |  |  ------------------
  ------------------
   94|       |
   95|  1.56k|	assert( ld != NULL );
  ------------------
  |  Branch (95:2): [True: 0, False: 1.56k]
  |  Branch (95:2): [True: 1.56k, False: 0]
  ------------------
   96|  1.56k|	assert( LDAP_VALID( ld ) );
  ------------------
  |  Branch (96:2): [True: 0, False: 1.56k]
  |  Branch (96:2): [True: 1.56k, False: 0]
  ------------------
   97|       |
   98|       |	/* check client controls */
   99|  1.56k|	rc = ldap_int_client_controls( ld, cctrls );
  100|  1.56k|	if( rc != LDAP_SUCCESS ) return rc;
  ------------------
  |  |  610|  1.56k|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (100:6): [True: 0, False: 1.56k]
  ------------------
  101|       |
  102|       |	/*
  103|       |	 * if timeout is provided, both tv_sec and tv_usec must
  104|       |	 * not be zero
  105|       |	 */
  106|  1.56k|	if( timeout != NULL ) {
  ------------------
  |  Branch (106:6): [True: 0, False: 1.56k]
  ------------------
  107|      0|		if( timeout->tv_sec == 0 && timeout->tv_usec == 0 ) {
  ------------------
  |  Branch (107:7): [True: 0, False: 0]
  |  Branch (107:31): [True: 0, False: 0]
  ------------------
  108|      0|			return LDAP_PARAM_ERROR;
  ------------------
  |  |  744|      0|#define LDAP_PARAM_ERROR				(-9)
  ------------------
  109|      0|		}
  110|       |
  111|       |		/* timelimit must be non-zero if timeout is provided */
  112|      0|		timelimit = timeout->tv_sec != 0 ? timeout->tv_sec : 1;
  ------------------
  |  Branch (112:15): [True: 0, False: 0]
  ------------------
  113|       |
  114|  1.56k|	} else {
  115|       |		/* no timeout, no timelimit */
  116|  1.56k|		timelimit = -1;
  117|  1.56k|	}
  118|       |
  119|  1.56k|	ber = ldap_build_search_req( ld, base, scope, filter, attrs,
  120|  1.56k|	    attrsonly, sctrls, cctrls, timelimit, sizelimit, deref, &id ); 
  121|       |
  122|  1.56k|	if ( ber == NULL ) {
  ------------------
  |  Branch (122:7): [True: 375, False: 1.18k]
  ------------------
  123|    375|		return ld->ld_errno;
  124|    375|	}
  125|       |
  126|       |
  127|       |	/* send the message */
  128|  1.18k|	*msgidp = ldap_send_initial_request( ld, LDAP_REQ_SEARCH, base, ber, id );
  ------------------
  |  |  522|  1.18k|#define LDAP_REQ_SEARCH		((ber_tag_t) 0x63U)	/* application + constructed */
  ------------------
  129|       |
  130|  1.18k|	if( *msgidp < 0 )
  ------------------
  |  Branch (130:6): [True: 0, False: 1.18k]
  ------------------
  131|      0|		return ld->ld_errno;
  132|       |
  133|  1.18k|	return LDAP_SUCCESS;
  ------------------
  |  |  610|  1.18k|#define LDAP_SUCCESS				0x00
  ------------------
  134|  1.18k|}
ldap_build_search_req:
  262|  1.56k|{
  263|  1.56k|	BerElement	*ber;
  264|  1.56k|	int		err;
  265|       |
  266|       |	/*
  267|       |	 * Create the search request.  It looks like this:
  268|       |	 *	SearchRequest := [APPLICATION 3] SEQUENCE {
  269|       |	 *		baseObject	DistinguishedName,
  270|       |	 *		scope		ENUMERATED {
  271|       |	 *			baseObject	(0),
  272|       |	 *			singleLevel	(1),
  273|       |	 *			wholeSubtree	(2)
  274|       |	 *		},
  275|       |	 *		derefAliases	ENUMERATED {
  276|       |	 *			neverDerefaliases	(0),
  277|       |	 *			derefInSearching	(1),
  278|       |	 *			derefFindingBaseObj	(2),
  279|       |	 *			alwaysDerefAliases	(3)
  280|       |	 *		},
  281|       |	 *		sizelimit	INTEGER (0 .. 65535),
  282|       |	 *		timelimit	INTEGER (0 .. 65535),
  283|       |	 *		attrsOnly	BOOLEAN,
  284|       |	 *		filter		Filter,
  285|       |	 *		attributes	SEQUENCE OF AttributeType
  286|       |	 *	}
  287|       |	 * wrapped in an ldap message.
  288|       |	 */
  289|       |
  290|       |	/* create a message to send */
  291|  1.56k|	if ( (ber = ldap_alloc_ber_with_options( ld )) == NULL ) {
  ------------------
  |  Branch (291:7): [True: 0, False: 1.56k]
  ------------------
  292|      0|		return( NULL );
  293|      0|	}
  294|       |
  295|  1.56k|	if ( base == NULL ) {
  ------------------
  |  Branch (295:7): [True: 0, False: 1.56k]
  ------------------
  296|       |		/* no base provided, use session default base */
  297|      0|		base = ld->ld_options.ldo_defbase;
  ------------------
  |  |  484|      0|#define ld_options		ldc->ldc_options
  ------------------
  298|       |
  299|      0|		if ( base == NULL ) {
  ------------------
  |  Branch (299:8): [True: 0, False: 0]
  ------------------
  300|       |			/* no session default base, use top */
  301|      0|			base = "";
  302|      0|		}
  303|      0|	}
  304|       |
  305|  1.56k|	LDAP_NEXT_MSGID( ld, *idp );
  ------------------
  |  |  561|  1.56k|#define	LDAP_NEXT_MSGID(ld, id) do { \
  |  |  562|  1.56k|	LDAP_MUTEX_LOCK( &(ld)->ld_msgid_mutex ); \
  |  |  ------------------
  |  |  |  |  551|  1.56k|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  |  |  ------------------
  |  |  563|  1.56k|	(id) = ++(ld)->ld_msgid; \
  |  |  ------------------
  |  |  |  |  447|  1.56k|#define	ld_msgid		ldc->ldc_msgid
  |  |  ------------------
  |  |  564|  1.56k|	LDAP_MUTEX_UNLOCK( &(ld)->ld_msgid_mutex ); \
  |  |  ------------------
  |  |  |  |  552|  1.56k|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  |  |  ------------------
  |  |  565|  1.56k|} while (0)
  |  |  ------------------
  |  |  |  Branch (565:10): [Folded, False: 1.56k]
  |  |  ------------------
  ------------------
  306|       |#ifdef LDAP_CONNECTIONLESS
  307|       |	if ( LDAP_IS_UDP(ld) ) {
  308|       |		struct sockaddr_storage sa = {0};
  309|       |		/* dummy, filled with ldo_peer in request.c */
  310|       |	    err = ber_write( ber, (char *) &sa, sizeof( sa ), 0 );
  311|       |	}
  312|       |	if ( LDAP_IS_UDP(ld) && ld->ld_options.ldo_version == LDAP_VERSION2) {
  313|       |	    char *dn = ld->ld_options.ldo_cldapdn;
  314|       |	    if (!dn) dn = "";
  315|       |	    err = ber_printf( ber, "{ist{seeiib", *idp, dn,
  316|       |		LDAP_REQ_SEARCH, base, (ber_int_t) scope,
  317|       |		(deref < 0) ? ld->ld_deref : deref,
  318|       |		(sizelimit < 0) ? ld->ld_sizelimit : sizelimit,
  319|       |		(timelimit < 0) ? ld->ld_timelimit : timelimit,
  320|       |		attrsonly );
  321|       |	} else
  322|       |#endif
  323|  1.56k|	{
  324|  1.56k|	    err = ber_printf( ber, "{it{seeiib", *idp,
  325|  1.56k|		LDAP_REQ_SEARCH, base, (ber_int_t) scope,
  ------------------
  |  |  522|  1.56k|#define LDAP_REQ_SEARCH		((ber_tag_t) 0x63U)	/* application + constructed */
  ------------------
  326|  1.56k|		(deref < 0) ? ld->ld_deref : deref,
  ------------------
  |  |  489|  1.56k|#define ld_deref		ld_options.ldo_deref
  |  |  ------------------
  |  |  |  |  484|  1.56k|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
  |  Branch (326:3): [True: 1.56k, False: 0]
  ------------------
  327|  1.56k|		(sizelimit < 0) ? ld->ld_sizelimit : sizelimit,
  ------------------
  |  |  491|      0|#define ld_sizelimit		ld_options.ldo_sizelimit
  |  |  ------------------
  |  |  |  |  484|      0|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
  |  Branch (327:3): [True: 0, False: 1.56k]
  ------------------
  328|  1.56k|		(timelimit < 0) ? ld->ld_timelimit : timelimit,
  ------------------
  |  |  490|  1.56k|#define ld_timelimit		ld_options.ldo_timelimit
  |  |  ------------------
  |  |  |  |  484|  1.56k|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
  |  Branch (328:3): [True: 1.56k, False: 0]
  ------------------
  329|  1.56k|		attrsonly );
  330|  1.56k|	}
  331|       |
  332|  1.56k|	if ( err == -1 ) {
  ------------------
  |  Branch (332:7): [True: 0, False: 1.56k]
  ------------------
  333|      0|		ld->ld_errno = LDAP_ENCODING_ERROR;
  ------------------
  |  |  738|      0|#define LDAP_ENCODING_ERROR				(-3)
  ------------------
  334|      0|		ber_free( ber, 1 );
  335|      0|		return( NULL );
  336|      0|	}
  337|       |
  338|  1.56k|	if( filter == NULL ) {
  ------------------
  |  Branch (338:6): [True: 748, False: 816]
  ------------------
  339|    748|		filter = "(objectclass=*)";
  340|    748|	}
  341|       |
  342|  1.56k|	err = ldap_pvt_put_filter( ber, filter );
  343|       |
  344|  1.56k|	if ( err  == -1 ) {
  ------------------
  |  Branch (344:7): [True: 375, False: 1.18k]
  ------------------
  345|    375|		ld->ld_errno = LDAP_FILTER_ERROR;
  ------------------
  |  |  742|    375|#define LDAP_FILTER_ERROR				(-7)
  ------------------
  346|    375|		ber_free( ber, 1 );
  347|    375|		return( NULL );
  348|    375|	}
  349|       |
  350|  1.18k|#ifdef LDAP_DEBUG
  351|  1.18k|	if ( ldap_debug & LDAP_DEBUG_ARGS ) {
  ------------------
  |  |   75|  1.18k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  ------------------
  |  |  |  |   70|  1.18k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  ------------------
  ------------------
              	if ( ldap_debug & LDAP_DEBUG_ARGS ) {
  ------------------
  |  |  109|  1.18k|#define LDAP_DEBUG_ARGS		0x0004
  ------------------
  |  Branch (351:7): [True: 0, False: 1.18k]
  ------------------
  352|      0|		char	buf[ BUFSIZ ], *ptr = " *";
  353|       |
  354|      0|		if ( attrs != NULL ) {
  ------------------
  |  Branch (354:8): [True: 0, False: 0]
  ------------------
  355|      0|			int	i, len, rest = sizeof( buf );
  356|       |
  357|      0|			for ( i = 0; attrs[ i ] != NULL && rest > 0; i++ ) {
  ------------------
  |  Branch (357:17): [True: 0, False: 0]
  |  Branch (357:39): [True: 0, False: 0]
  ------------------
  358|      0|				ptr = &buf[ sizeof( buf ) - rest ];
  359|      0|				len = snprintf( ptr, rest, " %s", attrs[ i ] );
  360|      0|				rest -= (len >= 0 ? len : (int) sizeof( buf ));
  ------------------
  |  Branch (360:14): [True: 0, False: 0]
  ------------------
  361|      0|			}
  362|       |
  363|      0|			if ( rest <= 0 ) {
  ------------------
  |  Branch (363:9): [True: 0, False: 0]
  ------------------
  364|      0|				AC_MEMCPY( &buf[ sizeof( buf ) - STRLENOF( "...(truncated)" ) - 1 ],
  ------------------
  |  |   86|      0|#define AC_MEMCPY( d, s, n ) (SAFEMEMCPY((d),(s),(n)))
  |  |  ------------------
  |  |  |  |   77|      0|#		define SAFEMEMCPY( d, s, n ) 	memmove((d), (s), (n))
  |  |  ------------------
  ------------------
  365|      0|					"...(truncated)", STRLENOF( "...(truncated)" ) + 1 );
  366|      0|			} 
  367|      0|			ptr = buf;
  368|      0|		}
  369|       |
  370|      0|		Debug1( LDAP_DEBUG_ARGS, "ldap_build_search_req ATTRS:%s\n", ptr );
  ------------------
  |  |   92|      0|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|      0|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      0|	ldap_log_printf( NULL, (level), fmt, arg1 ); \
  |  |   94|      0|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  371|      0|	}
  372|  1.18k|#endif /* LDAP_DEBUG */
  373|       |
  374|  1.18k|	if ( ber_printf( ber, /*{*/ "{v}N}", attrs ) == -1 ) {
  ------------------
  |  Branch (374:7): [True: 0, False: 1.18k]
  ------------------
  375|      0|		ld->ld_errno = LDAP_ENCODING_ERROR;
  ------------------
  |  |  738|      0|#define LDAP_ENCODING_ERROR				(-3)
  ------------------
  376|      0|		ber_free( ber, 1 );
  377|      0|		return( NULL );
  378|      0|	}
  379|       |
  380|       |	/* Put Server Controls */
  381|  1.18k|	if( ldap_int_put_controls( ld, sctrls, ber ) != LDAP_SUCCESS ) {
  ------------------
  |  |  610|  1.18k|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (381:6): [True: 0, False: 1.18k]
  ------------------
  382|      0|		ber_free( ber, 1 );
  383|      0|		return( NULL );
  384|      0|	}
  385|       |
  386|  1.18k|	if ( ber_printf( ber, /*{*/ "N}" ) == -1 ) {
  ------------------
  |  Branch (386:7): [True: 0, False: 1.18k]
  ------------------
  387|      0|		ld->ld_errno = LDAP_ENCODING_ERROR;
  ------------------
  |  |  738|      0|#define LDAP_ENCODING_ERROR				(-3)
  ------------------
  388|      0|		ber_free( ber, 1 );
  389|      0|		return( NULL );
  390|      0|	}
  391|       |
  392|  1.18k|	return( ber );
  393|  1.18k|}

ldap_tavl_insert:
   64|  4.31k|{
   65|  4.31k|    TAvlnode *t, *p, *s, *q, *r;
   66|  4.31k|    int a, cmp, ncmp;
   67|       |
   68|  4.31k|	if ( *root == NULL ) {
  ------------------
  |  Branch (68:7): [True: 4.31k, False: 7]
  ------------------
   69|  4.31k|		if (( r = (TAvlnode *) ber_memalloc( sizeof( TAvlnode ))) == NULL ) {
  ------------------
  |  Branch (69:7): [True: 0, False: 4.31k]
  ------------------
   70|      0|			return( -1 );
   71|      0|		}
   72|  4.31k|		r->avl_link[0] = r->avl_link[1] = NULL;
   73|  4.31k|		r->avl_data = data;
   74|  4.31k|		r->avl_bf = EH;
  ------------------
  |  |   66|  4.31k|#define EH 	0
  ------------------
   75|  4.31k|		r->avl_bits[0] = r->avl_bits[1] = AVL_THREAD;
  ------------------
  |  |   73|  4.31k|#define	AVL_THREAD	1
  ------------------
   76|  4.31k|		*root = r;
   77|       |
   78|  4.31k|		return( 0 );
   79|  4.31k|	}
   80|       |
   81|      7|    t = NULL;
   82|      7|    s = p = *root;
   83|       |
   84|       |	/* find insertion point */
   85|      7|    while (1) {
  ------------------
  |  Branch (85:12): [True: 7, Folded]
  ------------------
   86|      7|		cmp = fcmp( data, p->avl_data );
   87|      7|		if ( cmp == 0 )
  ------------------
  |  Branch (87:8): [True: 0, False: 7]
  ------------------
   88|      0|			return (*fdup)( p->avl_data, data );
   89|       |
   90|      7|		cmp = (cmp > 0);
   91|      7|		q = ldap_avl_child( p, cmp );
  ------------------
  |  |   81|      7|#define	ldap_avl_child(x,dir)	((x)->avl_bits[dir]) == AVL_CHILD ? \
  |  |  ------------------
  |  |  |  |   72|      7|#define	AVL_CHILD	0
  |  |  ------------------
  |  |  |  Branch (81:31): [True: 0, False: 7]
  |  |  ------------------
  |  |   82|      7|	(x)->avl_link[dir] : NULL
  ------------------
   92|      7|		if (q == NULL) {
  ------------------
  |  Branch (92:7): [True: 7, False: 0]
  ------------------
   93|       |			/* insert */
   94|      7|			if (( q = (TAvlnode *) ber_memalloc( sizeof( TAvlnode ))) == NULL ) {
  ------------------
  |  Branch (94:8): [True: 0, False: 7]
  ------------------
   95|      0|				return( -1 );
   96|      0|			}
   97|      7|			q->avl_link[cmp] = p->avl_link[cmp];
   98|      7|			q->avl_link[!cmp] = p;
   99|      7|			q->avl_data = data;
  100|      7|			q->avl_bf = EH;
  ------------------
  |  |   66|      7|#define EH 	0
  ------------------
  101|      7|			q->avl_bits[0] = q->avl_bits[1] = AVL_THREAD;
  ------------------
  |  |   73|      7|#define	AVL_THREAD	1
  ------------------
  102|       |
  103|      7|			p->avl_link[cmp] = q;
  104|      7|			p->avl_bits[cmp] = AVL_CHILD;
  ------------------
  |  |   72|      7|#define	AVL_CHILD	0
  ------------------
  105|      7|			break;
  106|      7|		} else if ( q->avl_bf ) {
  ------------------
  |  Branch (106:15): [True: 0, False: 0]
  ------------------
  107|      0|			t = p;
  108|      0|			s = q;
  109|      0|		}
  110|      0|		p = q;
  111|      0|    }
  112|       |
  113|       |    /* adjust balance factors */
  114|      7|    cmp = fcmp( data, s->avl_data ) > 0;
  115|      7|	r = p = s->avl_link[cmp];
  116|      7|	a = avl_bfs[cmp];
  117|       |
  118|      7|	while ( p != q ) {
  ------------------
  |  Branch (118:10): [True: 0, False: 7]
  ------------------
  119|      0|		cmp = fcmp( data, p->avl_data ) > 0;
  120|      0|		p->avl_bf = avl_bfs[cmp];
  121|      0|		p = p->avl_link[cmp];
  122|      0|	}
  123|       |
  124|       |	/* checks and balances */
  125|       |
  126|      7|	if ( s->avl_bf == EH ) {
  ------------------
  |  |   66|      7|#define EH 	0
  ------------------
  |  Branch (126:7): [True: 7, False: 0]
  ------------------
  127|      7|		s->avl_bf = a;
  128|      7|		return 0;
  129|      7|	} else if ( s->avl_bf == -a ) {
  ------------------
  |  Branch (129:14): [True: 0, False: 0]
  ------------------
  130|      0|		s->avl_bf = EH;
  ------------------
  |  |   66|      0|#define EH 	0
  ------------------
  131|      0|		return 0;
  132|      0|    } else if ( s->avl_bf == a ) {
  ------------------
  |  Branch (132:17): [True: 0, False: 0]
  ------------------
  133|      0|		cmp = (a > 0);
  134|      0|		ncmp = !cmp;
  135|      0|		if ( r->avl_bf == a ) {
  ------------------
  |  Branch (135:8): [True: 0, False: 0]
  ------------------
  136|       |			/* single rotation */
  137|      0|			p = r;
  138|      0|			if ( r->avl_bits[ncmp] == AVL_THREAD ) {
  ------------------
  |  |   73|      0|#define	AVL_THREAD	1
  ------------------
  |  Branch (138:9): [True: 0, False: 0]
  ------------------
  139|      0|				r->avl_bits[ncmp] = AVL_CHILD;
  ------------------
  |  |   72|      0|#define	AVL_CHILD	0
  ------------------
  140|      0|				s->avl_bits[cmp] = AVL_THREAD;
  ------------------
  |  |   73|      0|#define	AVL_THREAD	1
  ------------------
  141|      0|			} else {
  142|      0|				s->avl_link[cmp] = r->avl_link[ncmp];
  143|      0|				r->avl_link[ncmp] = s;
  144|      0|			}
  145|      0|			s->avl_bf = 0;
  146|      0|			r->avl_bf = 0;
  147|      0|		} else if ( r->avl_bf == -a ) {
  ------------------
  |  Branch (147:15): [True: 0, False: 0]
  ------------------
  148|       |			/* double rotation */
  149|      0|			p = r->avl_link[ncmp];
  150|      0|			if ( p->avl_bits[cmp] == AVL_THREAD ) {
  ------------------
  |  |   73|      0|#define	AVL_THREAD	1
  ------------------
  |  Branch (150:9): [True: 0, False: 0]
  ------------------
  151|      0|				p->avl_bits[cmp] = AVL_CHILD;
  ------------------
  |  |   72|      0|#define	AVL_CHILD	0
  ------------------
  152|      0|				r->avl_bits[ncmp] = AVL_THREAD;
  ------------------
  |  |   73|      0|#define	AVL_THREAD	1
  ------------------
  153|      0|			} else {
  154|      0|				r->avl_link[ncmp] = p->avl_link[cmp];
  155|      0|				p->avl_link[cmp] = r;
  156|      0|			}
  157|      0|			if ( p->avl_bits[ncmp] == AVL_THREAD ) {
  ------------------
  |  |   73|      0|#define	AVL_THREAD	1
  ------------------
  |  Branch (157:9): [True: 0, False: 0]
  ------------------
  158|      0|				p->avl_bits[ncmp] = AVL_CHILD;
  ------------------
  |  |   72|      0|#define	AVL_CHILD	0
  ------------------
  159|      0|				s->avl_link[cmp] = p;
  160|      0|				s->avl_bits[cmp] = AVL_THREAD;
  ------------------
  |  |   73|      0|#define	AVL_THREAD	1
  ------------------
  161|      0|			} else {
  162|      0|				s->avl_link[cmp] = p->avl_link[ncmp];
  163|      0|				p->avl_link[ncmp] = s;
  164|      0|			}
  165|      0|			if ( p->avl_bf == a ) {
  ------------------
  |  Branch (165:9): [True: 0, False: 0]
  ------------------
  166|      0|				s->avl_bf = -a;
  167|      0|				r->avl_bf = 0;
  168|      0|			} else if ( p->avl_bf == -a ) {
  ------------------
  |  Branch (168:16): [True: 0, False: 0]
  ------------------
  169|      0|				s->avl_bf = 0;
  170|      0|				r->avl_bf = a;
  171|      0|			} else {
  172|      0|				s->avl_bf = 0;
  173|      0|				r->avl_bf = 0;
  174|      0|			}
  175|      0|			p->avl_bf = 0;
  176|      0|		}
  177|       |		/* Update parent */
  178|      0|		if ( t == NULL )
  ------------------
  |  Branch (178:8): [True: 0, False: 0]
  ------------------
  179|      0|			*root = p;
  180|      0|		else if ( s == t->avl_right )
  ------------------
  |  |   49|      0|#define avl_right	avl_link[1]
  ------------------
  |  Branch (180:13): [True: 0, False: 0]
  ------------------
  181|      0|			t->avl_right = p;
  ------------------
  |  |   49|      0|#define avl_right	avl_link[1]
  ------------------
  182|      0|		else
  183|      0|			t->avl_left = p;
  ------------------
  |  |   48|      0|#define avl_left	avl_link[0]
  ------------------
  184|      0|    }
  185|       |
  186|      0|  return 0;
  187|      7|}
ldap_tavl_delete:
  191|  2.85k|{
  192|  2.85k|	TAvlnode *p, *q, *r, *top;
  193|  2.85k|	int side, side_bf, shorter, nside = -1;
  194|       |
  195|       |	/* parent stack */
  196|  2.85k|	TAvlnode *pptr[MAX_TREE_DEPTH];
  197|  2.85k|	unsigned char pdir[MAX_TREE_DEPTH];
  198|  2.85k|	int depth = 0;
  199|       |
  200|  2.85k|	if ( *root == NULL )
  ------------------
  |  Branch (200:7): [True: 0, False: 2.85k]
  ------------------
  201|      0|		return NULL;
  202|       |
  203|  2.85k|	p = *root;
  204|       |
  205|  2.85k|	while (1) {
  ------------------
  |  Branch (205:9): [True: 2.85k, Folded]
  ------------------
  206|  2.85k|		side = fcmp( data, p->avl_data );
  207|  2.85k|		if ( !side )
  ------------------
  |  Branch (207:8): [True: 2.85k, False: 3]
  ------------------
  208|  2.85k|			break;
  209|      3|		side = ( side > 0 );
  210|      3|		pdir[depth] = side;
  211|      3|		pptr[depth++] = p;
  212|       |
  213|      3|		if ( p->avl_bits[side] == AVL_THREAD )
  ------------------
  |  |   73|      3|#define	AVL_THREAD	1
  ------------------
  |  Branch (213:8): [True: 0, False: 3]
  ------------------
  214|      0|			return NULL;
  215|      3|		p = p->avl_link[side];
  216|      3|	}
  217|  2.85k|	data = p->avl_data;
  218|       |
  219|       |	/* If this node has two children, swap so we are deleting a node with
  220|       |	 * at most one child.
  221|       |	 */
  222|  2.85k|	if ( p->avl_bits[0] == AVL_CHILD && p->avl_bits[1] == AVL_CHILD &&
  ------------------
  |  |   72|  5.70k|#define	AVL_CHILD	0
  ------------------
              	if ( p->avl_bits[0] == AVL_CHILD && p->avl_bits[1] == AVL_CHILD &&
  ------------------
  |  |   72|  2.85k|#define	AVL_CHILD	0
  ------------------
  |  Branch (222:7): [True: 0, False: 2.85k]
  |  Branch (222:38): [True: 0, False: 0]
  ------------------
  223|      0|		p->avl_link[0] && p->avl_link[1] ) {
  ------------------
  |  Branch (223:3): [True: 0, False: 0]
  |  Branch (223:21): [True: 0, False: 0]
  ------------------
  224|       |
  225|       |		/* find the immediate predecessor <q> */
  226|      0|		q = p->avl_link[0];
  227|      0|		side = depth;
  228|      0|		pdir[depth++] = 0;
  229|      0|		while (q->avl_bits[1] == AVL_CHILD && q->avl_link[1]) {
  ------------------
  |  |   72|      0|#define	AVL_CHILD	0
  ------------------
  |  Branch (229:10): [True: 0, False: 0]
  |  Branch (229:41): [True: 0, False: 0]
  ------------------
  230|      0|			pdir[depth] = 1;
  231|      0|			pptr[depth++] = q;
  232|      0|			q = q->avl_link[1];
  233|      0|		}
  234|       |		/* swap links */
  235|      0|		r = p->avl_link[0];
  236|      0|		p->avl_link[0] = q->avl_link[0];
  237|      0|		q->avl_link[0] = r;
  238|       |
  239|      0|		q->avl_link[1] = p->avl_link[1];
  240|      0|		p->avl_link[1] = q;
  241|       |
  242|      0|		p->avl_bits[0] = q->avl_bits[0];
  243|      0|		p->avl_bits[1] = q->avl_bits[1];
  244|      0|		q->avl_bits[0] = q->avl_bits[1] = AVL_CHILD;
  ------------------
  |  |   72|      0|#define	AVL_CHILD	0
  ------------------
  245|       |
  246|      0|		q->avl_bf = p->avl_bf;
  247|       |
  248|       |		/* fix stack positions: old parent of p points to q */
  249|      0|		pptr[side] = q;
  250|      0|		if ( side ) {
  ------------------
  |  Branch (250:8): [True: 0, False: 0]
  ------------------
  251|      0|			r = pptr[side-1];
  252|      0|			r->avl_link[pdir[side-1]] = q;
  253|      0|		} else {
  254|      0|			*root = q;
  255|      0|		}
  256|       |		/* new parent of p points to p */
  257|      0|		if ( depth-side > 1 ) {
  ------------------
  |  Branch (257:8): [True: 0, False: 0]
  ------------------
  258|      0|			r = pptr[depth-1];
  259|      0|			r->avl_link[1] = p;
  260|      0|		} else {
  261|      0|			q->avl_link[0] = p;
  262|      0|		}
  263|       |
  264|       |		/* fix right subtree: successor of p points to q */
  265|      0|		r = q->avl_link[1];
  266|      0|		while ( r->avl_bits[0] == AVL_CHILD && r->avl_link[0] )
  ------------------
  |  |   72|      0|#define	AVL_CHILD	0
  ------------------
  |  Branch (266:11): [True: 0, False: 0]
  |  Branch (266:42): [True: 0, False: 0]
  ------------------
  267|      0|			r = r->avl_link[0];
  268|      0|		r->avl_link[0] = q;
  269|      0|	}
  270|       |
  271|       |	/* now <p> has at most one child, get it */
  272|  2.85k|	if ( p->avl_link[0] && p->avl_bits[0] == AVL_CHILD ) {
  ------------------
  |  |   72|      3|#define	AVL_CHILD	0
  ------------------
  |  Branch (272:7): [True: 3, False: 2.85k]
  |  Branch (272:25): [True: 0, False: 3]
  ------------------
  273|      0|		q = p->avl_link[0];
  274|       |		/* Preserve thread continuity */
  275|      0|		r = p->avl_link[1];
  276|      0|		nside = 1;
  277|  2.85k|	} else if ( p->avl_link[1] && p->avl_bits[1] == AVL_CHILD ) {
  ------------------
  |  |   72|      1|#define	AVL_CHILD	0
  ------------------
  |  Branch (277:14): [True: 1, False: 2.85k]
  |  Branch (277:32): [True: 1, False: 0]
  ------------------
  278|      1|		q = p->avl_link[1];
  279|      1|		r = p->avl_link[0];
  280|      1|		nside = 0;
  281|  2.85k|	} else {
  282|  2.85k|		q = NULL;
  283|  2.85k|		if ( depth > 0 )
  ------------------
  |  Branch (283:8): [True: 3, False: 2.85k]
  ------------------
  284|      3|			r = p->avl_link[pdir[depth-1]];
  285|  2.85k|		else
  286|  2.85k|			r = NULL;
  287|  2.85k|	}
  288|       |
  289|  2.85k|	ber_memfree( p );
  290|       |
  291|       |	/* Update child thread */
  292|  2.85k|	if ( q ) {
  ------------------
  |  Branch (292:7): [True: 1, False: 2.85k]
  ------------------
  293|      1|		for ( ; q->avl_bits[nside] == AVL_CHILD && q->avl_link[nside];
  ------------------
  |  |   72|      2|#define	AVL_CHILD	0
  ------------------
  |  Branch (293:11): [True: 0, False: 1]
  |  Branch (293:46): [True: 0, False: 0]
  ------------------
  294|      1|			q = q->avl_link[nside] ) ;
  295|      1|		q->avl_link[nside] = r;
  296|      1|	}
  297|       |	
  298|  2.85k|	if ( !depth ) {
  ------------------
  |  Branch (298:7): [True: 2.85k, False: 3]
  ------------------
  299|  2.85k|		*root = q;
  300|  2.85k|		return data;
  301|  2.85k|	}
  302|       |
  303|       |	/* set the child into p's parent */
  304|      3|	depth--;
  305|      3|	p = pptr[depth];
  306|      3|	side = pdir[depth];
  307|      3|	p->avl_link[side] = q;
  308|       |
  309|      3|	if ( !q ) {
  ------------------
  |  Branch (309:7): [True: 3, False: 0]
  ------------------
  310|      3|		p->avl_bits[side] = AVL_THREAD;
  ------------------
  |  |   73|      3|#define	AVL_THREAD	1
  ------------------
  311|      3|		p->avl_link[side] = r;
  312|      3|	}
  313|       |
  314|      3|	top = NULL;
  315|      3|	shorter = 1;
  316|       |
  317|      3|	while ( shorter ) {
  ------------------
  |  Branch (317:10): [True: 3, False: 0]
  ------------------
  318|      3|		p = pptr[depth];
  319|      3|		side = pdir[depth];
  320|      3|		nside = !side;
  321|      3|		side_bf = avl_bfs[side];
  322|       |
  323|       |		/* case 1: height unchanged */
  324|      3|		if ( p->avl_bf == EH ) {
  ------------------
  |  |   66|      3|#define EH 	0
  ------------------
  |  Branch (324:8): [True: 0, False: 3]
  ------------------
  325|       |			/* Tree is now heavier on opposite side */
  326|      0|			p->avl_bf = avl_bfs[nside];
  327|      0|			shorter = 0;
  328|       |
  329|      3|		} else if ( p->avl_bf == side_bf ) {
  ------------------
  |  Branch (329:15): [True: 3, False: 0]
  ------------------
  330|       |		/* case 2: taller subtree shortened, height reduced */
  331|      3|			p->avl_bf = EH;
  ------------------
  |  |   66|      3|#define EH 	0
  ------------------
  332|      3|		} else {
  333|       |		/* case 3: shorter subtree shortened */
  334|      0|			if ( depth )
  ------------------
  |  Branch (334:9): [True: 0, False: 0]
  ------------------
  335|      0|				top = pptr[depth-1]; /* p->parent; */
  336|      0|			else
  337|      0|				top = NULL;
  338|       |			/* set <q> to the taller of the two subtrees of <p> */
  339|      0|			q = p->avl_link[nside];
  340|      0|			if ( q->avl_bf == EH ) {
  ------------------
  |  |   66|      0|#define EH 	0
  ------------------
  |  Branch (340:9): [True: 0, False: 0]
  ------------------
  341|       |				/* case 3a: height unchanged, single rotate */
  342|      0|				if ( q->avl_bits[side] == AVL_THREAD ) {
  ------------------
  |  |   73|      0|#define	AVL_THREAD	1
  ------------------
  |  Branch (342:10): [True: 0, False: 0]
  ------------------
  343|      0|					q->avl_bits[side] = AVL_CHILD;
  ------------------
  |  |   72|      0|#define	AVL_CHILD	0
  ------------------
  344|      0|					p->avl_bits[nside] = AVL_THREAD;
  ------------------
  |  |   73|      0|#define	AVL_THREAD	1
  ------------------
  345|      0|				} else {
  346|      0|					p->avl_link[nside] = q->avl_link[side];
  347|      0|					q->avl_link[side] = p;
  348|      0|				}
  349|      0|				shorter = 0;
  350|      0|				q->avl_bf = side_bf;
  351|      0|				p->avl_bf = (- side_bf);
  352|       |
  353|      0|			} else if ( q->avl_bf == p->avl_bf ) {
  ------------------
  |  Branch (353:16): [True: 0, False: 0]
  ------------------
  354|       |				/* case 3b: height reduced, single rotate */
  355|      0|				if ( q->avl_bits[side] == AVL_THREAD ) {
  ------------------
  |  |   73|      0|#define	AVL_THREAD	1
  ------------------
  |  Branch (355:10): [True: 0, False: 0]
  ------------------
  356|      0|					q->avl_bits[side] = AVL_CHILD;
  ------------------
  |  |   72|      0|#define	AVL_CHILD	0
  ------------------
  357|      0|					p->avl_bits[nside] = AVL_THREAD;
  ------------------
  |  |   73|      0|#define	AVL_THREAD	1
  ------------------
  358|      0|				} else {
  359|      0|					p->avl_link[nside] = q->avl_link[side];
  360|      0|					q->avl_link[side] = p;
  361|      0|				}
  362|      0|				shorter = 1;
  363|      0|				q->avl_bf = EH;
  ------------------
  |  |   66|      0|#define EH 	0
  ------------------
  364|      0|				p->avl_bf = EH;
  ------------------
  |  |   66|      0|#define EH 	0
  ------------------
  365|       |
  366|      0|			} else {
  367|       |				/* case 3c: height reduced, balance factors opposite */
  368|      0|				r = q->avl_link[side];
  369|      0|				if ( r->avl_bits[nside] == AVL_THREAD ) {
  ------------------
  |  |   73|      0|#define	AVL_THREAD	1
  ------------------
  |  Branch (369:10): [True: 0, False: 0]
  ------------------
  370|      0|					r->avl_bits[nside] = AVL_CHILD;
  ------------------
  |  |   72|      0|#define	AVL_CHILD	0
  ------------------
  371|      0|					q->avl_bits[side] = AVL_THREAD;
  ------------------
  |  |   73|      0|#define	AVL_THREAD	1
  ------------------
  372|      0|				} else {
  373|      0|					q->avl_link[side] = r->avl_link[nside];
  374|      0|					r->avl_link[nside] = q;
  375|      0|				}
  376|       |
  377|      0|				if ( r->avl_bits[side] == AVL_THREAD ) {
  ------------------
  |  |   73|      0|#define	AVL_THREAD	1
  ------------------
  |  Branch (377:10): [True: 0, False: 0]
  ------------------
  378|      0|					r->avl_bits[side] = AVL_CHILD;
  ------------------
  |  |   72|      0|#define	AVL_CHILD	0
  ------------------
  379|      0|					p->avl_bits[nside] = AVL_THREAD;
  ------------------
  |  |   73|      0|#define	AVL_THREAD	1
  ------------------
  380|      0|					p->avl_link[nside] = r;
  381|      0|				} else {
  382|      0|					p->avl_link[nside] = r->avl_link[side];
  383|      0|					r->avl_link[side] = p;
  384|      0|				}
  385|       |
  386|      0|				if ( r->avl_bf == side_bf ) {
  ------------------
  |  Branch (386:10): [True: 0, False: 0]
  ------------------
  387|      0|					q->avl_bf = (- side_bf);
  388|      0|					p->avl_bf = EH;
  ------------------
  |  |   66|      0|#define EH 	0
  ------------------
  389|      0|				} else if ( r->avl_bf == (- side_bf)) {
  ------------------
  |  Branch (389:17): [True: 0, False: 0]
  ------------------
  390|      0|					q->avl_bf = EH;
  ------------------
  |  |   66|      0|#define EH 	0
  ------------------
  391|      0|					p->avl_bf = side_bf;
  392|      0|				} else {
  393|      0|					q->avl_bf = EH;
  ------------------
  |  |   66|      0|#define EH 	0
  ------------------
  394|      0|					p->avl_bf = EH;
  ------------------
  |  |   66|      0|#define EH 	0
  ------------------
  395|      0|				}
  396|      0|				r->avl_bf = EH;
  ------------------
  |  |   66|      0|#define EH 	0
  ------------------
  397|      0|				q = r;
  398|      0|			}
  399|       |			/* a rotation has caused <q> (or <r> in case 3c) to become
  400|       |			 * the root.  let <p>'s former parent know this.
  401|       |			 */
  402|      0|			if ( top == NULL ) {
  ------------------
  |  Branch (402:9): [True: 0, False: 0]
  ------------------
  403|      0|				*root = q;
  404|      0|			} else if (top->avl_link[0] == p) {
  ------------------
  |  Branch (404:15): [True: 0, False: 0]
  ------------------
  405|      0|				top->avl_link[0] = q;
  406|      0|			} else {
  407|      0|				top->avl_link[1] = q;
  408|      0|			}
  409|       |			/* end case 3 */
  410|      0|			p = q;
  411|      0|		}
  412|      3|		if ( !depth )
  ------------------
  |  Branch (412:8): [True: 3, False: 0]
  ------------------
  413|      3|			break;
  414|      0|		depth--;
  415|      0|	} /* end while(shorter) */
  416|       |
  417|      3|	return data;
  418|  2.85k|}
ldap_tavl_free:
  428|  9.21k|{
  429|  9.21k|	int	nleft, nright;
  430|       |
  431|  9.21k|	if ( root == 0 )
  ------------------
  |  Branch (431:7): [True: 7.75k, False: 1.46k]
  ------------------
  432|  7.75k|		return( 0 );
  433|       |
  434|  1.46k|	nleft = ldap_tavl_free( ldap_avl_lchild( root ), dfree );
  ------------------
  |  |   83|  1.46k|#define	ldap_avl_lchild(x)	ldap_avl_child(x,0)
  |  |  ------------------
  |  |  |  |   81|  1.46k|#define	ldap_avl_child(x,dir)	((x)->avl_bits[dir]) == AVL_CHILD ? \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  1.46k|#define	AVL_CHILD	0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (81:31): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |   82|  1.46k|	(x)->avl_link[dir] : NULL
  |  |  ------------------
  ------------------
  435|       |
  436|  1.46k|	nright = ldap_tavl_free( ldap_avl_rchild( root ), dfree );
  ------------------
  |  |   84|  1.46k|#define	ldap_avl_rchild(x)	ldap_avl_child(x,1)
  |  |  ------------------
  |  |  |  |   81|  1.46k|#define	ldap_avl_child(x,dir)	((x)->avl_bits[dir]) == AVL_CHILD ? \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  1.46k|#define	AVL_CHILD	0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (81:31): [True: 3, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |   82|  1.46k|	(x)->avl_link[dir] : NULL
  |  |  ------------------
  ------------------
  437|       |
  438|  1.46k|	if ( dfree )
  ------------------
  |  Branch (438:7): [True: 1.46k, False: 0]
  ------------------
  439|  1.46k|		(*dfree)( root->avl_data );
  440|  1.46k|	ber_memfree( root );
  441|       |
  442|  1.46k|	return( nleft + nright + 1 );
  443|  9.21k|}
ldap_tavl_find:
  486|  6.83k|{
  487|  6.83k|	int	cmp;
  488|       |
  489|  6.99k|	while ( root != 0 && (cmp = (*fcmp)( data, root->avl_data )) != 0 ) {
  ------------------
  |  Branch (489:10): [True: 6.80k, False: 191]
  |  Branch (489:23): [True: 156, False: 6.64k]
  ------------------
  490|    156|		cmp = cmp > 0;
  491|    156|		root = ldap_avl_child( root, cmp );
  ------------------
  |  |   81|    156|#define	ldap_avl_child(x,dir)	((x)->avl_bits[dir]) == AVL_CHILD ? \
  |  |  ------------------
  |  |  |  |   72|    156|#define	AVL_CHILD	0
  |  |  ------------------
  |  |  |  Branch (81:31): [True: 8, False: 148]
  |  |  ------------------
  |  |   82|    156|	(x)->avl_link[dir] : NULL
  ------------------
  492|    156|	}
  493|       |
  494|  6.83k|	return( root ? root->avl_data : 0 );
  ------------------
  |  Branch (494:10): [True: 6.64k, False: 191]
  ------------------
  495|  6.83k|}
ldap_tavl_end:
  500|  5.43k|{
  501|  5.43k|	if ( root ) {
  ------------------
  |  Branch (501:7): [True: 5.43k, False: 0]
  ------------------
  502|  5.44k|		while ( root->avl_bits[dir] == AVL_CHILD )
  ------------------
  |  |   72|  5.44k|#define	AVL_CHILD	0
  ------------------
  |  Branch (502:11): [True: 7, False: 5.43k]
  ------------------
  503|      7|			root = root->avl_link[dir];
  504|  5.43k|	}
  505|  5.43k|	return root;
  506|  5.43k|}

ldap_pvt_thread_mutex_init:
  299|  23.7k|{
  300|  23.7k|	return ERRVAL( pthread_mutex_init(
  ------------------
  |  |   72|  23.7k|#define ERRVAL(val)	(val)
  ------------------
  301|  23.7k|		mutex, LDAP_INT_THREAD_MUTEXATTR_DEFAULT ) );
  302|  23.7k|}
ldap_pvt_thread_mutex_destroy:
  306|  23.7k|{
  307|  23.7k|	return ERRVAL( pthread_mutex_destroy( mutex ) );
  ------------------
  |  |   72|  23.7k|#define ERRVAL(val)	(val)
  ------------------
  308|  23.7k|}
ldap_pvt_thread_mutex_lock:
  312|  90.7k|{
  313|  90.7k|	return ERRVAL( pthread_mutex_lock( mutex ) );
  ------------------
  |  |   72|  90.7k|#define ERRVAL(val)	(val)
  ------------------
  314|  90.7k|}
ldap_pvt_thread_mutex_unlock:
  324|  90.7k|{
  325|  90.7k|	return ERRVAL( pthread_mutex_unlock( mutex ) );
  ------------------
  |  |   72|  90.7k|#define ERRVAL(val)	(val)
  ------------------
  326|  90.7k|}

ldap_start_tls:
 1316|     57|{
 1317|     57|	return ldap_extended_operation( ld, LDAP_EXOP_START_TLS,
  ------------------
  |  |  410|     57|#define LDAP_EXOP_START_TLS		"1.3.6.1.4.1.1466.20037"	/* RFC 4511 */
  ------------------
 1318|       |		NULL, serverctrls, clientctrls, msgidp );
 1319|     57|}

ldap_unbind_ext:
   42|  3.39k|{
   43|  3.39k|	int rc;
   44|       |
   45|  3.39k|	assert( ld != NULL );
  ------------------
  |  Branch (45:2): [True: 0, False: 3.39k]
  |  Branch (45:2): [True: 3.39k, False: 0]
  ------------------
   46|  3.39k|	assert( LDAP_VALID( ld ) );
  ------------------
  |  Branch (46:2): [True: 0, False: 3.39k]
  |  Branch (46:2): [True: 3.39k, False: 0]
  ------------------
   47|       |
   48|       |	/* check client controls */
   49|  3.39k|	rc = ldap_int_client_controls( ld, cctrls );
   50|  3.39k|	if( rc != LDAP_SUCCESS ) return rc;
  ------------------
  |  |  610|  3.39k|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (50:6): [True: 0, False: 3.39k]
  ------------------
   51|       |
   52|  3.39k|	return ldap_ld_free( ld, 1, sctrls, cctrls );
   53|  3.39k|}
ldap_ld_free:
   79|  3.39k|{
   80|  3.39k|	LDAPMessage	*lm, *next;
   81|  3.39k|	int		err = LDAP_SUCCESS;
  ------------------
  |  |  610|  3.39k|#define LDAP_SUCCESS				0x00
  ------------------
   82|       |
   83|  3.39k|	LDAP_MUTEX_LOCK( &ld->ld_ldcmutex );
  ------------------
  |  |  551|  3.39k|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
   84|       |	/* Someone else is still using this ld. */
   85|  3.39k|	if (ld->ld_ldcrefcnt > 1) {	/* but not last thread */
  ------------------
  |  |  480|  3.39k|#define	ld_ldcrefcnt		ldc->ldc_refcnt
  ------------------
  |  Branch (85:6): [True: 0, False: 3.39k]
  ------------------
   86|       |		/* clean up self only */
   87|      0|		ld->ld_ldcrefcnt--;
  ------------------
  |  |  480|      0|#define	ld_ldcrefcnt		ldc->ldc_refcnt
  ------------------
   88|      0|		if ( ld->ld_error != NULL ) {
  ------------------
  |  Branch (88:8): [True: 0, False: 0]
  ------------------
   89|      0|			LDAP_FREE( ld->ld_error );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
   90|      0|			ld->ld_error = NULL;
   91|      0|		}
   92|       |
   93|      0|		if ( ld->ld_matched != NULL ) {
  ------------------
  |  Branch (93:8): [True: 0, False: 0]
  ------------------
   94|      0|			LDAP_FREE( ld->ld_matched );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
   95|      0|			ld->ld_matched = NULL;
   96|      0|		}
   97|      0|		if ( ld->ld_referrals != NULL) {
  ------------------
  |  Branch (97:8): [True: 0, False: 0]
  ------------------
   98|      0|			LDAP_VFREE(ld->ld_referrals);
  ------------------
  |  |  649|      0|#define LDAP_VFREE(v)		(ber_memvfree_x((void **)(v),NULL))
  ------------------
   99|      0|			ld->ld_referrals = NULL;
  100|      0|		}
  101|      0|		LDAP_MUTEX_UNLOCK( &ld->ld_ldcmutex );
  ------------------
  |  |  552|      0|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  102|      0|		LDAP_FREE( (char *) ld );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  103|      0|		return( err );
  104|      0|	}
  105|       |
  106|       |	/* This ld is the last thread. */
  107|  3.39k|	LDAP_MUTEX_UNLOCK( &ld->ld_ldcmutex );
  ------------------
  |  |  552|  3.39k|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  108|       |
  109|       |	/* free LDAP structure and outstanding requests/responses */
  110|  3.39k|	LDAP_MUTEX_LOCK( &ld->ld_req_mutex );
  ------------------
  |  |  551|  3.39k|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  111|  3.39k|	ldap_tavl_free( ld->ld_requests, ldap_do_free_request );
  ------------------
  |  |  454|  3.39k|#define	ld_requests		ldc->ldc_requests
  ------------------
  112|  3.39k|	ld->ld_requests = NULL;
  ------------------
  |  |  454|  3.39k|#define	ld_requests		ldc->ldc_requests
  ------------------
  113|  3.39k|	LDAP_MUTEX_UNLOCK( &ld->ld_req_mutex );
  ------------------
  |  |  552|  3.39k|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  114|  3.39k|	LDAP_MUTEX_LOCK( &ld->ld_conn_mutex );
  ------------------
  |  |  551|  3.39k|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  115|       |
  116|       |	/* free and unbind from all open connections */
  117|  6.28k|	while ( ld->ld_conns != NULL ) {
  ------------------
  |  |  473|  6.28k|#define	ld_conns		ldc->ldc_conns
  ------------------
  |  Branch (117:10): [True: 2.89k, False: 3.39k]
  ------------------
  118|  2.89k|		ldap_free_connection( ld, ld->ld_conns, 1, close );
  ------------------
  |  |  473|  2.89k|#define	ld_conns		ldc->ldc_conns
  ------------------
  119|  2.89k|	}
  120|  3.39k|	LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex );
  ------------------
  |  |  552|  3.39k|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  121|  3.39k|	LDAP_MUTEX_LOCK( &ld->ld_res_mutex );
  ------------------
  |  |  551|  3.39k|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  122|  3.51k|	for ( lm = ld->ld_responses; lm != NULL; lm = next ) {
  ------------------
  |  |  455|  3.39k|#define	ld_responses		ldc->ldc_responses
  ------------------
  |  Branch (122:31): [True: 127, False: 3.39k]
  ------------------
  123|    127|		next = lm->lm_next;
  124|    127|		ldap_msgfree( lm );
  125|    127|	}
  126|       |
  127|  3.39k|	if ( ld->ld_abandoned != NULL ) {
  ------------------
  |  |  461|  3.39k|#define	ld_abandoned		ldc->ldc_abandoned
  ------------------
  |  Branch (127:7): [True: 769, False: 2.62k]
  ------------------
  128|    769|		LDAP_FREE( ld->ld_abandoned );
  ------------------
  |  |  648|    769|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  129|    769|		ld->ld_abandoned = NULL;
  ------------------
  |  |  461|    769|#define	ld_abandoned		ldc->ldc_abandoned
  ------------------
  130|    769|	}
  131|  3.39k|	LDAP_MUTEX_UNLOCK( &ld->ld_res_mutex );
  ------------------
  |  |  552|  3.39k|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  132|       |
  133|       |	/* Should already be closed by ldap_free_connection which knows not to free
  134|       |	 * this one */
  135|  3.39k|	ber_int_sb_destroy( ld->ld_sb );
  ------------------
  |  |  440|  3.39k|#define ld_sb			ldc->ldc_sb
  ------------------
  136|  3.39k|	LBER_FREE( ld->ld_sb );
  ------------------
  |  |  201|  3.39k|#define LBER_FREE(p)		ber_memfree((p))	
  ------------------
  137|       |
  138|  3.39k|	LDAP_MUTEX_LOCK( &ld->ld_ldopts_mutex );
  ------------------
  |  |  551|  3.39k|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  ------------------
  139|       |
  140|       |	/* final close callbacks */
  141|  3.39k|	{
  142|  3.39k|		ldaplist *ll, *next;
  143|       |
  144|  3.39k|		for ( ll = ld->ld_options.ldo_conn_cbs; ll; ll = next ) {
  ------------------
  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  ------------------
  |  Branch (144:43): [True: 0, False: 3.39k]
  ------------------
  145|      0|			ldap_conncb *cb = ll->ll_data;
  146|      0|			next = ll->ll_next;
  147|      0|			cb->lc_del( ld, NULL, cb );
  148|      0|			LDAP_FREE( ll );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  149|      0|		}
  150|  3.39k|	}
  151|       |
  152|  3.39k|	if ( ld->ld_error != NULL ) {
  ------------------
  |  Branch (152:7): [True: 373, False: 3.01k]
  ------------------
  153|    373|		LDAP_FREE( ld->ld_error );
  ------------------
  |  |  648|    373|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  154|    373|		ld->ld_error = NULL;
  155|    373|	}
  156|       |
  157|  3.39k|	if ( ld->ld_matched != NULL ) {
  ------------------
  |  Branch (157:7): [True: 469, False: 2.92k]
  ------------------
  158|    469|		LDAP_FREE( ld->ld_matched );
  ------------------
  |  |  648|    469|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  159|    469|		ld->ld_matched = NULL;
  160|    469|	}
  161|       |
  162|  3.39k|	if ( ld->ld_referrals != NULL) {
  ------------------
  |  Branch (162:7): [True: 90, False: 3.30k]
  ------------------
  163|     90|		LDAP_VFREE(ld->ld_referrals);
  ------------------
  |  |  649|     90|#define LDAP_VFREE(v)		(ber_memvfree_x((void **)(v),NULL))
  ------------------
  164|     90|		ld->ld_referrals = NULL;
  165|     90|	}
  166|       |
  167|  3.39k|	if ( ld->ld_selectinfo != NULL ) {
  ------------------
  |  |  475|  3.39k|#define	ld_selectinfo		ldc->ldc_selectinfo
  ------------------
  |  Branch (167:7): [True: 3.39k, False: 0]
  ------------------
  168|  3.39k|		ldap_free_select_info( ld->ld_selectinfo );
  ------------------
  |  |  475|  3.39k|#define	ld_selectinfo		ldc->ldc_selectinfo
  ------------------
  169|  3.39k|		ld->ld_selectinfo = NULL;
  ------------------
  |  |  475|  3.39k|#define	ld_selectinfo		ldc->ldc_selectinfo
  ------------------
  170|  3.39k|	}
  171|       |
  172|  3.39k|	if ( ld->ld_options.ldo_defludp != NULL ) {
  ------------------
  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  ------------------
  |  Branch (172:7): [True: 3.39k, False: 0]
  ------------------
  173|  3.39k|		ldap_free_urllist( ld->ld_options.ldo_defludp );
  ------------------
  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  ------------------
  174|  3.39k|		ld->ld_options.ldo_defludp = NULL;
  ------------------
  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  ------------------
  175|  3.39k|	}
  176|       |
  177|  3.39k|	if ( ld->ld_options.ldo_local_ip_addrs.local_ip_addrs ) {
  ------------------
  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  ------------------
  |  Branch (177:7): [True: 0, False: 3.39k]
  ------------------
  178|      0|		LDAP_FREE( ld->ld_options.ldo_local_ip_addrs.local_ip_addrs );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  179|      0|		memset( & ld->ld_options.ldo_local_ip_addrs, 0,
  ------------------
  |  |  484|      0|#define ld_options		ldc->ldc_options
  ------------------
  180|      0|			sizeof( ldapsourceip ) );
  181|      0|	}
  182|       |
  183|       |#ifdef LDAP_CONNECTIONLESS
  184|       |	if ( ld->ld_options.ldo_peer != NULL ) {
  185|       |		LDAP_FREE( ld->ld_options.ldo_peer );
  186|       |		ld->ld_options.ldo_peer = NULL;
  187|       |	}
  188|       |
  189|       |	if ( ld->ld_options.ldo_cldapdn != NULL ) {
  190|       |		LDAP_FREE( ld->ld_options.ldo_cldapdn );
  191|       |		ld->ld_options.ldo_cldapdn = NULL;
  192|       |	}
  193|       |#endif
  194|       |
  195|  3.39k|	if ( ld->ld_options.ldo_defbase != NULL ) {
  ------------------
  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  ------------------
  |  Branch (195:7): [True: 0, False: 3.39k]
  ------------------
  196|      0|		LDAP_FREE( ld->ld_options.ldo_defbase );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  197|      0|		ld->ld_options.ldo_defbase = NULL;
  ------------------
  |  |  484|      0|#define ld_options		ldc->ldc_options
  ------------------
  198|      0|	}
  199|       |
  200|       |#ifdef HAVE_CYRUS_SASL
  201|       |	if ( ld->ld_options.ldo_def_sasl_mech != NULL ) {
  202|       |		LDAP_FREE( ld->ld_options.ldo_def_sasl_mech );
  203|       |		ld->ld_options.ldo_def_sasl_mech = NULL;
  204|       |	}
  205|       |
  206|       |	if ( ld->ld_options.ldo_def_sasl_realm != NULL ) {
  207|       |		LDAP_FREE( ld->ld_options.ldo_def_sasl_realm );
  208|       |		ld->ld_options.ldo_def_sasl_realm = NULL;
  209|       |	}
  210|       |
  211|       |	if ( ld->ld_options.ldo_def_sasl_authcid != NULL ) {
  212|       |		LDAP_FREE( ld->ld_options.ldo_def_sasl_authcid );
  213|       |		ld->ld_options.ldo_def_sasl_authcid = NULL;
  214|       |	}
  215|       |
  216|       |	if ( ld->ld_options.ldo_def_sasl_authzid != NULL ) {
  217|       |		LDAP_FREE( ld->ld_options.ldo_def_sasl_authzid );
  218|       |		ld->ld_options.ldo_def_sasl_authzid = NULL;
  219|       |	}
  220|       |#endif
  221|       |
  222|       |#ifdef HAVE_TLS
  223|       |	ldap_int_tls_destroy( &ld->ld_options );
  224|       |#endif
  225|       |
  226|  3.39k|	if ( ld->ld_options.ldo_sctrls != NULL ) {
  ------------------
  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  ------------------
  |  Branch (226:7): [True: 0, False: 3.39k]
  ------------------
  227|      0|		ldap_controls_free( ld->ld_options.ldo_sctrls );
  ------------------
  |  |  484|      0|#define ld_options		ldc->ldc_options
  ------------------
  228|      0|		ld->ld_options.ldo_sctrls = NULL;
  ------------------
  |  |  484|      0|#define ld_options		ldc->ldc_options
  ------------------
  229|      0|	}
  230|       |
  231|  3.39k|	if ( ld->ld_options.ldo_cctrls != NULL ) {
  ------------------
  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  ------------------
  |  Branch (231:7): [True: 0, False: 3.39k]
  ------------------
  232|      0|		ldap_controls_free( ld->ld_options.ldo_cctrls );
  ------------------
  |  |  484|      0|#define ld_options		ldc->ldc_options
  ------------------
  233|      0|		ld->ld_options.ldo_cctrls = NULL;
  ------------------
  |  |  484|      0|#define ld_options		ldc->ldc_options
  ------------------
  234|      0|	}
  235|  3.39k|	LDAP_MUTEX_UNLOCK( &ld->ld_ldopts_mutex );
  ------------------
  |  |  552|  3.39k|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  ------------------
  236|       |
  237|  3.39k|#ifdef LDAP_R_COMPILE
  238|  3.39k|	ldap_pvt_thread_mutex_destroy( &ld->ld_msgid_mutex );
  ------------------
  |  |  520|  3.39k|#define	ld_msgid_mutex		ldc->ldc_msgid_mutex
  ------------------
  239|  3.39k|	ldap_pvt_thread_mutex_destroy( &ld->ld_conn_mutex );
  ------------------
  |  |  521|  3.39k|#define	ld_conn_mutex		ldc->ldc_conn_mutex
  ------------------
  240|  3.39k|	ldap_pvt_thread_mutex_destroy( &ld->ld_req_mutex );
  ------------------
  |  |  522|  3.39k|#define	ld_req_mutex		ldc->ldc_req_mutex
  ------------------
  241|  3.39k|	ldap_pvt_thread_mutex_destroy( &ld->ld_res_mutex );
  ------------------
  |  |  523|  3.39k|#define	ld_res_mutex		ldc->ldc_res_mutex
  ------------------
  242|  3.39k|	ldap_pvt_thread_mutex_destroy( &ld->ld_abandon_mutex );
  ------------------
  |  |  524|  3.39k|#define	ld_abandon_mutex	ldc->ldc_abandon_mutex
  ------------------
  243|  3.39k|	ldap_pvt_thread_mutex_destroy( &ld->ld_ldopts_mutex );
  ------------------
  |  |  518|  3.39k|#define	ld_ldopts_mutex		ld_options.ldo_mutex
  |  |  ------------------
  |  |  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  |  |  ------------------
  ------------------
  244|  3.39k|	ldap_pvt_thread_mutex_destroy( &ld->ld_ldcmutex );
  ------------------
  |  |  519|  3.39k|#define	ld_ldcmutex		ldc->ldc_mutex
  ------------------
  245|  3.39k|#endif
  246|  3.39k|#ifndef NDEBUG
  247|  3.39k|	LDAP_TRASH(ld);
  ------------------
  |  |  541|  3.39k|#define LDAP_TRASH(ld)		( (ld)->ld_valid = LDAP_TRASHED_SESSION )
  |  |  ------------------
  |  |  |  |  486|  3.39k|#define ld_valid		ld_options.ldo_valid
  |  |  |  |  ------------------
  |  |  |  |  |  |  484|  3.39k|#define ld_options		ldc->ldc_options
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define LDAP_TRASH(ld)		( (ld)->ld_valid = LDAP_TRASHED_SESSION )
  |  |  ------------------
  |  |  |  |  226|  3.39k|#define LDAP_TRASHED_SESSION	0xFF
  |  |  ------------------
  ------------------
  248|  3.39k|#endif
  249|  3.39k|	LDAP_FREE( (char *) ld->ldc );
  ------------------
  |  |  648|  3.39k|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  250|  3.39k|	LDAP_FREE( (char *) ld );
  ------------------
  |  |  648|  3.39k|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  251|       |
  252|  3.39k|	return( err );
  253|  3.39k|}
ldap_send_unbind:
  275|  1.93k|{
  276|  1.93k|	BerElement	*ber;
  277|  1.93k|	ber_int_t	id;
  278|       |
  279|  1.93k|	Debug0( LDAP_DEBUG_TRACE, "ldap_send_unbind\n" );
  ------------------
  |  |   87|  1.93k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  1.93k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  1.93k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  1.93k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 1.93k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|  1.93k|	ldap_log_printf( NULL, (level), fmt ); \
  |  |   89|  1.93k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (89:12): [Folded, False: 1.93k]
  |  |  ------------------
  ------------------
  280|       |
  281|       |#ifdef LDAP_CONNECTIONLESS
  282|       |	if (LDAP_IS_UDP(ld))
  283|       |		return LDAP_SUCCESS;
  284|       |#endif
  285|       |	/* create a message to send */
  286|  1.93k|	if ( (ber = ldap_alloc_ber_with_options( ld )) == NULL ) {
  ------------------
  |  Branch (286:7): [True: 0, False: 1.93k]
  ------------------
  287|      0|		return( ld->ld_errno );
  288|      0|	}
  289|       |
  290|  1.93k|	LDAP_NEXT_MSGID(ld, id);
  ------------------
  |  |  561|  1.93k|#define	LDAP_NEXT_MSGID(ld, id) do { \
  |  |  562|  1.93k|	LDAP_MUTEX_LOCK( &(ld)->ld_msgid_mutex ); \
  |  |  ------------------
  |  |  |  |  551|  1.93k|#define LDAP_MUTEX_LOCK(mutex)    ldap_pvt_thread_mutex_lock( mutex )
  |  |  ------------------
  |  |  563|  1.93k|	(id) = ++(ld)->ld_msgid; \
  |  |  ------------------
  |  |  |  |  447|  1.93k|#define	ld_msgid		ldc->ldc_msgid
  |  |  ------------------
  |  |  564|  1.93k|	LDAP_MUTEX_UNLOCK( &(ld)->ld_msgid_mutex ); \
  |  |  ------------------
  |  |  |  |  552|  1.93k|#define LDAP_MUTEX_UNLOCK(mutex)  ldap_pvt_thread_mutex_unlock( mutex )
  |  |  ------------------
  |  |  565|  1.93k|} while (0)
  |  |  ------------------
  |  |  |  Branch (565:10): [Folded, False: 1.93k]
  |  |  ------------------
  ------------------
  291|       |
  292|       |	/* fill it in */
  293|  1.93k|	if ( ber_printf( ber, "{itn" /*}*/, id,
  ------------------
  |  Branch (293:7): [True: 0, False: 1.93k]
  ------------------
  294|  1.93k|	    LDAP_REQ_UNBIND ) == -1 ) {
  ------------------
  |  |  521|  1.93k|#define LDAP_REQ_UNBIND		((ber_tag_t) 0x42U)	/* application + primitive   */
  ------------------
  295|      0|		ld->ld_errno = LDAP_ENCODING_ERROR;
  ------------------
  |  |  738|      0|#define LDAP_ENCODING_ERROR				(-3)
  ------------------
  296|      0|		ber_free( ber, 1 );
  297|      0|		return( ld->ld_errno );
  298|      0|	}
  299|       |
  300|       |	/* Put Server Controls */
  301|  1.93k|	if( ldap_int_put_controls( ld, sctrls, ber ) != LDAP_SUCCESS ) {
  ------------------
  |  |  610|  1.93k|#define LDAP_SUCCESS				0x00
  ------------------
  |  Branch (301:6): [True: 0, False: 1.93k]
  ------------------
  302|      0|		ber_free( ber, 1 );
  303|      0|		return ld->ld_errno;
  304|      0|	}
  305|       |
  306|  1.93k|	if ( ber_printf( ber, /*{*/ "N}", LDAP_REQ_UNBIND ) == -1 ) {
  ------------------
  |  |  521|  1.93k|#define LDAP_REQ_UNBIND		((ber_tag_t) 0x42U)	/* application + primitive   */
  ------------------
  |  Branch (306:7): [True: 0, False: 1.93k]
  ------------------
  307|      0|		ld->ld_errno = LDAP_ENCODING_ERROR;
  ------------------
  |  |  738|      0|#define LDAP_ENCODING_ERROR				(-3)
  ------------------
  308|      0|		ber_free( ber, 1 );
  309|      0|		return( ld->ld_errno );
  310|      0|	}
  311|       |
  312|  1.93k|	ld->ld_errno = LDAP_SUCCESS;
  ------------------
  |  |  610|  1.93k|#define LDAP_SUCCESS				0x00
  ------------------
  313|       |	/* send the message */
  314|  1.93k|	if ( ber_flush2( sb, ber, LBER_FLUSH_FREE_ALWAYS ) == -1 ) {
  ------------------
  |  |  479|  1.93k|#define LBER_FLUSH_FREE_ALWAYS		(LBER_FLUSH_FREE_ON_SUCCESS|LBER_FLUSH_FREE_ON_ERROR)
  |  |  ------------------
  |  |  |  |  477|  1.93k|#define LBER_FLUSH_FREE_ON_SUCCESS	(0x1)	/* traditional behavior */
  |  |  ------------------
  |  |               #define LBER_FLUSH_FREE_ALWAYS		(LBER_FLUSH_FREE_ON_SUCCESS|LBER_FLUSH_FREE_ON_ERROR)
  |  |  ------------------
  |  |  |  |  478|  1.93k|#define LBER_FLUSH_FREE_ON_ERROR	(0x2)
  |  |  ------------------
  ------------------
  |  Branch (314:7): [True: 0, False: 1.93k]
  ------------------
  315|      0|		ld->ld_errno = LDAP_SERVER_DOWN;
  ------------------
  |  |  736|      0|#define LDAP_SERVER_DOWN				(-1)
  ------------------
  316|      0|	}
  317|       |
  318|  1.93k|	return( ld->ld_errno );
  319|  1.93k|}

ldap_pvt_url_scheme2proto:
   55|  15.8k|{
   56|  15.8k|	assert( scheme != NULL );
  ------------------
  |  Branch (56:2): [True: 0, False: 15.8k]
  |  Branch (56:2): [True: 15.8k, False: 0]
  ------------------
   57|       |
   58|  15.8k|	if( scheme == NULL ) {
  ------------------
  |  Branch (58:6): [True: 0, False: 15.8k]
  ------------------
   59|      0|		return -1;
   60|      0|	}
   61|       |
   62|  15.8k|	if( strcmp("ldap", scheme) == 0 || strcmp("pldap", scheme) == 0 ) {
  ------------------
  |  Branch (62:6): [True: 13.6k, False: 2.21k]
  |  Branch (62:37): [True: 0, False: 2.21k]
  ------------------
   63|  13.6k|		return LDAP_PROTO_TCP;
  ------------------
  |  |   25|  13.6k|#define LDAP_PROTO_TCP 1 /* ldap://  */
  ------------------
   64|  13.6k|	}
   65|       |
   66|  2.21k|	if( strcmp("ldapi", scheme) == 0 ) {
  ------------------
  |  Branch (66:6): [True: 0, False: 2.21k]
  ------------------
   67|      0|		return LDAP_PROTO_IPC;
  ------------------
  |  |   27|      0|#define LDAP_PROTO_IPC 3 /* ldapi:// */
  ------------------
   68|      0|	}
   69|       |
   70|  2.21k|	if( strcmp("ldaps", scheme) == 0 || strcmp("pldaps", scheme) == 0 ) {
  ------------------
  |  Branch (70:6): [True: 2.21k, False: 0]
  |  Branch (70:38): [True: 0, False: 0]
  ------------------
   71|  2.21k|		return LDAP_PROTO_TCP;
  ------------------
  |  |   25|  2.21k|#define LDAP_PROTO_TCP 1 /* ldap://  */
  ------------------
   72|  2.21k|	}
   73|       |#ifdef LDAP_CONNECTIONLESS
   74|       |	if( strcmp("cldap", scheme) == 0 ) {
   75|       |		return LDAP_PROTO_UDP;
   76|       |	}
   77|       |#endif
   78|       |
   79|      0|	return -1;
   80|  2.21k|}
ldap_pvt_bv2scope:
  329|    107|{
  330|    107|	static struct {
  331|    107|		struct berval	bv;
  332|    107|		int		scope;
  333|    107|	}	v[] = {
  334|    107|		{ BER_BVC( "one" ),		LDAP_SCOPE_ONELEVEL },
  ------------------
  |  |  205|    107|#define BER_BVC(s)		{ BER_STRLENOF(s), (char *)(s) }
  |  |  ------------------
  |  |  |  |  204|    107|#define BER_STRLENOF(s)	(sizeof(s)-1)
  |  |  ------------------
  ------------------
              		{ BER_BVC( "one" ),		LDAP_SCOPE_ONELEVEL },
  ------------------
  |  |  594|    107|#define LDAP_SCOPE_ONELEVEL		((ber_int_t) 0x0001)
  ------------------
  335|    107|		{ BER_BVC( "onelevel" ),	LDAP_SCOPE_ONELEVEL },
  ------------------
  |  |  205|    107|#define BER_BVC(s)		{ BER_STRLENOF(s), (char *)(s) }
  |  |  ------------------
  |  |  |  |  204|    107|#define BER_STRLENOF(s)	(sizeof(s)-1)
  |  |  ------------------
  ------------------
              		{ BER_BVC( "onelevel" ),	LDAP_SCOPE_ONELEVEL },
  ------------------
  |  |  594|    107|#define LDAP_SCOPE_ONELEVEL		((ber_int_t) 0x0001)
  ------------------
  336|    107|		{ BER_BVC( "base" ),		LDAP_SCOPE_BASE },
  ------------------
  |  |  205|    107|#define BER_BVC(s)		{ BER_STRLENOF(s), (char *)(s) }
  |  |  ------------------
  |  |  |  |  204|    107|#define BER_STRLENOF(s)	(sizeof(s)-1)
  |  |  ------------------
  ------------------
              		{ BER_BVC( "base" ),		LDAP_SCOPE_BASE },
  ------------------
  |  |  592|    107|#define LDAP_SCOPE_BASE			((ber_int_t) 0x0000)
  ------------------
  337|    107|		{ BER_BVC( "sub" ),		LDAP_SCOPE_SUBTREE },
  ------------------
  |  |  205|    107|#define BER_BVC(s)		{ BER_STRLENOF(s), (char *)(s) }
  |  |  ------------------
  |  |  |  |  204|    107|#define BER_STRLENOF(s)	(sizeof(s)-1)
  |  |  ------------------
  ------------------
              		{ BER_BVC( "sub" ),		LDAP_SCOPE_SUBTREE },
  ------------------
  |  |  596|    107|#define LDAP_SCOPE_SUBTREE		((ber_int_t) 0x0002)
  ------------------
  338|    107|		{ BER_BVC( "subtree" ),		LDAP_SCOPE_SUBTREE },
  ------------------
  |  |  205|    107|#define BER_BVC(s)		{ BER_STRLENOF(s), (char *)(s) }
  |  |  ------------------
  |  |  |  |  204|    107|#define BER_STRLENOF(s)	(sizeof(s)-1)
  |  |  ------------------
  ------------------
              		{ BER_BVC( "subtree" ),		LDAP_SCOPE_SUBTREE },
  ------------------
  |  |  596|    107|#define LDAP_SCOPE_SUBTREE		((ber_int_t) 0x0002)
  ------------------
  339|    107|		{ BER_BVC( "subord" ),		LDAP_SCOPE_SUBORDINATE },
  ------------------
  |  |  205|    107|#define BER_BVC(s)		{ BER_STRLENOF(s), (char *)(s) }
  |  |  ------------------
  |  |  |  |  204|    107|#define BER_STRLENOF(s)	(sizeof(s)-1)
  |  |  ------------------
  ------------------
              		{ BER_BVC( "subord" ),		LDAP_SCOPE_SUBORDINATE },
  ------------------
  |  |  598|    107|#define LDAP_SCOPE_SUBORDINATE	((ber_int_t) 0x0003) /* OpenLDAP extension */
  ------------------
  340|    107|		{ BER_BVC( "subordinate" ),	LDAP_SCOPE_SUBORDINATE },
  ------------------
  |  |  205|    107|#define BER_BVC(s)		{ BER_STRLENOF(s), (char *)(s) }
  |  |  ------------------
  |  |  |  |  204|    107|#define BER_STRLENOF(s)	(sizeof(s)-1)
  |  |  ------------------
  ------------------
              		{ BER_BVC( "subordinate" ),	LDAP_SCOPE_SUBORDINATE },
  ------------------
  |  |  598|    107|#define LDAP_SCOPE_SUBORDINATE	((ber_int_t) 0x0003) /* OpenLDAP extension */
  ------------------
  341|    107|		{ BER_BVC( "children" ),	LDAP_SCOPE_SUBORDINATE },
  ------------------
  |  |  205|    107|#define BER_BVC(s)		{ BER_STRLENOF(s), (char *)(s) }
  |  |  ------------------
  |  |  |  |  204|    107|#define BER_STRLENOF(s)	(sizeof(s)-1)
  |  |  ------------------
  ------------------
              		{ BER_BVC( "children" ),	LDAP_SCOPE_SUBORDINATE },
  ------------------
  |  |  598|    107|#define LDAP_SCOPE_SUBORDINATE	((ber_int_t) 0x0003) /* OpenLDAP extension */
  ------------------
  342|    107|		{ BER_BVNULL,			-1 }
  ------------------
  |  |  206|    107|#define BER_BVNULL		{ 0L, NULL }
  ------------------
  343|    107|	};
  344|    107|	int	i;
  345|       |
  346|    905|	for ( i = 0; v[ i ].scope != -1; i++ ) {
  ------------------
  |  Branch (346:15): [True: 809, False: 96]
  ------------------
  347|    809|		if ( ber_bvstrcasecmp( bv, &v[ i ].bv ) == 0 ) {
  ------------------
  |  |  162|    809|	((v1)->bv_len < (v2)->bv_len \
  |  |  ------------------
  |  |  |  Branch (162:3): [True: 259, False: 550]
  |  |  ------------------
  |  |  163|    809|		? -1 : ((v1)->bv_len > (v2)->bv_len \
  |  |  ------------------
  |  |  |  Branch (163:11): [True: 420, False: 130]
  |  |  ------------------
  |  |  164|    550|			? 1 : strncasecmp((v1)->bv_val, (v2)->bv_val, (v1)->bv_len) ))
  ------------------
  |  Branch (347:8): [True: 11, False: 798]
  ------------------
  348|     11|			return v[ i ].scope;
  349|     11|		}
  350|    809|	}
  351|       |
  352|     96|	return( -1 );
  353|    107|}
ldap_pvt_str2scope:
  357|    107|{
  358|    107|	struct berval	bv;
  359|       |
  360|    107|	ber_str2bv( p, 0, 0, &bv );
  361|       |
  362|    107|	return ldap_pvt_bv2scope( &bv );
  363|    107|}
ldap_url_parse_ext:
  821|  12.4k|{
  822|       |/*
  823|       | *  Pick apart the pieces of an LDAP URL.
  824|       | */
  825|       |
  826|  12.4k|	LDAPURLDesc	*ludp;
  827|  12.4k|	char	*p, *q, *r;
  828|  12.4k|	int		i, enclosed, proto, is_v6 = 0;
  829|  12.4k|	const char *scheme = NULL;
  830|  12.4k|	const char *url_tmp;
  831|  12.4k|	char *url;
  832|       |
  833|  12.4k|	int	check_dn = 1;
  834|       |
  835|  12.4k|	if( url_in == NULL || ludpp == NULL ) {
  ------------------
  |  Branch (835:6): [True: 0, False: 12.4k]
  |  Branch (835:24): [True: 0, False: 12.4k]
  ------------------
  836|      0|		return LDAP_URL_ERR_PARAM;
  ------------------
  |  |  825|      0|#define LDAP_URL_ERR_PARAM		0x02	/* parameter is bad */
  ------------------
  837|      0|	}
  838|       |
  839|  12.4k|#ifndef LDAP_INT_IN_KERNEL
  840|       |	/* Global options may not be created yet
  841|       |	 * We can't test if the global options are initialized
  842|       |	 * because a call to LDAP_INT_GLOBAL_OPT() will try to allocate
  843|       |	 * the options and cause infinite recursion
  844|       |	 */
  845|  12.4k|	Debug1( LDAP_DEBUG_TRACE, "ldap_url_parse_ext(%s)\n", url_in );
  ------------------
  |  |   92|  12.4k|	do { if ( DebugTest( (level) ) ) \
  |  |  ------------------
  |  |  |  |   84|  12.4k|	( ldap_debug & level )
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  12.4k|#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|  12.4k|#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (84:2): [True: 0, False: 12.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|  12.4k|	ldap_log_printf( NULL, (level), fmt, arg1 ); \
  |  |   94|  12.4k|	} while ( 0 )
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 12.4k]
  |  |  ------------------
  ------------------
  846|  12.4k|#endif
  847|       |
  848|  12.4k|	*ludpp = NULL;	/* pessimistic */
  849|       |
  850|  12.4k|	url_tmp = skip_url_prefix( url_in, &enclosed, &scheme );
  851|       |
  852|  12.4k|	if ( url_tmp == NULL ) {
  ------------------
  |  Branch (852:7): [True: 0, False: 12.4k]
  ------------------
  853|      0|		return LDAP_URL_ERR_BADSCHEME;
  ------------------
  |  |  827|      0|#define LDAP_URL_ERR_BADSCHEME	0x03	/* URL doesn't begin with "ldap[si]://" */
  ------------------
  854|      0|	}
  855|       |
  856|  12.4k|	assert( scheme != NULL );
  ------------------
  |  Branch (856:2): [True: 0, False: 12.4k]
  |  Branch (856:2): [True: 12.4k, False: 0]
  ------------------
  857|       |
  858|  12.4k|	proto = ldap_pvt_url_scheme2proto( scheme );
  859|  12.4k|	if ( proto == -1 ) {
  ------------------
  |  Branch (859:7): [True: 0, False: 12.4k]
  ------------------
  860|      0|		return LDAP_URL_ERR_BADSCHEME;
  ------------------
  |  |  827|      0|#define LDAP_URL_ERR_BADSCHEME	0x03	/* URL doesn't begin with "ldap[si]://" */
  ------------------
  861|      0|	}
  862|       |
  863|       |	/* make working copy of the remainder of the URL */
  864|  12.4k|	url = LDAP_STRDUP( url_tmp );
  ------------------
  |  |  650|  12.4k|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  865|  12.4k|	if ( url == NULL ) {
  ------------------
  |  Branch (865:7): [True: 0, False: 12.4k]
  ------------------
  866|      0|		return LDAP_URL_ERR_MEM;
  ------------------
  |  |  824|      0|#define LDAP_URL_ERR_MEM		0x01	/* can't allocate memory space */
  ------------------
  867|      0|	}
  868|       |
  869|  12.4k|	if ( enclosed ) {
  ------------------
  |  Branch (869:7): [True: 0, False: 12.4k]
  ------------------
  870|      0|		if ( ! *url ) {
  ------------------
  |  Branch (870:8): [True: 0, False: 0]
  ------------------
  871|      0|			LDAP_FREE( url );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  872|      0|			return LDAP_URL_ERR_BADENCLOSURE;
  ------------------
  |  |  828|      0|#define LDAP_URL_ERR_BADENCLOSURE 0x04	/* URL is missing trailing ">" */
  ------------------
  873|      0|		}
  874|      0|		p = &url[strlen(url)-1];
  875|       |
  876|      0|		if( *p != '>' ) {
  ------------------
  |  Branch (876:7): [True: 0, False: 0]
  ------------------
  877|      0|			LDAP_FREE( url );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  878|      0|			return LDAP_URL_ERR_BADENCLOSURE;
  ------------------
  |  |  828|      0|#define LDAP_URL_ERR_BADENCLOSURE 0x04	/* URL is missing trailing ">" */
  ------------------
  879|      0|		}
  880|       |
  881|      0|		*p = '\0';
  882|      0|	}
  883|       |
  884|       |	/* allocate return struct */
  885|  12.4k|	ludp = (LDAPURLDesc *)LDAP_CALLOC( 1, sizeof( LDAPURLDesc ));
  ------------------
  |  |  646|  12.4k|#define LDAP_CALLOC(n,s)	(ber_memcalloc_x((n),(s),NULL))
  ------------------
  886|       |
  887|  12.4k|	if ( ludp == NULL ) {
  ------------------
  |  Branch (887:7): [True: 0, False: 12.4k]
  ------------------
  888|      0|		LDAP_FREE( url );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  889|      0|		return LDAP_URL_ERR_MEM;
  ------------------
  |  |  824|      0|#define LDAP_URL_ERR_MEM		0x01	/* can't allocate memory space */
  ------------------
  890|      0|	}
  891|       |
  892|  12.4k|	ludp->lud_next = NULL;
  893|  12.4k|	ludp->lud_host = NULL;
  894|  12.4k|	ludp->lud_port = 0;
  895|  12.4k|	ludp->lud_dn = NULL;
  896|  12.4k|	ludp->lud_attrs = NULL;
  897|  12.4k|	ludp->lud_scope = ( flags & LDAP_PVT_URL_PARSE_NODEF_SCOPE ) ? LDAP_SCOPE_BASE : LDAP_SCOPE_DEFAULT;
  ------------------
  |  |   49|  12.4k|#define LDAP_PVT_URL_PARSE_NODEF_SCOPE		(0x08U)
  ------------------
              	ludp->lud_scope = ( flags & LDAP_PVT_URL_PARSE_NODEF_SCOPE ) ? LDAP_SCOPE_BASE : LDAP_SCOPE_DEFAULT;
  ------------------
  |  |  592|  9.07k|#define LDAP_SCOPE_BASE			((ber_int_t) 0x0000)
  ------------------
              	ludp->lud_scope = ( flags & LDAP_PVT_URL_PARSE_NODEF_SCOPE ) ? LDAP_SCOPE_BASE : LDAP_SCOPE_DEFAULT;
  ------------------
  |  |  600|  15.8k|#define LDAP_SCOPE_DEFAULT		((ber_int_t) -1)	 /* OpenLDAP extension */
  ------------------
  |  Branch (897:20): [True: 9.07k, False: 3.39k]
  ------------------
  898|  12.4k|	ludp->lud_filter = NULL;
  899|  12.4k|	ludp->lud_exts = NULL;
  900|       |
  901|  12.4k|	ludp->lud_scheme = LDAP_STRDUP( scheme );
  ------------------
  |  |  650|  12.4k|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  902|       |
  903|  12.4k|	if ( ludp->lud_scheme == NULL ) {
  ------------------
  |  Branch (903:7): [True: 0, False: 12.4k]
  ------------------
  904|      0|		LDAP_FREE( url );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  905|      0|		ldap_free_urldesc( ludp );
  906|      0|		return LDAP_URL_ERR_MEM;
  ------------------
  |  |  824|      0|#define LDAP_URL_ERR_MEM		0x01	/* can't allocate memory space */
  ------------------
  907|      0|	}
  908|       |
  909|       |	/* scan forward for '/' that marks end of hostport and begin. of dn */
  910|  12.4k|	p = strchr( url, '/' );
  911|  12.4k|	q = NULL;
  912|       |
  913|  12.4k|	if( p != NULL ) {
  ------------------
  |  Branch (913:6): [True: 9.07k, False: 3.39k]
  ------------------
  914|       |		/* terminate hostport; point to start of dn */
  915|  9.07k|		*p++ = '\0';
  916|  9.07k|	} else {
  917|       |		/* check for Novell kludge, see below */
  918|  3.39k|		p = strchr( url, '?' );
  919|  3.39k|		if ( p ) {
  ------------------
  |  Branch (919:8): [True: 0, False: 3.39k]
  ------------------
  920|      0|			*p++ = '\0';
  921|      0|			q = p;
  922|      0|			p = NULL;
  923|      0|		}
  924|  3.39k|	}
  925|       |
  926|  12.4k|	if ( proto != LDAP_PROTO_IPC ) {
  ------------------
  |  |   27|  12.4k|#define LDAP_PROTO_IPC 3 /* ldapi:// */
  ------------------
  |  Branch (926:7): [True: 12.4k, False: 0]
  ------------------
  927|       |		/* IPv6 syntax with [ip address]:port */
  928|  12.4k|		if ( *url == '[' ) {
  ------------------
  |  Branch (928:8): [True: 176, False: 12.2k]
  ------------------
  929|    176|			r = strchr( url, ']' );
  930|    176|			if ( r == NULL ) {
  ------------------
  |  Branch (930:9): [True: 1, False: 175]
  ------------------
  931|      1|				LDAP_FREE( url );
  ------------------
  |  |  648|      1|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  932|      1|				ldap_free_urldesc( ludp );
  933|      1|				return LDAP_URL_ERR_BADURL;
  ------------------
  |  |  829|      1|#define LDAP_URL_ERR_BADURL		0x05	/* URL is bad */
  ------------------
  934|      1|			}
  935|    175|			*r++ = '\0';
  936|    175|			q = strchr( r, ':' );
  937|    175|			if ( q && q != r ) {
  ------------------
  |  Branch (937:9): [True: 70, False: 105]
  |  Branch (937:14): [True: 1, False: 69]
  ------------------
  938|      1|				LDAP_FREE( url );
  ------------------
  |  |  648|      1|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  939|      1|				ldap_free_urldesc( ludp );
  940|      1|				return LDAP_URL_ERR_BADURL;
  ------------------
  |  |  829|      1|#define LDAP_URL_ERR_BADURL		0x05	/* URL is bad */
  ------------------
  941|      1|			}
  942|    174|			is_v6 = 1;
  943|  12.2k|		} else {
  944|  12.2k|			q = strchr( url, ':' );
  945|  12.2k|		}
  946|       |
  947|  12.4k|		if ( q != NULL ) {
  ------------------
  |  Branch (947:8): [True: 3.62k, False: 8.84k]
  ------------------
  948|  3.62k|			char	*next;
  949|       |
  950|  3.62k|			*q++ = '\0';
  951|  3.62k|			ldap_pvt_hex_unescape( q );
  952|       |
  953|  3.62k|			if( *q == '\0' ) {
  ------------------
  |  Branch (953:8): [True: 1, False: 3.62k]
  ------------------
  954|      1|				LDAP_FREE( url );
  ------------------
  |  |  648|      1|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  955|      1|				ldap_free_urldesc( ludp );
  956|      1|				return LDAP_URL_ERR_BADURL;
  ------------------
  |  |  829|      1|#define LDAP_URL_ERR_BADURL		0x05	/* URL is bad */
  ------------------
  957|      1|			}
  958|       |
  959|  3.62k|			ludp->lud_port = strtol( q, &next, 10 );
  960|  3.62k|			if ( next == q || next[0] != '\0' ) {
  ------------------
  |  Branch (960:9): [True: 1, False: 3.62k]
  |  Branch (960:22): [True: 1, False: 3.62k]
  ------------------
  961|      2|				LDAP_FREE( url );
  ------------------
  |  |  648|      2|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  962|      2|				ldap_free_urldesc( ludp );
  963|      2|				return LDAP_URL_ERR_BADURL;
  ------------------
  |  |  829|      2|#define LDAP_URL_ERR_BADURL		0x05	/* URL is bad */
  ------------------
  964|      2|			}
  965|       |			/* check for Novell kludge */
  966|  3.62k|			if ( !p ) {
  ------------------
  |  Branch (966:9): [True: 3.39k, False: 229]
  ------------------
  967|  3.39k|				if ( *next != '\0' ) {
  ------------------
  |  Branch (967:10): [True: 0, False: 3.39k]
  ------------------
  968|      0|					q = &next[1];
  969|  3.39k|				} else {
  970|  3.39k|					q = NULL;
  971|  3.39k|				}
  972|  3.39k|			}
  973|  3.62k|		}
  974|       |
  975|  12.4k|		if ( ( flags & LDAP_PVT_URL_PARSE_DEF_PORT ) && ludp->lud_port == 0 ) {
  ------------------
  |  |   47|  12.4k|#define LDAP_PVT_URL_PARSE_DEF_PORT		(0x02U)
  ------------------
  |  Branch (975:8): [True: 12.4k, False: 0]
  |  Branch (975:51): [True: 8.85k, False: 3.60k]
  ------------------
  976|  8.85k|			if ( strcmp( ludp->lud_scheme, "ldaps" ) == 0 ) {
  ------------------
  |  Branch (976:9): [True: 2.19k, False: 6.66k]
  ------------------
  977|  2.19k|				ludp->lud_port = LDAPS_PORT;
  ------------------
  |  |   67|  2.19k|#define LDAPS_PORT		636		/* ldaps:///	default LDAP over TLS port */
  ------------------
  978|  6.66k|			} else {
  979|  6.66k|				ludp->lud_port = LDAP_PORT;
  ------------------
  |  |   66|  6.66k|#define LDAP_PORT		389		/* ldap:///		default LDAP port */
  ------------------
  980|  6.66k|			}
  981|  8.85k|		}
  982|  12.4k|	}
  983|       |
  984|  12.4k|	ldap_pvt_hex_unescape( url );
  985|       |
  986|       |	/* If [ip address]:port syntax, url is [ip and we skip the [ */
  987|  12.4k|	ludp->lud_host = LDAP_STRDUP( url + is_v6 );
  ------------------
  |  |  650|  12.4k|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
  988|       |
  989|  12.4k|	if( ludp->lud_host == NULL ) {
  ------------------
  |  Branch (989:6): [True: 0, False: 12.4k]
  ------------------
  990|      0|		LDAP_FREE( url );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
  991|      0|		ldap_free_urldesc( ludp );
  992|      0|		return LDAP_URL_ERR_MEM;
  ------------------
  |  |  824|      0|#define LDAP_URL_ERR_MEM		0x01	/* can't allocate memory space */
  ------------------
  993|      0|	}
  994|       |
  995|  12.4k|	if ( ( flags & LDAP_PVT_URL_PARSE_NOEMPTY_HOST )
  ------------------
  |  |   46|  12.4k|#define LDAP_PVT_URL_PARSE_NOEMPTY_HOST		(0x01U)
  ------------------
  |  Branch (995:7): [True: 12.4k, False: 0]
  ------------------
  996|  12.4k|		&& ludp->lud_host != NULL
  ------------------
  |  Branch (996:6): [True: 12.4k, False: 0]
  ------------------
  997|  12.4k|		&& *ludp->lud_host == '\0' )
  ------------------
  |  Branch (997:6): [True: 1, False: 12.4k]
  ------------------
  998|      1|	{
  999|      1|		LDAP_FREE( ludp->lud_host );
  ------------------
  |  |  648|      1|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1000|      1|		ludp->lud_host = NULL;
 1001|      1|	}
 1002|       |
 1003|       |	/*
 1004|       |	 * Kludge.  ldap://111.222.333.444:389??cn=abc,o=company
 1005|       |	 *
 1006|       |	 * On early Novell releases, search references/referrals were returned
 1007|       |	 * in this format, i.e., the dn was kind of in the scope position,
 1008|       |	 * but the required slash is missing. The whole thing is illegal syntax,
 1009|       |	 * but we need to account for it. Fortunately it can't be confused with
 1010|       |	 * anything real.
 1011|       |	 */
 1012|  12.4k|	if( (p == NULL) && (q != NULL) && (*q == '?') ) {
  ------------------
  |  Branch (1012:6): [True: 3.39k, False: 9.07k]
  |  Branch (1012:21): [True: 0, False: 3.39k]
  |  Branch (1012:36): [True: 0, False: 0]
  ------------------
 1013|       |		/* ? immediately followed by question */
 1014|      0|		q++;
 1015|      0|		if( *q != '\0' ) {
  ------------------
  |  Branch (1015:7): [True: 0, False: 0]
  ------------------
 1016|       |			/* parse dn part */
 1017|      0|			ldap_pvt_hex_unescape( q );
 1018|      0|			ludp->lud_dn = LDAP_STRDUP( q );
  ------------------
  |  |  650|      0|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
 1019|       |
 1020|      0|		} else if ( !( flags & LDAP_PVT_URL_PARSE_NOEMPTY_DN ) ) {
  ------------------
  |  |   48|      0|#define LDAP_PVT_URL_PARSE_NOEMPTY_DN		(0x04U)
  ------------------
  |  Branch (1020:15): [True: 0, False: 0]
  ------------------
 1021|      0|			ludp->lud_dn = LDAP_STRDUP( "" );
  ------------------
  |  |  650|      0|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
 1022|       |
 1023|      0|		} else {
 1024|      0|			check_dn = 0;
 1025|      0|		}
 1026|       |
 1027|      0|		if ( check_dn && ludp->lud_dn == NULL ) {
  ------------------
  |  Branch (1027:8): [True: 0, False: 0]
  |  Branch (1027:20): [True: 0, False: 0]
  ------------------
 1028|      0|			LDAP_FREE( url );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1029|      0|			ldap_free_urldesc( ludp );
 1030|      0|			return LDAP_URL_ERR_MEM;
  ------------------
  |  |  824|      0|#define LDAP_URL_ERR_MEM		0x01	/* can't allocate memory space */
  ------------------
 1031|      0|		}
 1032|      0|	}
 1033|       |
 1034|  12.4k|	if( p == NULL ) {
  ------------------
  |  Branch (1034:6): [True: 3.39k, False: 9.07k]
  ------------------
 1035|  3.39k|		LDAP_FREE( url );
  ------------------
  |  |  648|  3.39k|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1036|  3.39k|		*ludpp = ludp;
 1037|  3.39k|		return LDAP_URL_SUCCESS;
  ------------------
  |  |  823|  3.39k|#define LDAP_URL_SUCCESS		0x00	/* Success */
  ------------------
 1038|  3.39k|	}
 1039|       |
 1040|       |	/* scan forward for '?' that may marks end of dn */
 1041|  9.07k|	q = strchr( p, '?' );
 1042|       |
 1043|  9.07k|	if( q != NULL ) {
  ------------------
  |  Branch (1043:6): [True: 3.05k, False: 6.01k]
  ------------------
 1044|       |		/* terminate dn part */
 1045|  3.05k|		*q++ = '\0';
 1046|  3.05k|	}
 1047|       |
 1048|  9.07k|	if( *p != '\0' ) {
  ------------------
  |  Branch (1048:6): [True: 1.56k, False: 7.50k]
  ------------------
 1049|       |		/* parse dn part */
 1050|  1.56k|		ldap_pvt_hex_unescape( p );
 1051|  1.56k|		ludp->lud_dn = LDAP_STRDUP( p );
  ------------------
  |  |  650|  1.56k|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
 1052|       |
 1053|  7.50k|	} else if ( !( flags & LDAP_PVT_URL_PARSE_NOEMPTY_DN ) ) {
  ------------------
  |  |   48|  7.50k|#define LDAP_PVT_URL_PARSE_NOEMPTY_DN		(0x04U)
  ------------------
  |  Branch (1053:14): [True: 7.50k, False: 0]
  ------------------
 1054|  7.50k|		ludp->lud_dn = LDAP_STRDUP( "" );
  ------------------
  |  |  650|  7.50k|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
 1055|       |
 1056|  7.50k|	} else {
 1057|      0|		check_dn = 0;
 1058|      0|	}
 1059|       |
 1060|  9.07k|	if( check_dn && ludp->lud_dn == NULL ) {
  ------------------
  |  Branch (1060:6): [True: 9.07k, False: 0]
  |  Branch (1060:18): [True: 0, False: 9.07k]
  ------------------
 1061|      0|		LDAP_FREE( url );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1062|      0|		ldap_free_urldesc( ludp );
 1063|      0|		return LDAP_URL_ERR_MEM;
  ------------------
  |  |  824|      0|#define LDAP_URL_ERR_MEM		0x01	/* can't allocate memory space */
  ------------------
 1064|      0|	}
 1065|       |
 1066|  9.07k|	if( q == NULL ) {
  ------------------
  |  Branch (1066:6): [True: 6.01k, False: 3.05k]
  ------------------
 1067|       |		/* no more */
 1068|  6.01k|		LDAP_FREE( url );
  ------------------
  |  |  648|  6.01k|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1069|  6.01k|		*ludpp = ludp;
 1070|  6.01k|		return LDAP_URL_SUCCESS;
  ------------------
  |  |  823|  6.01k|#define LDAP_URL_SUCCESS		0x00	/* Success */
  ------------------
 1071|  6.01k|	}
 1072|       |
 1073|       |	/* scan forward for '?' that may marks end of attributes */
 1074|  3.05k|	p = q;
 1075|  3.05k|	q = strchr( p, '?' );
 1076|       |
 1077|  3.05k|	if( q != NULL ) {
  ------------------
  |  Branch (1077:6): [True: 1.32k, False: 1.72k]
  ------------------
 1078|       |		/* terminate attributes part */
 1079|  1.32k|		*q++ = '\0';
 1080|  1.32k|	}
 1081|       |
 1082|  3.05k|	if( *p != '\0' ) {
  ------------------
  |  Branch (1082:6): [True: 2.25k, False: 803]
  ------------------
 1083|       |		/* parse attributes */
 1084|  2.25k|		ldap_pvt_hex_unescape( p );
 1085|  2.25k|		ludp->lud_attrs = ldap_str2charray( p, "," );
 1086|       |
 1087|  2.25k|		if( ludp->lud_attrs == NULL ) {
  ------------------
  |  Branch (1087:7): [True: 0, False: 2.25k]
  ------------------
 1088|      0|			LDAP_FREE( url );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1089|      0|			ldap_free_urldesc( ludp );
 1090|      0|			return LDAP_URL_ERR_BADATTRS;
  ------------------
  |  |  831|      0|#define LDAP_URL_ERR_BADATTRS	0x07	/* bad (or missing) attributes */
  ------------------
 1091|      0|		}
 1092|  2.25k|	}
 1093|       |
 1094|  3.05k|	if ( q == NULL ) {
  ------------------
  |  Branch (1094:7): [True: 1.72k, False: 1.32k]
  ------------------
 1095|       |		/* no more */
 1096|  1.72k|		LDAP_FREE( url );
  ------------------
  |  |  648|  1.72k|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1097|  1.72k|		*ludpp = ludp;
 1098|  1.72k|		return LDAP_URL_SUCCESS;
  ------------------
  |  |  823|  1.72k|#define LDAP_URL_SUCCESS		0x00	/* Success */
  ------------------
 1099|  1.72k|	}
 1100|       |
 1101|       |	/* scan forward for '?' that may marks end of scope */
 1102|  1.32k|	p = q;
 1103|  1.32k|	q = strchr( p, '?' );
 1104|       |
 1105|  1.32k|	if( q != NULL ) {
  ------------------
  |  Branch (1105:6): [True: 1.14k, False: 186]
  ------------------
 1106|       |		/* terminate the scope part */
 1107|  1.14k|		*q++ = '\0';
 1108|  1.14k|	}
 1109|       |
 1110|  1.32k|	if( *p != '\0' ) {
  ------------------
  |  Branch (1110:6): [True: 107, False: 1.21k]
  ------------------
 1111|       |		/* parse the scope */
 1112|    107|		ldap_pvt_hex_unescape( p );
 1113|    107|		ludp->lud_scope = ldap_pvt_str2scope( p );
 1114|       |
 1115|    107|		if( ludp->lud_scope == -1 ) {
  ------------------
  |  Branch (1115:7): [True: 96, False: 11]
  ------------------
 1116|     96|			LDAP_FREE( url );
  ------------------
  |  |  648|     96|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1117|     96|			ldap_free_urldesc( ludp );
 1118|     96|			return LDAP_URL_ERR_BADSCOPE;
  ------------------
  |  |  832|     96|#define LDAP_URL_ERR_BADSCOPE	0x08	/* scope string is invalid (or missing) */
  ------------------
 1119|     96|		}
 1120|    107|	}
 1121|       |
 1122|  1.23k|	if ( q == NULL ) {
  ------------------
  |  Branch (1122:7): [True: 93, False: 1.13k]
  ------------------
 1123|       |		/* no more */
 1124|     93|		LDAP_FREE( url );
  ------------------
  |  |  648|     93|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1125|     93|		*ludpp = ludp;
 1126|     93|		return LDAP_URL_SUCCESS;
  ------------------
  |  |  823|     93|#define LDAP_URL_SUCCESS		0x00	/* Success */
  ------------------
 1127|     93|	}
 1128|       |
 1129|       |	/* scan forward for '?' that may marks end of filter */
 1130|  1.13k|	p = q;
 1131|  1.13k|	q = strchr( p, '?' );
 1132|       |
 1133|  1.13k|	if( q != NULL ) {
  ------------------
  |  Branch (1133:6): [True: 128, False: 1.00k]
  ------------------
 1134|       |		/* terminate the filter part */
 1135|    128|		*q++ = '\0';
 1136|    128|	}
 1137|       |
 1138|  1.13k|	if( *p != '\0' ) {
  ------------------
  |  Branch (1138:6): [True: 1.09k, False: 43]
  ------------------
 1139|       |		/* parse the filter */
 1140|  1.09k|		ldap_pvt_hex_unescape( p );
 1141|       |
 1142|  1.09k|		if( ! *p ) {
  ------------------
  |  Branch (1142:7): [True: 1, False: 1.09k]
  ------------------
 1143|       |			/* missing filter */
 1144|      1|			LDAP_FREE( url );
  ------------------
  |  |  648|      1|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1145|      1|			ldap_free_urldesc( ludp );
 1146|      1|			return LDAP_URL_ERR_BADFILTER;
  ------------------
  |  |  833|      1|#define LDAP_URL_ERR_BADFILTER	0x09	/* bad or missing filter */
  ------------------
 1147|      1|		}
 1148|       |
 1149|  1.09k|		ludp->lud_filter = LDAP_STRDUP( p );
  ------------------
  |  |  650|  1.09k|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
 1150|       |
 1151|  1.09k|		if( ludp->lud_filter == NULL ) {
  ------------------
  |  Branch (1151:7): [True: 0, False: 1.09k]
  ------------------
 1152|      0|			LDAP_FREE( url );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1153|      0|			ldap_free_urldesc( ludp );
 1154|      0|			return LDAP_URL_ERR_MEM;
  ------------------
  |  |  824|      0|#define LDAP_URL_ERR_MEM		0x01	/* can't allocate memory space */
  ------------------
 1155|      0|		}
 1156|  1.09k|	}
 1157|       |
 1158|  1.13k|	if ( q == NULL ) {
  ------------------
  |  Branch (1158:7): [True: 1.00k, False: 127]
  ------------------
 1159|       |		/* no more */
 1160|  1.00k|		LDAP_FREE( url );
  ------------------
  |  |  648|  1.00k|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1161|  1.00k|		*ludpp = ludp;
 1162|  1.00k|		return LDAP_URL_SUCCESS;
  ------------------
  |  |  823|  1.00k|#define LDAP_URL_SUCCESS		0x00	/* Success */
  ------------------
 1163|  1.00k|	}
 1164|       |
 1165|       |	/* scan forward for '?' that may marks end of extensions */
 1166|    127|	p = q;
 1167|    127|	q = strchr( p, '?' );
 1168|       |
 1169|    127|	if( q != NULL ) {
  ------------------
  |  Branch (1169:6): [True: 1, False: 126]
  ------------------
 1170|       |		/* extra '?' */
 1171|      1|		LDAP_FREE( url );
  ------------------
  |  |  648|      1|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1172|      1|		ldap_free_urldesc( ludp );
 1173|      1|		return LDAP_URL_ERR_BADURL;
  ------------------
  |  |  829|      1|#define LDAP_URL_ERR_BADURL		0x05	/* URL is bad */
  ------------------
 1174|      1|	}
 1175|       |
 1176|       |	/* parse the extensions */
 1177|    126|	ludp->lud_exts = ldap_str2charray( p, "," );
 1178|       |
 1179|    126|	if( ludp->lud_exts == NULL ) {
  ------------------
  |  Branch (1179:6): [True: 0, False: 126]
  ------------------
 1180|      0|		LDAP_FREE( url );
  ------------------
  |  |  648|      0|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1181|      0|		ldap_free_urldesc( ludp );
 1182|      0|		return LDAP_URL_ERR_BADEXTS;
  ------------------
  |  |  834|      0|#define LDAP_URL_ERR_BADEXTS	0x0a	/* bad or missing extensions */
  ------------------
 1183|      0|	}
 1184|       |
 1185|    409|	for( i=0; ludp->lud_exts[i] != NULL; i++ ) {
  ------------------
  |  Branch (1185:12): [True: 283, False: 126]
  ------------------
 1186|    283|		ldap_pvt_hex_unescape( ludp->lud_exts[i] );
 1187|       |
 1188|    283|		if( *ludp->lud_exts[i] == '!' ) {
  ------------------
  |  Branch (1188:7): [True: 10, False: 273]
  ------------------
 1189|       |			/* count the number of critical extensions */
 1190|     10|			ludp->lud_crit_exts++;
 1191|     10|		}
 1192|    283|	}
 1193|       |
 1194|    126|	if( i == 0 ) {
  ------------------
  |  Branch (1194:6): [True: 6, False: 120]
  ------------------
 1195|       |		/* must have 1 or more */
 1196|      6|		LDAP_FREE( url );
  ------------------
  |  |  648|      6|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1197|      6|		ldap_free_urldesc( ludp );
 1198|      6|		return LDAP_URL_ERR_BADEXTS;
  ------------------
  |  |  834|      6|#define LDAP_URL_ERR_BADEXTS	0x0a	/* bad or missing extensions */
  ------------------
 1199|      6|	}
 1200|       |
 1201|       |	/* no more */
 1202|    120|	*ludpp = ludp;
 1203|    120|	LDAP_FREE( url );
  ------------------
  |  |  648|    120|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1204|    120|	return LDAP_URL_SUCCESS;
  ------------------
  |  |  823|    120|#define LDAP_URL_SUCCESS		0x00	/* Success */
  ------------------
 1205|    126|}
ldap_url_parse:
 1209|  9.07k|{
 1210|  9.07k|	return ldap_url_parse_ext( url_in, ludpp, LDAP_PVT_URL_PARSE_HISTORIC );
  ------------------
  |  |   50|  9.07k|#define	LDAP_PVT_URL_PARSE_HISTORIC		(LDAP_PVT_URL_PARSE_NODEF_SCOPE | \
  |  |  ------------------
  |  |  |  |   49|  9.07k|#define LDAP_PVT_URL_PARSE_NODEF_SCOPE		(0x08U)
  |  |  ------------------
  |  |   51|  9.07k|						 LDAP_PVT_URL_PARSE_NOEMPTY_HOST | \
  |  |  ------------------
  |  |  |  |   46|  9.07k|#define LDAP_PVT_URL_PARSE_NOEMPTY_HOST		(0x01U)
  |  |  ------------------
  |  |   52|  9.07k|						 LDAP_PVT_URL_PARSE_DEF_PORT)
  |  |  ------------------
  |  |  |  |   47|  9.07k|#define LDAP_PVT_URL_PARSE_DEF_PORT		(0x02U)
  |  |  ------------------
  ------------------
 1211|  9.07k|}
ldap_url_dup:
 1215|  6.78k|{
 1216|  6.78k|	LDAPURLDesc *dest;
 1217|       |
 1218|  6.78k|	if ( ludp == NULL ) {
  ------------------
  |  Branch (1218:7): [True: 0, False: 6.78k]
  ------------------
 1219|      0|		return NULL;
 1220|      0|	}
 1221|       |
 1222|  6.78k|	dest = LDAP_MALLOC( sizeof(LDAPURLDesc) );
  ------------------
  |  |  645|  6.78k|#define LDAP_MALLOC(s)		(ber_memalloc_x((s),NULL))
  ------------------
 1223|  6.78k|	if (dest == NULL)
  ------------------
  |  Branch (1223:6): [True: 0, False: 6.78k]
  ------------------
 1224|      0|		return NULL;
 1225|       |	
 1226|  6.78k|	*dest = *ludp;
 1227|  6.78k|	dest->lud_scheme = NULL;
 1228|  6.78k|	dest->lud_host = NULL;
 1229|  6.78k|	dest->lud_dn = NULL;
 1230|  6.78k|	dest->lud_filter = NULL;
 1231|  6.78k|	dest->lud_attrs = NULL;
 1232|  6.78k|	dest->lud_exts = NULL;
 1233|  6.78k|	dest->lud_next = NULL;
 1234|       |
 1235|  6.78k|	if ( ludp->lud_scheme != NULL ) {
  ------------------
  |  Branch (1235:7): [True: 6.78k, False: 0]
  ------------------
 1236|  6.78k|		dest->lud_scheme = LDAP_STRDUP( ludp->lud_scheme );
  ------------------
  |  |  650|  6.78k|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
 1237|  6.78k|		if (dest->lud_scheme == NULL) {
  ------------------
  |  Branch (1237:7): [True: 0, False: 6.78k]
  ------------------
 1238|      0|			ldap_free_urldesc(dest);
 1239|      0|			return NULL;
 1240|      0|		}
 1241|  6.78k|	}
 1242|       |
 1243|  6.78k|	if ( ludp->lud_host != NULL ) {
  ------------------
  |  Branch (1243:7): [True: 6.78k, False: 0]
  ------------------
 1244|  6.78k|		dest->lud_host = LDAP_STRDUP( ludp->lud_host );
  ------------------
  |  |  650|  6.78k|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
 1245|  6.78k|		if (dest->lud_host == NULL) {
  ------------------
  |  Branch (1245:7): [True: 0, False: 6.78k]
  ------------------
 1246|      0|			ldap_free_urldesc(dest);
 1247|      0|			return NULL;
 1248|      0|		}
 1249|  6.78k|	}
 1250|       |
 1251|  6.78k|	if ( ludp->lud_dn != NULL ) {
  ------------------
  |  Branch (1251:7): [True: 3.39k, False: 3.39k]
  ------------------
 1252|  3.39k|		dest->lud_dn = LDAP_STRDUP( ludp->lud_dn );
  ------------------
  |  |  650|  3.39k|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
 1253|  3.39k|		if (dest->lud_dn == NULL) {
  ------------------
  |  Branch (1253:7): [True: 0, False: 3.39k]
  ------------------
 1254|      0|			ldap_free_urldesc(dest);
 1255|      0|			return NULL;
 1256|      0|		}
 1257|  3.39k|	}
 1258|       |
 1259|  6.78k|	if ( ludp->lud_filter != NULL ) {
  ------------------
  |  Branch (1259:7): [True: 0, False: 6.78k]
  ------------------
 1260|      0|		dest->lud_filter = LDAP_STRDUP( ludp->lud_filter );
  ------------------
  |  |  650|      0|#define LDAP_STRDUP(s)		(ber_strdup_x((s),NULL))
  ------------------
 1261|      0|		if (dest->lud_filter == NULL) {
  ------------------
  |  Branch (1261:7): [True: 0, False: 0]
  ------------------
 1262|      0|			ldap_free_urldesc(dest);
 1263|      0|			return NULL;
 1264|      0|		}
 1265|      0|	}
 1266|       |
 1267|  6.78k|	if ( ludp->lud_attrs != NULL ) {
  ------------------
  |  Branch (1267:7): [True: 0, False: 6.78k]
  ------------------
 1268|      0|		dest->lud_attrs = ldap_charray_dup( ludp->lud_attrs );
 1269|      0|		if (dest->lud_attrs == NULL) {
  ------------------
  |  Branch (1269:7): [True: 0, False: 0]
  ------------------
 1270|      0|			ldap_free_urldesc(dest);
 1271|      0|			return NULL;
 1272|      0|		}
 1273|      0|	}
 1274|       |
 1275|  6.78k|	if ( ludp->lud_exts != NULL ) {
  ------------------
  |  Branch (1275:7): [True: 0, False: 6.78k]
  ------------------
 1276|      0|		dest->lud_exts = ldap_charray_dup( ludp->lud_exts );
 1277|      0|		if (dest->lud_exts == NULL) {
  ------------------
  |  Branch (1277:7): [True: 0, False: 0]
  ------------------
 1278|      0|			ldap_free_urldesc(dest);
 1279|      0|			return NULL;
 1280|      0|		}
 1281|      0|	}
 1282|       |
 1283|  6.78k|	return dest;
 1284|  6.78k|}
ldap_url_duplist:
 1288|  3.39k|{
 1289|  3.39k|	LDAPURLDesc *dest, *tail, *ludp, *newludp;
 1290|       |
 1291|  3.39k|	dest = NULL;
 1292|  3.39k|	tail = NULL;
 1293|  6.78k|	for (ludp = ludlist; ludp != NULL; ludp = ludp->lud_next) {
  ------------------
  |  Branch (1293:23): [True: 3.39k, False: 3.39k]
  ------------------
 1294|  3.39k|		newludp = ldap_url_dup(ludp);
 1295|  3.39k|		if (newludp == NULL) {
  ------------------
  |  Branch (1295:7): [True: 0, False: 3.39k]
  ------------------
 1296|      0|			ldap_free_urllist(dest);
 1297|      0|			return NULL;
 1298|      0|		}
 1299|  3.39k|		if (tail == NULL)
  ------------------
  |  Branch (1299:7): [True: 3.39k, False: 0]
  ------------------
 1300|  3.39k|			dest = newludp;
 1301|      0|		else
 1302|      0|			tail->lud_next = newludp;
 1303|  3.39k|		tail = newludp;
 1304|  3.39k|	}
 1305|  3.39k|	return dest;
 1306|  3.39k|}
ldap_url_parselist:
 1349|      1|{
 1350|      1|	return ldap_url_parselist_int( ludlist, url, ", ", LDAP_PVT_URL_PARSE_HISTORIC );
  ------------------
  |  |   50|      1|#define	LDAP_PVT_URL_PARSE_HISTORIC		(LDAP_PVT_URL_PARSE_NODEF_SCOPE | \
  |  |  ------------------
  |  |  |  |   49|      1|#define LDAP_PVT_URL_PARSE_NODEF_SCOPE		(0x08U)
  |  |  ------------------
  |  |   51|      1|						 LDAP_PVT_URL_PARSE_NOEMPTY_HOST | \
  |  |  ------------------
  |  |  |  |   46|      1|#define LDAP_PVT_URL_PARSE_NOEMPTY_HOST		(0x01U)
  |  |  ------------------
  |  |   52|      1|						 LDAP_PVT_URL_PARSE_DEF_PORT)
  |  |  ------------------
  |  |  |  |   47|      1|#define LDAP_PVT_URL_PARSE_DEF_PORT		(0x02U)
  |  |  ------------------
  ------------------
 1351|      1|}
ldap_url_parselist_ext:
 1355|  3.39k|{
 1356|  3.39k|	return ldap_url_parselist_int( ludlist, url, sep, flags );
 1357|  3.39k|}
ldap_free_urllist:
 1546|  10.1k|{
 1547|  10.1k|	LDAPURLDesc *ludp, *next;
 1548|       |
 1549|  20.3k|	for (ludp = ludlist; ludp != NULL; ludp = next) {
  ------------------
  |  Branch (1549:23): [True: 10.1k, False: 10.1k]
  ------------------
 1550|  10.1k|		next = ludp->lud_next;
 1551|  10.1k|		ldap_free_urldesc(ludp);
 1552|  10.1k|	}
 1553|  10.1k|}
ldap_free_urldesc:
 1557|  19.3k|{
 1558|  19.3k|	if ( ludp == NULL ) {
  ------------------
  |  Branch (1558:7): [True: 149, False: 19.2k]
  ------------------
 1559|    149|		return;
 1560|    149|	}
 1561|       |	
 1562|  19.2k|	if ( ludp->lud_scheme != NULL ) {
  ------------------
  |  Branch (1562:7): [True: 19.2k, False: 0]
  ------------------
 1563|  19.2k|		LDAP_FREE( ludp->lud_scheme );
  ------------------
  |  |  648|  19.2k|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1564|  19.2k|	}
 1565|       |
 1566|  19.2k|	if ( ludp->lud_host != NULL ) {
  ------------------
  |  Branch (1566:7): [True: 19.2k, False: 6]
  ------------------
 1567|  19.2k|		LDAP_FREE( ludp->lud_host );
  ------------------
  |  |  648|  19.2k|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1568|  19.2k|	}
 1569|       |
 1570|  19.2k|	if ( ludp->lud_dn != NULL ) {
  ------------------
  |  Branch (1570:7): [True: 12.4k, False: 6.78k]
  ------------------
 1571|  12.4k|		LDAP_FREE( ludp->lud_dn );
  ------------------
  |  |  648|  12.4k|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1572|  12.4k|	}
 1573|       |
 1574|  19.2k|	if ( ludp->lud_filter != NULL ) {
  ------------------
  |  Branch (1574:7): [True: 1.09k, False: 18.1k]
  ------------------
 1575|  1.09k|		LDAP_FREE( ludp->lud_filter);
  ------------------
  |  |  648|  1.09k|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1576|  1.09k|	}
 1577|       |
 1578|  19.2k|	if ( ludp->lud_attrs != NULL ) {
  ------------------
  |  Branch (1578:7): [True: 2.25k, False: 16.9k]
  ------------------
 1579|  2.25k|		LDAP_VFREE( ludp->lud_attrs );
  ------------------
  |  |  649|  2.25k|#define LDAP_VFREE(v)		(ber_memvfree_x((void **)(v),NULL))
  ------------------
 1580|  2.25k|	}
 1581|       |
 1582|  19.2k|	if ( ludp->lud_exts != NULL ) {
  ------------------
  |  Branch (1582:7): [True: 126, False: 19.1k]
  ------------------
 1583|    126|		LDAP_VFREE( ludp->lud_exts );
  ------------------
  |  |  649|    126|#define LDAP_VFREE(v)		(ber_memvfree_x((void **)(v),NULL))
  ------------------
 1584|    126|	}
 1585|       |
 1586|       |	LDAP_FREE( ludp );
  ------------------
  |  |  648|  19.2k|#define LDAP_FREE(p)		(ber_memfree_x((p),NULL))
  ------------------
 1587|  19.2k|}
ldap_pvt_hex_unescape:
 1623|  21.3k|{
 1624|       |	/*
 1625|       |	 * Remove URL hex escapes from s... done in place.  The basic concept for
 1626|       |	 * this routine is borrowed from the WWW library HTUnEscape() routine.
 1627|       |	 */
 1628|  21.3k|	char	*p,
 1629|  21.3k|		*save_s = s;
 1630|       |
 1631|  1.17M|	for ( p = s; *s != '\0'; ++s ) {
  ------------------
  |  Branch (1631:15): [True: 1.15M, False: 20.7k]
  ------------------
 1632|  1.15M|		if ( *s == '%' ) {
  ------------------
  |  Branch (1632:8): [True: 2.39k, False: 1.15M]
  ------------------
 1633|       |			/*
 1634|       |			 * FIXME: what if '%' is followed
 1635|       |			 * by non-hexpair chars?
 1636|       |			 */
 1637|  2.39k|			if ( !ldap_int_is_hexpair( s + 1 ) ) {
  ------------------
  |  Branch (1637:9): [True: 633, False: 1.75k]
  ------------------
 1638|    633|				p = save_s;
 1639|    633|				break;
 1640|    633|			}
 1641|       |
 1642|  1.75k|			if ( *++s == '\0' ) {
  ------------------
  |  Branch (1642:9): [True: 0, False: 1.75k]
  ------------------
 1643|      0|				break;
 1644|      0|			}
 1645|  1.75k|			*p = ldap_int_unhex( *s ) << 4;
 1646|  1.75k|			if ( *++s == '\0' ) {
  ------------------
  |  Branch (1646:9): [True: 0, False: 1.75k]
  ------------------
 1647|      0|				break;
 1648|      0|			}
 1649|  1.75k|			*p++ += ldap_int_unhex( *s );
 1650|  1.15M|		} else {
 1651|  1.15M|			*p++ = *s;
 1652|  1.15M|		}
 1653|  1.15M|	}
 1654|       |
 1655|  21.3k|	*p = '\0';
 1656|  21.3k|}
url.c:skip_url_prefix:
  209|  12.4k|{
  210|       |	/*
  211|       | 	 * return non-zero if this looks like a LDAP URL; zero if not
  212|       | 	 * if non-zero returned, *urlp will be moved past "ldap://" part of URL
  213|       | 	 */
  214|  12.4k|	const char *p;
  215|       |
  216|  12.4k|	if ( url == NULL ) {
  ------------------
  |  Branch (216:7): [True: 0, False: 12.4k]
  ------------------
  217|      0|		return( NULL );
  218|      0|	}
  219|       |
  220|  12.4k|	p = url;
  221|       |
  222|       |	/* skip leading '<' (if any) */
  223|  12.4k|	if ( *p == '<' ) {
  ------------------
  |  Branch (223:7): [True: 0, False: 12.4k]
  ------------------
  224|      0|		*enclosedp = 1;
  225|      0|		++p;
  226|  12.4k|	} else {
  227|  12.4k|		*enclosedp = 0;
  228|  12.4k|	}
  229|       |
  230|       |	/* skip leading "URL:" (if any) */
  231|  12.4k|	if ( strncasecmp( p, LDAP_URL_URLCOLON, LDAP_URL_URLCOLON_LEN ) == 0 ) {
  ------------------
  |  |  137|  12.4k|#define LDAP_URL_URLCOLON	"URL:"
  ------------------
              	if ( strncasecmp( p, LDAP_URL_URLCOLON, LDAP_URL_URLCOLON_LEN ) == 0 ) {
  ------------------
  |  |  138|  12.4k|#define LDAP_URL_URLCOLON_LEN	STRLENOF(LDAP_URL_URLCOLON)
  |  |  ------------------
  |  |  |  |  103|  12.4k|#define STRLENOF(s)	(sizeof(s)-1)
  |  |  ------------------
  ------------------
  |  Branch (231:7): [True: 0, False: 12.4k]
  ------------------
  232|      0|		p += LDAP_URL_URLCOLON_LEN;
  ------------------
  |  |  138|      0|#define LDAP_URL_URLCOLON_LEN	STRLENOF(LDAP_URL_URLCOLON)
  |  |  ------------------
  |  |  |  |  103|      0|#define STRLENOF(s)	(sizeof(s)-1)
  |  |  ------------------
  ------------------
  233|      0|	}
  234|       |
  235|       |	/* check for "ldap://" prefix */
  236|  12.4k|	if ( strncasecmp( p, LDAP_URL_PREFIX, LDAP_URL_PREFIX_LEN ) == 0 ) {
  ------------------
  |  |  123|  12.4k|#define LDAP_URL_PREFIX         "ldap://"
  ------------------
              	if ( strncasecmp( p, LDAP_URL_PREFIX, LDAP_URL_PREFIX_LEN ) == 0 ) {
  ------------------
  |  |  124|  12.4k|#define LDAP_URL_PREFIX_LEN     STRLENOF(LDAP_URL_PREFIX)
  |  |  ------------------
  |  |  |  |  103|  12.4k|#define STRLENOF(s)	(sizeof(s)-1)
  |  |  ------------------
  ------------------
  |  Branch (236:7): [True: 10.2k, False: 2.21k]
  ------------------
  237|       |		/* skip over "ldap://" prefix and return success */
  238|  10.2k|		p += LDAP_URL_PREFIX_LEN;
  ------------------
  |  |  124|  10.2k|#define LDAP_URL_PREFIX_LEN     STRLENOF(LDAP_URL_PREFIX)
  |  |  ------------------
  |  |  |  |  103|  10.2k|#define STRLENOF(s)	(sizeof(s)-1)
  |  |  ------------------
  ------------------
  239|  10.2k|		*scheme = "ldap";
  240|  10.2k|		return( p );
  241|  10.2k|	}
  242|       |
  243|       |	/* check for "pldap://" prefix */
  244|  2.21k|	if ( strncasecmp( p, PLDAP_URL_PREFIX, PLDAP_URL_PREFIX_LEN ) == 0 ) {
  ------------------
  |  |  125|  2.21k|#define PLDAP_URL_PREFIX	"pldap://"
  ------------------
              	if ( strncasecmp( p, PLDAP_URL_PREFIX, PLDAP_URL_PREFIX_LEN ) == 0 ) {
  ------------------
  |  |  126|  2.21k|#define PLDAP_URL_PREFIX_LEN	STRLENOF(PLDAP_URL_PREFIX)
  |  |  ------------------
  |  |  |  |  103|  2.21k|#define STRLENOF(s)	(sizeof(s)-1)
  |  |  ------------------
  ------------------
  |  Branch (244:7): [True: 0, False: 2.21k]
  ------------------
  245|       |		/* skip over "pldap://" prefix and return success */
  246|      0|		p += PLDAP_URL_PREFIX_LEN;
  ------------------
  |  |  126|      0|#define PLDAP_URL_PREFIX_LEN	STRLENOF(PLDAP_URL_PREFIX)
  |  |  ------------------
  |  |  |  |  103|      0|#define STRLENOF(s)	(sizeof(s)-1)
  |  |  ------------------
  ------------------
  247|      0|		*scheme = "pldap";
  248|      0|		return( p );
  249|      0|	}
  250|       |
  251|       |	/* check for "ldaps://" prefix */
  252|  2.21k|	if ( strncasecmp( p, LDAPS_URL_PREFIX, LDAPS_URL_PREFIX_LEN ) == 0 ) {
  ------------------
  |  |  127|  2.21k|#define LDAPS_URL_PREFIX	"ldaps://"
  ------------------
              	if ( strncasecmp( p, LDAPS_URL_PREFIX, LDAPS_URL_PREFIX_LEN ) == 0 ) {
  ------------------
  |  |  128|  2.21k|#define LDAPS_URL_PREFIX_LEN	STRLENOF(LDAPS_URL_PREFIX)
  |  |  ------------------
  |  |  |  |  103|  2.21k|#define STRLENOF(s)	(sizeof(s)-1)
  |  |  ------------------
  ------------------
  |  Branch (252:7): [True: 2.21k, False: 0]
  ------------------
  253|       |		/* skip over "ldaps://" prefix and return success */
  254|  2.21k|		p += LDAPS_URL_PREFIX_LEN;
  ------------------
  |  |  128|  2.21k|#define LDAPS_URL_PREFIX_LEN	STRLENOF(LDAPS_URL_PREFIX)
  |  |  ------------------
  |  |  |  |  103|  2.21k|#define STRLENOF(s)	(sizeof(s)-1)
  |  |  ------------------
  ------------------
  255|  2.21k|		*scheme = "ldaps";
  256|  2.21k|		return( p );
  257|  2.21k|	}
  258|       |
  259|       |	/* check for "pldaps://" prefix */
  260|      0|	if ( strncasecmp( p, PLDAPS_URL_PREFIX, PLDAPS_URL_PREFIX_LEN ) == 0 ) {
  ------------------
  |  |  129|      0|#define PLDAPS_URL_PREFIX	"pldaps://"
  ------------------
              	if ( strncasecmp( p, PLDAPS_URL_PREFIX, PLDAPS_URL_PREFIX_LEN ) == 0 ) {
  ------------------
  |  |  130|      0|#define PLDAPS_URL_PREFIX_LEN	STRLENOF(PLDAPS_URL_PREFIX)
  |  |  ------------------
  |  |  |  |  103|      0|#define STRLENOF(s)	(sizeof(s)-1)
  |  |  ------------------
  ------------------
  |  Branch (260:7): [True: 0, False: 0]
  ------------------
  261|       |		/* skip over "pldaps://" prefix and return success */
  262|      0|		p += PLDAPS_URL_PREFIX_LEN;
  ------------------
  |  |  130|      0|#define PLDAPS_URL_PREFIX_LEN	STRLENOF(PLDAPS_URL_PREFIX)
  |  |  ------------------
  |  |  |  |  103|      0|#define STRLENOF(s)	(sizeof(s)-1)
  |  |  ------------------
  ------------------
  263|      0|		*scheme = "pldaps";
  264|      0|		return( p );
  265|      0|	}
  266|       |
  267|       |	/* check for "ldapi://" prefix */
  268|      0|	if ( strncasecmp( p, LDAPI_URL_PREFIX, LDAPI_URL_PREFIX_LEN ) == 0 ) {
  ------------------
  |  |  131|      0|#define LDAPI_URL_PREFIX	"ldapi://"
  ------------------
              	if ( strncasecmp( p, LDAPI_URL_PREFIX, LDAPI_URL_PREFIX_LEN ) == 0 ) {
  ------------------
  |  |  132|      0|#define LDAPI_URL_PREFIX_LEN	STRLENOF(LDAPI_URL_PREFIX)
  |  |  ------------------
  |  |  |  |  103|      0|#define STRLENOF(s)	(sizeof(s)-1)
  |  |  ------------------
  ------------------
  |  Branch (268:7): [True: 0, False: 0]
  ------------------
  269|       |		/* skip over "ldapi://" prefix and return success */
  270|      0|		p += LDAPI_URL_PREFIX_LEN;
  ------------------
  |  |  132|      0|#define LDAPI_URL_PREFIX_LEN	STRLENOF(LDAPI_URL_PREFIX)
  |  |  ------------------
  |  |  |  |  103|      0|#define STRLENOF(s)	(sizeof(s)-1)
  |  |  ------------------
  ------------------
  271|      0|		*scheme = "ldapi";
  272|      0|		return( p );
  273|      0|	}
  274|       |
  275|       |#ifdef LDAP_CONNECTIONLESS
  276|       |	/* check for "cldap://" prefix */
  277|       |	if ( strncasecmp( p, LDAPC_URL_PREFIX, LDAPC_URL_PREFIX_LEN ) == 0 ) {
  278|       |		/* skip over "cldap://" prefix and return success */
  279|       |		p += LDAPC_URL_PREFIX_LEN;
  280|       |		*scheme = "cldap";
  281|       |		return( p );
  282|       |	}
  283|       |#endif
  284|       |
  285|      0|	return( NULL );
  286|      0|}
url.c:ldap_url_parselist_int:
 1311|  3.39k|{
 1312|  3.39k|	int i, rc;
 1313|  3.39k|	LDAPURLDesc *ludp;
 1314|  3.39k|	char **urls;
 1315|       |
 1316|  3.39k|	assert( ludlist != NULL );
  ------------------
  |  Branch (1316:2): [True: 0, False: 3.39k]
  |  Branch (1316:2): [True: 3.39k, False: 0]
  ------------------
 1317|  3.39k|	assert( url != NULL );
  ------------------
  |  Branch (1317:2): [True: 0, False: 3.39k]
  |  Branch (1317:2): [True: 3.39k, False: 0]
  ------------------
 1318|       |
 1319|  3.39k|	*ludlist = NULL;
 1320|       |
 1321|  3.39k|	if ( sep == NULL ) {
  ------------------
  |  Branch (1321:7): [True: 3.39k, False: 1]
  ------------------
 1322|  3.39k|		sep = ", ";
 1323|  3.39k|	}
 1324|       |
 1325|  3.39k|	urls = ldap_str2charray( url, sep );
 1326|  3.39k|	if (urls == NULL)
  ------------------
  |  Branch (1326:6): [True: 0, False: 3.39k]
  ------------------
 1327|      0|		return LDAP_URL_ERR_MEM;
  ------------------
  |  |  824|      0|#define LDAP_URL_ERR_MEM		0x01	/* can't allocate memory space */
  ------------------
 1328|       |
 1329|       |	/* count the URLs... */
 1330|  6.78k|	for (i = 0; urls[i] != NULL; i++) ;
  ------------------
  |  Branch (1330:14): [True: 3.39k, False: 3.39k]
  ------------------
 1331|       |	/* ...and put them in the "stack" backward */
 1332|  6.78k|	while (--i >= 0) {
  ------------------
  |  Branch (1332:9): [True: 3.39k, False: 3.39k]
  ------------------
 1333|  3.39k|		rc = ldap_url_parse_ext( urls[i], &ludp, flags );
 1334|  3.39k|		if ( rc != 0 ) {
  ------------------
  |  Branch (1334:8): [True: 0, False: 3.39k]
  ------------------
 1335|      0|			ldap_charray_free( urls );
 1336|      0|			ldap_free_urllist( *ludlist );
 1337|      0|			*ludlist = NULL;
 1338|      0|			return rc;
 1339|      0|		}
 1340|  3.39k|		ludp->lud_next = *ludlist;
 1341|  3.39k|		*ludlist = ludp;
 1342|  3.39k|	}
 1343|  3.39k|	ldap_charray_free( urls );
 1344|  3.39k|	return LDAP_URL_SUCCESS;
  ------------------
  |  |  823|  3.39k|#define LDAP_URL_SUCCESS		0x00	/* Success */
  ------------------
 1345|  3.39k|}
url.c:ldap_int_is_hexpair:
 1591|  2.39k|{
 1592|  2.39k|	int	i;
 1593|       |
 1594|  6.15k|	for ( i = 0; i < 2; i++ ) {
  ------------------
  |  Branch (1594:15): [True: 4.40k, False: 1.75k]
  ------------------
 1595|  4.40k|		if ( s[i] >= '0' && s[i] <= '9' ) {
  ------------------
  |  Branch (1595:8): [True: 3.92k, False: 476]
  |  Branch (1595:23): [True: 1.41k, False: 2.51k]
  ------------------
 1596|  1.41k|			continue;
 1597|  1.41k|		}
 1598|       |
 1599|  2.98k|		if ( s[i] >= 'A' && s[i] <= 'F' ) {
  ------------------
  |  Branch (1599:8): [True: 2.44k, False: 538]
  |  Branch (1599:23): [True: 1.36k, False: 1.08k]
  ------------------
 1600|  1.36k|			continue;
 1601|  1.36k|		}
 1602|       |
 1603|  1.62k|		if ( s[i] >= 'a' && s[i] <= 'f' ) {
  ------------------
  |  Branch (1603:8): [True: 1.05k, False: 568]
  |  Branch (1603:23): [True: 992, False: 65]
  ------------------
 1604|    992|			continue;
 1605|    992|		}
 1606|       |
 1607|    633|		return 0;
 1608|  1.62k|	}
 1609|       |	
 1610|  1.75k|	return 1;	
 1611|  2.39k|}
url.c:ldap_int_unhex:
 1615|  3.51k|{
 1616|  3.51k|	return( c >= '0' && c <= '9' ? c - '0'
  ------------------
  |  Branch (1616:10): [True: 3.51k, False: 0]
  |  Branch (1616:22): [True: 1.36k, False: 2.15k]
  ------------------
 1617|  3.51k|	    : c >= 'A' && c <= 'F' ? c - 'A' + 10
  ------------------
  |  Branch (1617:8): [True: 2.15k, False: 0]
  |  Branch (1617:20): [True: 1.20k, False: 945]
  ------------------
 1618|  2.15k|	    : c - 'a' + 10 );
 1619|  3.51k|}

ldap_x_utf8_to_ucs4:
  141|  1.42M|{
  142|  1.42M|    const unsigned char *c = (const unsigned char *) p;
  143|  1.42M|    ldap_ucs4_t ch;
  144|  1.42M|	int len, i;
  145|  1.42M|	static unsigned char mask[] = {
  146|  1.42M|		0, 0x7f, 0x1f, 0x0f, 0x07, 0x03, 0x01 };
  147|       |
  148|  1.42M|	len = LDAP_UTF8_CHARLEN2(p, len);
  ------------------
  |  |   97|  1.42M|#define LDAP_UTF8_CHARLEN2(p, l) ( ( ( l = LDAP_UTF8_CHARLEN( p )) < 3 || \
  |  |  ------------------
  |  |  |  |   90|  1.42M|#define LDAP_UTF8_CHARLEN(p) ( LDAP_UTF8_ISASCII(p) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   89|  1.42M|#define LDAP_UTF8_ISASCII(p) ( !(*(const unsigned char *)(p) & 0x80 ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (89:30): [True: 1.41M, False: 13.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  1.42M|	? 1 : ldap_utf8_lentab[*(const unsigned char *)(p) ^ 0x80] )
  |  |  ------------------
  |  |  |  Branch (97:38): [True: 1.42M, False: 4.39k]
  |  |  ------------------
  |  |   98|  1.42M|	( ldap_utf8_mintab[*(const unsigned char *)(p) & 0x1f] & (p)[1] ) ) ? \
  |  |  ------------------
  |  |  |  Branch (98:2): [True: 2.05k, False: 2.34k]
  |  |  ------------------
  |  |   99|  1.42M|	l : 0 )
  ------------------
  149|       |
  150|  1.42M|	if( len == 0 ) return LDAP_UCS4_INVALID;
  ------------------
  |  |   45|  7.96k|#define LDAP_UCS4_INVALID (0x80000000U)
  ------------------
  |  Branch (150:6): [True: 7.96k, False: 1.41M]
  ------------------
  151|       |
  152|  1.41M|	ch = c[0] & mask[len];
  153|       |
  154|  1.41M|	for(i=1; i < len; i++) {
  ------------------
  |  Branch (154:11): [True: 5.99k, False: 1.41M]
  ------------------
  155|  5.99k|		if ((c[i] & 0xc0) != 0x80) {
  ------------------
  |  Branch (155:7): [True: 4.39k, False: 1.59k]
  ------------------
  156|  4.39k|			return LDAP_UCS4_INVALID;
  ------------------
  |  |   45|  4.39k|#define LDAP_UCS4_INVALID (0x80000000U)
  ------------------
  157|  4.39k|		}
  158|       |
  159|  1.59k|		ch <<= 6;
  160|  1.59k|		ch |= c[i] & 0x3f;
  161|  1.59k|	}
  162|       |
  163|  1.41M|	return ch;
  164|  1.41M|}
ldap_utf8_next:
  303|  11.6k|{
  304|  11.6k|	int i;
  305|  11.6k|	const unsigned char *u = (const unsigned char *) p;
  306|       |
  307|  11.6k|	if( LDAP_UTF8_ISASCII(u) ) {
  ------------------
  |  |   89|  11.6k|#define LDAP_UTF8_ISASCII(p) ( !(*(const unsigned char *)(p) & 0x80 ) )
  |  |  ------------------
  |  |  |  Branch (89:30): [True: 0, False: 11.6k]
  |  |  ------------------
  ------------------
  308|      0|		return (char *) &p[1];
  309|      0|	}
  310|       |
  311|  15.3k|	for( i=1; i<6; i++ ) {
  ------------------
  |  Branch (311:12): [True: 15.0k, False: 300]
  ------------------
  312|  15.0k|		if ( ( u[i] & 0xc0 ) != 0x80 ) {
  ------------------
  |  Branch (312:8): [True: 11.3k, False: 3.70k]
  ------------------
  313|  11.3k|			return (char *) &p[i];
  314|  11.3k|		}
  315|  15.0k|	}
  316|       |
  317|    300|	return (char *) &p[i];
  318|  11.6k|}
ldap_utf8_strcspn:
  483|  6.84k|{
  484|  6.84k|	const char *cstr;
  485|  6.84k|	const char *cset;
  486|       |
  487|   276k|	for( cstr = str; *cstr != '\0'; LDAP_UTF8_INCR(cstr) ) {
  ------------------
  |  |  110|   269k|#define LDAP_UTF8_INCR(p) ((p) = LDAP_UTF8_NEXT(p))
  |  |  ------------------
  |  |  |  |  107|   269k|#define LDAP_UTF8_NEXT(p) (	LDAP_UTF8_ISASCII(p) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   89|   269k|#define LDAP_UTF8_ISASCII(p) ( !(*(const unsigned char *)(p) & 0x80 ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (89:30): [True: 263k, False: 5.84k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  108|   269k|	? (char *)(p)+1 : ldap_utf8_next((p)) )
  |  |  ------------------
  ------------------
  |  Branch (487:19): [True: 270k, False: 5.24k]
  ------------------
  488|   620k|		for( cset = set; *cset != '\0'; LDAP_UTF8_INCR(cset) ) {
  ------------------
  |  |  110|   349k|#define LDAP_UTF8_INCR(p) ((p) = LDAP_UTF8_NEXT(p))
  |  |  ------------------
  |  |  |  |  107|   349k|#define LDAP_UTF8_NEXT(p) (	LDAP_UTF8_ISASCII(p) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   89|   349k|#define LDAP_UTF8_ISASCII(p) ( !(*(const unsigned char *)(p) & 0x80 ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (89:30): [True: 349k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  108|   349k|	? (char *)(p)+1 : ldap_utf8_next((p)) )
  |  |  ------------------
  ------------------
  |  Branch (488:20): [True: 351k, False: 269k]
  ------------------
  489|   351k|			if( ldap_x_utf8_to_ucs4( cstr ) == ldap_x_utf8_to_ucs4( cset ) ) {
  ------------------
  |  Branch (489:8): [True: 1.60k, False: 349k]
  ------------------
  490|  1.60k|				return cstr - str;
  491|  1.60k|			} 
  492|   351k|		}
  493|   270k|	}
  494|       |
  495|  5.24k|	return cstr - str;
  496|  6.84k|}
ldap_utf8_strspn:
  500|  12.6k|{
  501|  12.6k|	const char *cstr;
  502|  12.6k|	const char *cset;
  503|       |
  504|  13.0k|	for( cstr = str; *cstr != '\0'; LDAP_UTF8_INCR(cstr) ) {
  ------------------
  |  |  110|    413|#define LDAP_UTF8_INCR(p) ((p) = LDAP_UTF8_NEXT(p))
  |  |  ------------------
  |  |  |  |  107|    413|#define LDAP_UTF8_NEXT(p) (	LDAP_UTF8_ISASCII(p) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   89|    413|#define LDAP_UTF8_ISASCII(p) ( !(*(const unsigned char *)(p) & 0x80 ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (89:30): [True: 413, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  108|    413|	? (char *)(p)+1 : ldap_utf8_next((p)) )
  |  |  ------------------
  ------------------
  |  Branch (504:19): [True: 7.26k, False: 5.77k]
  ------------------
  505|  17.5k|		for( cset = set; ; LDAP_UTF8_INCR(cset) ) {
  ------------------
  |  |  110|  10.2k|#define LDAP_UTF8_INCR(p) ((p) = LDAP_UTF8_NEXT(p))
  |  |  ------------------
  |  |  |  |  107|  10.2k|#define LDAP_UTF8_NEXT(p) (	LDAP_UTF8_ISASCII(p) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   89|  10.2k|#define LDAP_UTF8_ISASCII(p) ( !(*(const unsigned char *)(p) & 0x80 ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (89:30): [True: 10.2k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  108|  10.2k|	? (char *)(p)+1 : ldap_utf8_next((p)) )
  |  |  ------------------
  ------------------
  506|  17.5k|			if( *cset == '\0' ) {
  ------------------
  |  Branch (506:8): [True: 6.84k, False: 10.6k]
  ------------------
  507|  6.84k|				return cstr - str;
  508|  6.84k|			}
  509|       |
  510|  10.6k|			if( ldap_x_utf8_to_ucs4( cstr ) == ldap_x_utf8_to_ucs4( cset ) ) {
  ------------------
  |  Branch (510:8): [True: 413, False: 10.2k]
  ------------------
  511|    413|				break;
  512|    413|			} 
  513|  10.6k|		}
  514|  7.26k|	}
  515|       |
  516|  5.77k|	return cstr - str;
  517|  12.6k|}
ldap_utf8_strpbrk:
  521|  7.78k|{
  522|   276k|	for( ; *str != '\0'; LDAP_UTF8_INCR(str) ) {
  ------------------
  |  |  110|   269k|#define LDAP_UTF8_INCR(p) ((p) = LDAP_UTF8_NEXT(p))
  |  |  ------------------
  |  |  |  |  107|   269k|#define LDAP_UTF8_NEXT(p) (	LDAP_UTF8_ISASCII(p) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   89|   269k|#define LDAP_UTF8_ISASCII(p) ( !(*(const unsigned char *)(p) & 0x80 ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (89:30): [True: 263k, False: 5.84k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  108|   269k|	? (char *)(p)+1 : ldap_utf8_next((p)) )
  |  |  ------------------
  ------------------
  |  Branch (522:9): [True: 271k, False: 5.77k]
  ------------------
  523|   271k|		const char *cset;
  524|       |
  525|   620k|		for( cset = set; *cset != '\0'; LDAP_UTF8_INCR(cset) ) {
  ------------------
  |  |  110|   349k|#define LDAP_UTF8_INCR(p) ((p) = LDAP_UTF8_NEXT(p))
  |  |  ------------------
  |  |  |  |  107|   349k|#define LDAP_UTF8_NEXT(p) (	LDAP_UTF8_ISASCII(p) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   89|   349k|#define LDAP_UTF8_ISASCII(p) ( !(*(const unsigned char *)(p) & 0x80 ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (89:30): [True: 349k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  108|   349k|	? (char *)(p)+1 : ldap_utf8_next((p)) )
  |  |  ------------------
  ------------------
  |  Branch (525:20): [True: 351k, False: 269k]
  ------------------
  526|   351k|			if( ldap_x_utf8_to_ucs4( str ) == ldap_x_utf8_to_ucs4( cset ) ) {
  ------------------
  |  Branch (526:8): [True: 2.01k, False: 349k]
  ------------------
  527|  2.01k|				return (char *) str;
  528|  2.01k|			} 
  529|   351k|		}
  530|   271k|	}
  531|       |
  532|  5.77k|	return NULL;
  533|  7.78k|}
ldap_utf8_strtok:
  537|  12.6k|{
  538|  12.6k|	char *begin;
  539|  12.6k|	char *end;
  540|       |
  541|  12.6k|	if( last == NULL ) return NULL;
  ------------------
  |  Branch (541:6): [True: 0, False: 12.6k]
  ------------------
  542|       |
  543|  12.6k|	begin = str ? str : *last;
  ------------------
  |  Branch (543:10): [True: 5.77k, False: 6.84k]
  ------------------
  544|       |
  545|  12.6k|	begin += ldap_utf8_strspn( begin, sep );
  546|       |
  547|  12.6k|	if( *begin == '\0' ) {
  ------------------
  |  Branch (547:6): [True: 5.77k, False: 6.84k]
  ------------------
  548|  5.77k|		*last = NULL;
  549|  5.77k|		return NULL;
  550|  5.77k|	}
  551|       |
  552|  6.84k|	end = &begin[ ldap_utf8_strcspn( begin, sep ) ];
  553|       |
  554|  6.84k|	if( *end != '\0' ) {
  ------------------
  |  Branch (554:6): [True: 1.60k, False: 5.24k]
  ------------------
  555|  1.60k|		char *next = LDAP_UTF8_NEXT( end );
  ------------------
  |  |  107|  1.60k|#define LDAP_UTF8_NEXT(p) (	LDAP_UTF8_ISASCII(p) \
  |  |  ------------------
  |  |  |  |   89|  1.60k|#define LDAP_UTF8_ISASCII(p) ( !(*(const unsigned char *)(p) & 0x80 ) )
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (89:30): [True: 1.60k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  108|  1.60k|	? (char *)(p)+1 : ldap_utf8_next((p)) )
  ------------------
  556|  1.60k|		*end = '\0';
  557|  1.60k|		end = next;
  558|  1.60k|	}
  559|       |
  560|  6.84k|	*last = end;
  561|  6.84k|	return begin;
  562|  12.6k|}

ldap_int_utils_init:
  652|      1|{
  653|      1|	static int done=0;
  654|      1|	if (done)
  ------------------
  |  Branch (654:6): [True: 0, False: 1]
  ------------------
  655|      0|	  return;
  656|      1|	done=1;
  657|       |
  658|      1|#ifdef LDAP_R_COMPILE
  659|       |#if !defined( USE_CTIME_R ) && !defined( HAVE_REENTRANT_FUNCTIONS )
  660|       |	ldap_pvt_thread_mutex_init( &ldap_int_ctime_mutex );
  661|       |#endif
  662|       |#if !defined( USE_GMTIME_R ) && !defined( USE_LOCALTIME_R )
  663|       |	ldap_pvt_thread_mutex_init( &ldap_int_gmtime_mutex );
  664|       |#endif
  665|      1|	ldap_pvt_thread_mutex_init( &ldap_int_resolv_mutex );
  666|       |
  667|      1|	ldap_pvt_thread_mutex_init( &ldap_int_hostname_mutex );
  668|       |
  669|      1|	ldap_pvt_thread_mutex_init( &ldap_int_gettime_mutex );
  670|       |
  671|      1|#endif
  672|       |
  673|       |	/* call other module init functions here... */
  674|      1|}

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

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

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

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

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

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

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

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

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

UTF8_getc:
   29|  28.9M|{
   30|  28.9M|    const unsigned char *p;
   31|  28.9M|    unsigned long value;
   32|  28.9M|    int ret;
   33|  28.9M|    if (len <= 0)
  ------------------
  |  Branch (33:9): [True: 0, False: 28.9M]
  ------------------
   34|      0|        return 0;
   35|  28.9M|    p = str;
   36|       |
   37|       |    /* Check syntax and work out the encoded value (if correct) */
   38|  28.9M|    if ((*p & 0x80) == 0) {
  ------------------
  |  Branch (38:9): [True: 28.8M, False: 92.0k]
  ------------------
   39|  28.8M|        value = *p++ & 0x7f;
   40|  28.8M|        ret = 1;
   41|  28.8M|    } else if ((*p & 0xe0) == 0xc0) {
  ------------------
  |  Branch (41:16): [True: 92.0k, False: 0]
  ------------------
   42|  92.0k|        if (len < 2)
  ------------------
  |  Branch (42:13): [True: 0, False: 92.0k]
  ------------------
   43|      0|            return -1;
   44|  92.0k|        if ((p[1] & 0xc0) != 0x80)
  ------------------
  |  Branch (44:13): [True: 0, False: 92.0k]
  ------------------
   45|      0|            return -3;
   46|  92.0k|        value = (*p++ & 0x1f) << 6;
   47|  92.0k|        value |= *p++ & 0x3f;
   48|  92.0k|        if (value < 0x80)
  ------------------
  |  Branch (48:13): [True: 0, False: 92.0k]
  ------------------
   49|      0|            return -4;
   50|  92.0k|        ret = 2;
   51|  92.0k|    } 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|  28.9M|    *val = value;
   82|  28.9M|    return ret;
   83|  28.9M|}
UTF8_putc:
   94|  48.7M|{
   95|  48.7M|    if (!str)
  ------------------
  |  Branch (95:9): [True: 24.3M, False: 24.3M]
  ------------------
   96|  24.3M|        len = 4; /* Maximum we will need */
   97|  24.3M|    else if (len <= 0)
  ------------------
  |  Branch (97:14): [True: 0, False: 24.3M]
  ------------------
   98|      0|        return -1;
   99|  48.7M|    if (value < 0x80) {
  ------------------
  |  Branch (99:9): [True: 48.7M, False: 0]
  ------------------
  100|  48.7M|        if (str)
  ------------------
  |  Branch (100:13): [True: 24.3M, False: 24.3M]
  ------------------
  101|  24.3M|            *str = (unsigned char)value;
  102|  48.7M|        return 1;
  103|  48.7M|    }
  104|      0|    if (value < 0x800) {
  ------------------
  |  Branch (104:9): [True: 0, False: 0]
  ------------------
  105|      0|        if (len < 2)
  ------------------
  |  Branch (105:13): [True: 0, False: 0]
  ------------------
  106|      0|            return -1;
  107|      0|        if (str) {
  ------------------
  |  Branch (107:13): [True: 0, False: 0]
  ------------------
  108|      0|            *str++ = (unsigned char)(((value >> 6) & 0x1f) | 0xc0);
  109|      0|            *str = (unsigned char)((value & 0x3f) | 0x80);
  110|      0|        }
  111|      0|        return 2;
  112|      0|    }
  113|      0|    if (value < 0x10000) {
  ------------------
  |  Branch (113:9): [True: 0, False: 0]
  ------------------
  114|      0|        if (is_unicode_surrogate(value))
  ------------------
  |  Branch (114:13): [True: 0, False: 0]
  ------------------
  115|      0|            return -2;
  116|      0|        if (len < 3)
  ------------------
  |  Branch (116:13): [True: 0, False: 0]
  ------------------
  117|      0|            return -1;
  118|      0|        if (str) {
  ------------------
  |  Branch (118:13): [True: 0, False: 0]
  ------------------
  119|      0|            *str++ = (unsigned char)(((value >> 12) & 0xf) | 0xe0);
  120|      0|            *str++ = (unsigned char)(((value >> 6) & 0x3f) | 0x80);
  121|      0|            *str = (unsigned char)((value & 0x3f) | 0x80);
  122|      0|        }
  123|      0|        return 3;
  124|      0|    }
  125|      0|    if (value < UNICODE_LIMIT) {
  ------------------
  |  Branch (125:9): [True: 0, False: 0]
  ------------------
  126|      0|        if (len < 4)
  ------------------
  |  Branch (126:13): [True: 0, False: 0]
  ------------------
  127|      0|            return -1;
  128|      0|        if (str) {
  ------------------
  |  Branch (128:13): [True: 0, False: 0]
  ------------------
  129|      0|            *str++ = (unsigned char)(((value >> 18) & 0x7) | 0xf0);
  130|      0|            *str++ = (unsigned char)(((value >> 12) & 0x3f) | 0x80);
  131|      0|            *str++ = (unsigned char)(((value >> 6) & 0x3f) | 0x80);
  132|      0|            *str = (unsigned char)((value & 0x3f) | 0x80);
  133|      0|        }
  134|      0|        return 4;
  135|      0|    }
  136|      0|    return -2;
  137|      0|}

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

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

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

ASN1_item_i2d:
   44|   287k|{
   45|   287k|    return asn1_item_flags_i2d(val, out, it, 0);
   46|   287k|}
ASN1_item_ex_i2d:
   83|  37.5M|{
   84|  37.5M|    const ASN1_TEMPLATE *tt = NULL;
   85|  37.5M|    int i, seqcontlen, seqlen, ndef = 1;
   86|  37.5M|    const ASN1_EXTERN_FUNCS *ef;
   87|  37.5M|    const ASN1_AUX *aux = it->funcs;
   88|  37.5M|    ASN1_aux_const_cb *asn1_cb = NULL;
   89|       |
   90|  37.5M|    if ((it->itype != ASN1_ITYPE_PRIMITIVE) && *pval == NULL)
  ------------------
  |  |   82|  37.5M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (90:9): [True: 19.5M, False: 17.9M]
  |  Branch (90:48): [True: 0, False: 19.5M]
  ------------------
   91|      0|        return 0;
   92|       |
   93|  37.5M|    if (aux != NULL) {
  ------------------
  |  Branch (93:9): [True: 1.43M, False: 36.0M]
  ------------------
   94|  1.43M|        asn1_cb = ((aux->flags & ASN1_AFLG_CONST_CB) != 0) ? aux->asn1_const_cb
  ------------------
  |  |  727|  1.43M|#define ASN1_AFLG_CONST_CB 8
  ------------------
  |  Branch (94:19): [True: 0, False: 1.43M]
  ------------------
   95|  1.43M|                                                           : (ASN1_aux_const_cb *)aux->asn1_cb; /* backward compatibility */
   96|  1.43M|    }
   97|       |
   98|  37.5M|    switch (it->itype) {
   99|       |
  100|  17.9M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  17.9M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (100:5): [True: 17.9M, False: 19.5M]
  ------------------
  101|  17.9M|        if (it->templates)
  ------------------
  |  Branch (101:13): [True: 4.93M, False: 13.0M]
  ------------------
  102|  4.93M|            return asn1_template_ex_i2d(pval, out, it->templates,
  103|  4.93M|                tag, aclass);
  104|  13.0M|        return asn1_i2d_ex_primitive(pval, out, it, tag, aclass);
  105|       |
  106|  9.86M|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  9.86M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (106:5): [True: 9.86M, False: 27.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|  9.86M|        if (tag != -1) {
  ------------------
  |  Branch (111:13): [True: 0, False: 9.86M]
  ------------------
  112|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BAD_TEMPLATE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  113|      0|            return -1;
  114|      0|        }
  115|  9.86M|        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: 37.5M]
  ------------------
  118|       |        /*
  119|       |         * It never makes sense for CHOICE types to have implicit tagging, so
  120|       |         * if tag != -1, then this looks like an error in the template.
  121|       |         */
  122|      0|        if (tag != -1) {
  ------------------
  |  Branch (122:13): [True: 0, False: 0]
  ------------------
  123|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BAD_TEMPLATE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  124|      0|            return -1;
  125|      0|        }
  126|      0|        if (asn1_cb && !asn1_cb(ASN1_OP_I2D_PRE, pval, it, NULL))
  ------------------
  |  |  737|      0|#define ASN1_OP_I2D_PRE 6
  ------------------
  |  Branch (126:13): [True: 0, False: 0]
  |  Branch (126:24): [True: 0, False: 0]
  ------------------
  127|      0|            return 0;
  128|      0|        i = ossl_asn1_get_choice_selector_const(pval, it);
  129|      0|        if ((i >= 0) && (i < it->tcount)) {
  ------------------
  |  Branch (129:13): [True: 0, False: 0]
  |  Branch (129:25): [True: 0, False: 0]
  ------------------
  130|      0|            const ASN1_VALUE **pchval;
  131|      0|            const ASN1_TEMPLATE *chtt;
  132|      0|            chtt = it->templates + i;
  133|      0|            pchval = ossl_asn1_get_const_field_ptr(pval, chtt);
  134|      0|            return asn1_template_ex_i2d(pchval, out, chtt, -1, aclass);
  135|      0|        }
  136|       |        /* Fixme: error condition if selector out of range */
  137|      0|        if (asn1_cb && !asn1_cb(ASN1_OP_I2D_POST, pval, it, NULL))
  ------------------
  |  |  738|      0|#define ASN1_OP_I2D_POST 7
  ------------------
  |  Branch (137:13): [True: 0, False: 0]
  |  Branch (137:24): [True: 0, False: 0]
  ------------------
  138|      0|            return 0;
  139|      0|        break;
  140|       |
  141|      0|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|      0|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (141:5): [True: 0, False: 37.5M]
  ------------------
  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: 37.5M]
  ------------------
  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|  9.70M|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  9.70M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (152:5): [True: 9.70M, False: 27.8M]
  ------------------
  153|  9.70M|        i = ossl_asn1_enc_restore(&seqcontlen, out, pval, it);
  154|       |        /* An error occurred */
  155|  9.70M|        if (i < 0)
  ------------------
  |  Branch (155:13): [True: 0, False: 9.70M]
  ------------------
  156|      0|            return 0;
  157|       |        /* We have a valid cached encoding... */
  158|  9.70M|        if (i > 0)
  ------------------
  |  Branch (158:13): [True: 863k, False: 8.83M]
  ------------------
  159|   863k|            return seqcontlen;
  160|       |        /* Otherwise carry on */
  161|  8.83M|        seqcontlen = 0;
  162|       |        /* If no IMPLICIT tagging set to SEQUENCE, UNIVERSAL */
  163|  8.83M|        if (tag == -1) {
  ------------------
  |  Branch (163:13): [True: 8.83M, False: 0]
  ------------------
  164|  8.83M|            tag = V_ASN1_SEQUENCE;
  ------------------
  |  |   76|  8.83M|#define V_ASN1_SEQUENCE 16
  ------------------
  165|       |            /* Retain any other flags in aclass */
  166|  8.83M|            aclass = (aclass & ~ASN1_TFLG_TAG_CLASS)
  ------------------
  |  |  564|  8.83M|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  167|  8.83M|                | V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  8.83M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  168|  8.83M|        }
  169|  8.83M|        if (asn1_cb && !asn1_cb(ASN1_OP_I2D_PRE, pval, it, NULL))
  ------------------
  |  |  737|   575k|#define ASN1_OP_I2D_PRE 6
  ------------------
  |  Branch (169:13): [True: 575k, False: 8.26M]
  |  Branch (169:24): [True: 0, False: 575k]
  ------------------
  170|      0|            return 0;
  171|       |        /* First work out sequence content length */
  172|  27.0M|        for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (172:41): [True: 18.2M, False: 8.83M]
  ------------------
  173|  18.2M|            const ASN1_TEMPLATE *seqtt;
  174|  18.2M|            const ASN1_VALUE **pseqval;
  175|  18.2M|            int tmplen;
  176|  18.2M|            seqtt = ossl_asn1_do_adb(*pval, tt, 1);
  177|  18.2M|            if (!seqtt)
  ------------------
  |  Branch (177:17): [True: 0, False: 18.2M]
  ------------------
  178|      0|                return 0;
  179|  18.2M|            pseqval = ossl_asn1_get_const_field_ptr(pval, seqtt);
  180|  18.2M|            tmplen = asn1_template_ex_i2d(pseqval, NULL, seqtt, -1, aclass);
  181|  18.2M|            if (tmplen == -1 || (tmplen > INT_MAX - seqcontlen))
  ------------------
  |  Branch (181:17): [True: 0, False: 18.2M]
  |  Branch (181:33): [True: 0, False: 18.2M]
  ------------------
  182|      0|                return -1;
  183|  18.2M|            seqcontlen += tmplen;
  184|  18.2M|        }
  185|       |
  186|  8.83M|        seqlen = ASN1_object_size(ndef, seqcontlen, tag);
  187|  8.83M|        if (!out || seqlen == -1)
  ------------------
  |  Branch (187:13): [True: 5.79M, False: 3.04M]
  |  Branch (187:21): [True: 0, False: 3.04M]
  ------------------
  188|  5.79M|            return seqlen;
  189|       |        /* Output SEQUENCE header */
  190|  3.04M|        ASN1_put_object(out, ndef, seqcontlen, tag, aclass);
  191|  9.41M|        for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (191:41): [True: 6.37M, False: 3.04M]
  ------------------
  192|  6.37M|            const ASN1_TEMPLATE *seqtt;
  193|  6.37M|            const ASN1_VALUE **pseqval;
  194|  6.37M|            seqtt = ossl_asn1_do_adb(*pval, tt, 1);
  195|  6.37M|            if (!seqtt)
  ------------------
  |  Branch (195:17): [True: 0, False: 6.37M]
  ------------------
  196|      0|                return 0;
  197|  6.37M|            pseqval = ossl_asn1_get_const_field_ptr(pval, seqtt);
  198|       |            /* FIXME: check for errors in enhanced version */
  199|  6.37M|            asn1_template_ex_i2d(pseqval, out, seqtt, -1, aclass);
  200|  6.37M|        }
  201|  3.04M|        if (ndef == 2)
  ------------------
  |  Branch (201:13): [True: 0, False: 3.04M]
  ------------------
  202|      0|            ASN1_put_eoc(out);
  203|  3.04M|        if (asn1_cb && !asn1_cb(ASN1_OP_I2D_POST, pval, it, NULL))
  ------------------
  |  |  738|   287k|#define ASN1_OP_I2D_POST 7
  ------------------
  |  Branch (203:13): [True: 287k, False: 2.75M]
  |  Branch (203:24): [True: 0, False: 287k]
  ------------------
  204|      0|            return 0;
  205|  3.04M|        return seqlen;
  206|       |
  207|      0|    default:
  ------------------
  |  Branch (207:5): [True: 0, False: 37.5M]
  ------------------
  208|      0|        return 0;
  209|  37.5M|    }
  210|      0|    return 0;
  211|  37.5M|}
tasn_enc.c:asn1_item_flags_i2d:
   57|   287k|{
   58|   287k|    if (out != NULL && *out == NULL) {
  ------------------
  |  Branch (58:9): [True: 287k, False: 0]
  |  Branch (58:24): [True: 287k, False: 0]
  ------------------
   59|   287k|        unsigned char *p, *buf;
   60|   287k|        int len;
   61|       |
   62|   287k|        len = ASN1_item_ex_i2d(&val, NULL, it, -1, flags);
   63|   287k|        if (len <= 0)
  ------------------
  |  Branch (63:13): [True: 0, False: 287k]
  ------------------
   64|      0|            return len;
   65|   287k|        if ((buf = OPENSSL_malloc(len)) == NULL)
  ------------------
  |  |  107|   287k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (65:13): [True: 0, False: 287k]
  ------------------
   66|      0|            return -1;
   67|   287k|        p = buf;
   68|   287k|        ASN1_item_ex_i2d(&val, &p, it, -1, flags);
   69|   287k|        *out = buf;
   70|   287k|        return len;
   71|   287k|    }
   72|       |
   73|      0|    return ASN1_item_ex_i2d(&val, out, it, -1, flags);
   74|   287k|}
tasn_enc.c:asn1_template_ex_i2d:
  215|  29.5M|{
  216|  29.5M|    const int flags = tt->flags;
  217|  29.5M|    int i, ret, ttag, tclass, ndef, len;
  218|  29.5M|    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|  29.5M|    if (flags & ASN1_TFLG_EMBED) {
  ------------------
  |  |  586|  29.5M|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  |  Branch (224:9): [True: 2.59M, False: 26.9M]
  ------------------
  225|  2.59M|        tval = (ASN1_VALUE *)pval;
  226|  2.59M|        pval = &tval;
  227|  2.59M|    }
  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|  29.5M|    if (flags & ASN1_TFLG_TAG_MASK) {
  ------------------
  |  |  541|  29.5M|#define ASN1_TFLG_TAG_MASK (0x3 << 3)
  ------------------
  |  Branch (235:9): [True: 0, False: 29.5M]
  ------------------
  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|  29.5M|    } else if (tag != -1) {
  ------------------
  |  Branch (243:16): [True: 0, False: 29.5M]
  ------------------
  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|  29.5M|    } else {
  248|  29.5M|        ttag = -1;
  249|  29.5M|        tclass = 0;
  250|  29.5M|    }
  251|       |    /*
  252|       |     * Remove any class mask from iflag.
  253|       |     */
  254|  29.5M|    iclass &= ~ASN1_TFLG_TAG_CLASS;
  ------------------
  |  |  564|  29.5M|#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|  29.5M|    if ((flags & ASN1_TFLG_NDEF) && (iclass & ASN1_TFLG_NDEF))
  ------------------
  |  |  583|  29.5M|#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: 29.5M]
  |  Branch (262:37): [True: 0, False: 0]
  ------------------
  263|      0|        ndef = 2;
  264|  29.5M|    else
  265|  29.5M|        ndef = 1;
  266|       |
  267|  29.5M|    if (flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|  29.5M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (267:9): [True: 4.93M, False: 24.6M]
  ------------------
  268|       |        /* SET OF, SEQUENCE OF */
  269|  4.93M|        STACK_OF(const_ASN1_VALUE) *sk = (STACK_OF(const_ASN1_VALUE) *)*pval;
  ------------------
  |  |   33|  4.93M|#define STACK_OF(type) struct stack_st_##type
  ------------------
  270|  4.93M|        int isset, sktag, skaclass;
  271|  4.93M|        int skcontlen, sklen;
  272|  4.93M|        const ASN1_VALUE *skitem;
  273|       |
  274|  4.93M|        if (*pval == NULL)
  ------------------
  |  Branch (274:13): [True: 0, False: 4.93M]
  ------------------
  275|      0|            return 0;
  276|       |
  277|  4.93M|        if (flags & ASN1_TFLG_SET_OF) {
  ------------------
  |  |  515|  4.93M|#define ASN1_TFLG_SET_OF (0x1 << 1)
  ------------------
  |  Branch (277:13): [True: 4.93M, False: 0]
  ------------------
  278|  4.93M|            isset = 1;
  279|       |            /* 2 means we reorder */
  280|  4.93M|            if (flags & ASN1_TFLG_SEQUENCE_OF)
  ------------------
  |  |  518|  4.93M|#define ASN1_TFLG_SEQUENCE_OF (0x2 << 1)
  ------------------
  |  Branch (280:17): [True: 0, False: 4.93M]
  ------------------
  281|      0|                isset = 2;
  282|  4.93M|        } else
  283|      0|            isset = 0;
  284|       |
  285|       |        /*
  286|       |         * Work out inner tag value: if EXPLICIT or no tagging use underlying
  287|       |         * type.
  288|       |         */
  289|  4.93M|        if ((ttag != -1) && !(flags & ASN1_TFLG_EXPTAG)) {
  ------------------
  |  |  539|      0|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (289:13): [True: 0, False: 4.93M]
  |  Branch (289:29): [True: 0, False: 0]
  ------------------
  290|      0|            sktag = ttag;
  291|      0|            skaclass = tclass;
  292|  4.93M|        } else {
  293|  4.93M|            skaclass = V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  4.93M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  294|  4.93M|            if (isset)
  ------------------
  |  Branch (294:17): [True: 4.93M, False: 0]
  ------------------
  295|  4.93M|                sktag = V_ASN1_SET;
  ------------------
  |  |   77|  4.93M|#define V_ASN1_SET 17
  ------------------
  296|      0|            else
  297|      0|                sktag = V_ASN1_SEQUENCE;
  ------------------
  |  |   76|      0|#define V_ASN1_SEQUENCE 16
  ------------------
  298|  4.93M|        }
  299|       |
  300|       |        /* Determine total length of items */
  301|  4.93M|        skcontlen = 0;
  302|  9.86M|        for (i = 0; i < sk_const_ASN1_VALUE_num(sk); i++) {
  ------------------
  |  Branch (302:21): [True: 4.93M, False: 4.93M]
  ------------------
  303|  4.93M|            skitem = sk_const_ASN1_VALUE_value(sk, i);
  304|  4.93M|            len = ASN1_item_ex_i2d(&skitem, NULL, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  394|  4.93M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  305|  4.93M|                -1, iclass);
  306|  4.93M|            if (len == -1 || (skcontlen > INT_MAX - len))
  ------------------
  |  Branch (306:17): [True: 0, False: 4.93M]
  |  Branch (306:30): [True: 0, False: 4.93M]
  ------------------
  307|      0|                return -1;
  308|  4.93M|            if (len == 0 && (tt->flags & ASN1_TFLG_OPTIONAL) == 0) {
  ------------------
  |  |  512|      0|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (308:17): [True: 0, False: 4.93M]
  |  Branch (308:29): [True: 0, False: 0]
  ------------------
  309|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_ZERO_CONTENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  310|      0|                return -1;
  311|      0|            }
  312|  4.93M|            skcontlen += len;
  313|  4.93M|        }
  314|  4.93M|        sklen = ASN1_object_size(ndef, skcontlen, sktag);
  315|  4.93M|        if (sklen == -1)
  ------------------
  |  Branch (315:13): [True: 0, False: 4.93M]
  ------------------
  316|      0|            return -1;
  317|       |        /* If EXPLICIT need length of surrounding tag */
  318|  4.93M|        if (flags & ASN1_TFLG_EXPTAG)
  ------------------
  |  |  539|  4.93M|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (318:13): [True: 0, False: 4.93M]
  ------------------
  319|      0|            ret = ASN1_object_size(ndef, sklen, ttag);
  320|  4.93M|        else
  321|  4.93M|            ret = sklen;
  322|       |
  323|  4.93M|        if (!out || ret == -1)
  ------------------
  |  Branch (323:13): [True: 2.46M, False: 2.46M]
  |  Branch (323:21): [True: 0, False: 2.46M]
  ------------------
  324|  2.46M|            return ret;
  325|       |
  326|       |        /* Now encode this lot... */
  327|       |        /* EXPLICIT tag */
  328|  2.46M|        if (flags & ASN1_TFLG_EXPTAG)
  ------------------
  |  |  539|  2.46M|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (328:13): [True: 0, False: 2.46M]
  ------------------
  329|      0|            ASN1_put_object(out, ndef, sklen, ttag, tclass);
  330|       |        /* SET or SEQUENCE and IMPLICIT tag */
  331|  2.46M|        ASN1_put_object(out, ndef, skcontlen, sktag, skaclass);
  332|       |        /* And the stuff itself */
  333|  2.46M|        asn1_set_seq_out(sk, out, skcontlen, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  394|  2.46M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  334|  2.46M|            isset, iclass);
  335|  2.46M|        if (ndef == 2) {
  ------------------
  |  Branch (335:13): [True: 0, False: 2.46M]
  ------------------
  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|  2.46M|        return ret;
  342|  4.93M|    }
  343|       |
  344|  24.6M|    if (flags & ASN1_TFLG_EXPTAG) {
  ------------------
  |  |  539|  24.6M|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (344:9): [True: 0, False: 24.6M]
  ------------------
  345|       |        /* EXPLICIT tagging */
  346|       |        /* Find length of tagged item */
  347|      0|        i = ASN1_item_ex_i2d(pval, NULL, ASN1_ITEM_ptr(tt->item), -1, iclass);
  ------------------
  |  |  394|      0|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  348|      0|        if (i == 0) {
  ------------------
  |  Branch (348:13): [True: 0, False: 0]
  ------------------
  349|      0|            if ((tt->flags & ASN1_TFLG_OPTIONAL) == 0) {
  ------------------
  |  |  512|      0|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (349:17): [True: 0, False: 0]
  ------------------
  350|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_ZERO_CONTENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  351|      0|                return -1;
  352|      0|            }
  353|      0|            return 0;
  354|      0|        }
  355|       |        /* Find length of EXPLICIT tag */
  356|      0|        ret = ASN1_object_size(ndef, i, ttag);
  357|      0|        if (out && ret != -1) {
  ------------------
  |  Branch (357:13): [True: 0, False: 0]
  |  Branch (357:20): [True: 0, False: 0]
  ------------------
  358|       |            /* Output tag and item */
  359|      0|            ASN1_put_object(out, ndef, i, ttag, tclass);
  360|      0|            ASN1_item_ex_i2d(pval, out, ASN1_ITEM_ptr(tt->item), -1, iclass);
  ------------------
  |  |  394|      0|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  361|      0|            if (ndef == 2)
  ------------------
  |  Branch (361:17): [True: 0, False: 0]
  ------------------
  362|      0|                ASN1_put_eoc(out);
  363|      0|        }
  364|      0|        return ret;
  365|      0|    }
  366|       |
  367|       |    /* Either normal or IMPLICIT tagging: combine class and flags */
  368|  24.6M|    len = ASN1_item_ex_i2d(pval, out, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  394|  24.6M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  369|  24.6M|        ttag, tclass | iclass);
  370|  24.6M|    if (len == 0 && (tt->flags & ASN1_TFLG_OPTIONAL) == 0) {
  ------------------
  |  |  512|   371k|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (370:9): [True: 371k, False: 24.2M]
  |  Branch (370:21): [True: 0, False: 371k]
  ------------------
  371|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_ZERO_CONTENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  372|      0|        return -1;
  373|      0|    }
  374|  24.6M|    return len;
  375|  24.6M|}
tasn_enc.c:asn1_set_seq_out:
  402|  2.46M|{
  403|  2.46M|    int i, ret = 0;
  404|  2.46M|    const ASN1_VALUE *skitem;
  405|  2.46M|    unsigned char *tmpdat = NULL, *p = NULL;
  406|  2.46M|    DER_ENC *derlst = NULL, *tder;
  407|       |
  408|  2.46M|    if (do_sort) {
  ------------------
  |  Branch (408:9): [True: 2.46M, False: 0]
  ------------------
  409|       |        /* Don't need to sort less than 2 items */
  410|  2.46M|        if (sk_const_ASN1_VALUE_num(sk) < 2)
  ------------------
  |  Branch (410:13): [True: 2.46M, False: 0]
  ------------------
  411|  2.46M|            do_sort = 0;
  412|      0|        else {
  413|      0|            derlst = OPENSSL_malloc(sk_const_ASN1_VALUE_num(sk)
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  414|      0|                * sizeof(*derlst));
  415|      0|            if (derlst == NULL)
  ------------------
  |  Branch (415:17): [True: 0, False: 0]
  ------------------
  416|      0|                return 0;
  417|      0|            tmpdat = OPENSSL_malloc(skcontlen);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  418|      0|            if (tmpdat == NULL)
  ------------------
  |  Branch (418:17): [True: 0, False: 0]
  ------------------
  419|      0|                goto err;
  420|      0|        }
  421|  2.46M|    }
  422|       |    /* If not sorting just output each item */
  423|  2.46M|    if (!do_sort) {
  ------------------
  |  Branch (423:9): [True: 2.46M, False: 0]
  ------------------
  424|  4.93M|        for (i = 0; i < sk_const_ASN1_VALUE_num(sk); i++) {
  ------------------
  |  Branch (424:21): [True: 2.46M, False: 2.46M]
  ------------------
  425|  2.46M|            skitem = sk_const_ASN1_VALUE_value(sk, i);
  426|  2.46M|            ASN1_item_ex_i2d(&skitem, out, item, -1, iclass);
  427|  2.46M|        }
  428|  2.46M|        return 1;
  429|  2.46M|    }
  430|      0|    p = tmpdat;
  431|       |
  432|       |    /* Doing sort: build up a list of each member's DER encoding */
  433|      0|    for (i = 0, tder = derlst; i < sk_const_ASN1_VALUE_num(sk); i++, tder++) {
  ------------------
  |  Branch (433:32): [True: 0, False: 0]
  ------------------
  434|      0|        skitem = sk_const_ASN1_VALUE_value(sk, i);
  435|      0|        tder->data = p;
  436|      0|        tder->length = ASN1_item_ex_i2d(&skitem, &p, item, -1, iclass);
  437|      0|        tder->field = skitem;
  438|      0|    }
  439|       |
  440|       |    /* Now sort them */
  441|      0|    qsort(derlst, sk_const_ASN1_VALUE_num(sk), sizeof(*derlst), der_cmp);
  442|       |    /* Output sorted DER encoding */
  443|      0|    p = *out;
  444|      0|    for (i = 0, tder = derlst; i < sk_const_ASN1_VALUE_num(sk); i++, tder++) {
  ------------------
  |  Branch (444:32): [True: 0, False: 0]
  ------------------
  445|      0|        memcpy(p, tder->data, tder->length);
  446|      0|        p += tder->length;
  447|      0|    }
  448|      0|    *out = p;
  449|       |    /* If do_sort is 2 then reorder the STACK */
  450|      0|    if (do_sort == 2) {
  ------------------
  |  Branch (450:9): [True: 0, False: 0]
  ------------------
  451|      0|        for (i = 0, tder = derlst; i < sk_const_ASN1_VALUE_num(sk); i++, tder++)
  ------------------
  |  Branch (451:36): [True: 0, False: 0]
  ------------------
  452|      0|            (void)sk_const_ASN1_VALUE_set(sk, i, tder->field);
  453|      0|    }
  454|      0|    ret = 1;
  455|      0|err:
  456|      0|    OPENSSL_free(derlst);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  457|      0|    OPENSSL_free(tmpdat);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  458|      0|    return ret;
  459|      0|}
tasn_enc.c:asn1_i2d_ex_primitive:
  463|  22.8M|{
  464|  22.8M|    int len;
  465|  22.8M|    int utype;
  466|  22.8M|    int usetag;
  467|  22.8M|    int ndef = 0;
  468|       |
  469|  22.8M|    utype = it->utype;
  470|       |
  471|       |    /*
  472|       |     * Get length of content octets and maybe find out the underlying type.
  473|       |     */
  474|       |
  475|  22.8M|    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|  22.8M|    if ((utype == V_ASN1_SEQUENCE) || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER))
  ------------------
  |  |   76|  22.8M|#define V_ASN1_SEQUENCE 16
  ------------------
                  if ((utype == V_ASN1_SEQUENCE) || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER))
  ------------------
  |  |   77|  22.8M|#define V_ASN1_SET 17
  ------------------
                  if ((utype == V_ASN1_SEQUENCE) || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER))
  ------------------
  |  |   59|  22.8M|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  |  Branch (482:9): [True: 0, False: 22.8M]
  |  Branch (482:39): [True: 0, False: 22.8M]
  |  Branch (482:64): [True: 0, False: 22.8M]
  ------------------
  483|      0|        usetag = 0;
  484|  22.8M|    else
  485|  22.8M|        usetag = 1;
  486|       |
  487|       |    /* -1 means omit type */
  488|       |
  489|  22.8M|    if (len == -1)
  ------------------
  |  Branch (489:9): [True: 371k, False: 22.5M]
  ------------------
  490|   371k|        return 0;
  491|       |
  492|       |    /* -2 return is special meaning use ndef */
  493|  22.5M|    if (len == -2) {
  ------------------
  |  Branch (493:9): [True: 0, False: 22.5M]
  ------------------
  494|      0|        ndef = 2;
  495|      0|        len = 0;
  496|      0|    }
  497|       |
  498|       |    /* If not implicitly tagged get tag from underlying type */
  499|  22.5M|    if (tag == -1)
  ------------------
  |  Branch (499:9): [True: 22.5M, False: 0]
  ------------------
  500|  22.5M|        tag = utype;
  501|       |
  502|       |    /* Output tag+length followed by content octets */
  503|  22.5M|    if (out) {
  ------------------
  |  Branch (503:9): [True: 5.70M, False: 16.8M]
  ------------------
  504|  5.70M|        if (usetag)
  ------------------
  |  Branch (504:13): [True: 5.70M, False: 0]
  ------------------
  505|  5.70M|            ASN1_put_object(out, ndef, len, tag, aclass);
  506|  5.70M|        asn1_ex_i2c(pval, *out, &utype, it);
  507|  5.70M|        if (ndef)
  ------------------
  |  Branch (507:13): [True: 0, False: 5.70M]
  ------------------
  508|      0|            ASN1_put_eoc(out);
  509|  5.70M|        else
  510|  5.70M|            *out += len;
  511|  5.70M|    }
  512|       |
  513|  22.5M|    if (usetag)
  ------------------
  |  Branch (513:9): [True: 22.5M, False: 0]
  ------------------
  514|  22.5M|        return ASN1_object_size(ndef, len, tag);
  515|      0|    return len;
  516|  22.5M|}
tasn_enc.c:asn1_ex_i2c:
  522|  28.5M|{
  523|  28.5M|    ASN1_BOOLEAN *tbool = NULL;
  524|  28.5M|    ASN1_STRING *strtmp;
  525|  28.5M|    ASN1_OBJECT *otmp;
  526|  28.5M|    int utype;
  527|  28.5M|    const unsigned char *cont;
  528|  28.5M|    unsigned char c;
  529|  28.5M|    int len;
  530|  28.5M|    const ASN1_PRIMITIVE_FUNCS *pf;
  531|  28.5M|    pf = it->funcs;
  532|  28.5M|    if (pf && pf->prim_i2c)
  ------------------
  |  Branch (532:9): [True: 0, False: 28.5M]
  |  Branch (532:15): [True: 0, False: 0]
  ------------------
  533|      0|        return pf->prim_i2c(pval, cout, putype, it);
  534|       |
  535|       |    /* Should type be omitted? */
  536|  28.5M|    if ((it->itype != ASN1_ITYPE_PRIMITIVE)
  ------------------
  |  |   82|  28.5M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (536:9): [True: 12.3M, False: 16.2M]
  ------------------
  537|  28.5M|        || (it->utype != V_ASN1_BOOLEAN)) {
  ------------------
  |  |   65|  16.2M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (537:12): [True: 16.2M, False: 0]
  ------------------
  538|  28.5M|        if (*pval == NULL)
  ------------------
  |  Branch (538:13): [True: 371k, False: 28.2M]
  ------------------
  539|   371k|            return -1;
  540|  28.5M|    }
  541|       |
  542|  28.2M|    if (it->itype == ASN1_ITYPE_MSTRING) {
  ------------------
  |  |   87|  28.2M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (542:9): [True: 12.3M, False: 15.8M]
  ------------------
  543|       |        /* If MSTRING type set the underlying type */
  544|  12.3M|        strtmp = (ASN1_STRING *)*pval;
  545|  12.3M|        utype = strtmp->type;
  546|  12.3M|        *putype = utype;
  547|  15.8M|    } else if (it->utype == V_ASN1_ANY) {
  ------------------
  |  |   60|  15.8M|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (547:16): [True: 975k, False: 14.9M]
  ------------------
  548|       |        /* If ANY set type and pointer to value */
  549|   975k|        ASN1_TYPE *typ;
  550|   975k|        typ = (ASN1_TYPE *)*pval;
  551|   975k|        utype = typ->type;
  552|   975k|        *putype = utype;
  553|   975k|        pval = (const ASN1_VALUE **)&typ->value.asn1_value; /* actually is const */
  554|   975k|    } else
  555|  14.9M|        utype = *putype;
  556|       |
  557|  28.2M|    switch (utype) {
  558|  13.7M|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|  13.7M|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (558:5): [True: 13.7M, False: 14.4M]
  ------------------
  559|  13.7M|        otmp = (ASN1_OBJECT *)*pval;
  560|  13.7M|        cont = otmp->data;
  561|  13.7M|        len = otmp->length;
  562|  13.7M|        if (cont == NULL || len == 0)
  ------------------
  |  Branch (562:13): [True: 0, False: 13.7M]
  |  Branch (562:29): [True: 0, False: 13.7M]
  ------------------
  563|      0|            return -1;
  564|  13.7M|        break;
  565|       |
  566|  13.7M|    case V_ASN1_UNDEF:
  ------------------
  |  |   62|      0|#define V_ASN1_UNDEF -1
  ------------------
  |  Branch (566:5): [True: 0, False: 28.2M]
  ------------------
  567|      0|        return -2;
  568|       |
  569|   975k|    case V_ASN1_NULL:
  ------------------
  |  |   69|   975k|#define V_ASN1_NULL 5
  ------------------
  |  Branch (569:5): [True: 975k, False: 27.2M]
  ------------------
  570|   975k|        cont = NULL;
  571|   975k|        len = 0;
  572|   975k|        break;
  573|       |
  574|      0|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|      0|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (574:5): [True: 0, False: 28.2M]
  ------------------
  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.15M|    case V_ASN1_BIT_STRING:
  ------------------
  |  |   67|  1.15M|#define V_ASN1_BIT_STRING 3
  ------------------
  |  Branch (592:5): [True: 1.15M, False: 27.0M]
  ------------------
  593|  1.15M|        return ossl_i2c_ASN1_BIT_STRING((const ASN1_BIT_STRING *)*pval,
  594|  1.15M|            cout ? &cout : NULL);
  ------------------
  |  Branch (594:13): [True: 287k, False: 863k]
  ------------------
  595|       |
  596|      0|    case V_ASN1_INTEGER:
  ------------------
  |  |   66|      0|#define V_ASN1_INTEGER 2
  ------------------
  |  Branch (596:5): [True: 0, False: 28.2M]
  ------------------
  597|      0|    case V_ASN1_ENUMERATED:
  ------------------
  |  |   74|      0|#define V_ASN1_ENUMERATED 10
  ------------------
  |  Branch (597:5): [True: 0, False: 28.2M]
  ------------------
  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: 28.2M]
  ------------------
  604|      0|    case V_ASN1_NUMERICSTRING:
  ------------------
  |  |   78|      0|#define V_ASN1_NUMERICSTRING 18
  ------------------
  |  Branch (604:5): [True: 0, False: 28.2M]
  ------------------
  605|      0|    case V_ASN1_PRINTABLESTRING:
  ------------------
  |  |   79|      0|#define V_ASN1_PRINTABLESTRING 19
  ------------------
  |  Branch (605:5): [True: 0, False: 28.2M]
  ------------------
  606|      0|    case V_ASN1_T61STRING:
  ------------------
  |  |   80|      0|#define V_ASN1_T61STRING 20
  ------------------
  |  Branch (606:5): [True: 0, False: 28.2M]
  ------------------
  607|      0|    case V_ASN1_VIDEOTEXSTRING:
  ------------------
  |  |   82|      0|#define V_ASN1_VIDEOTEXSTRING 21
  ------------------
  |  Branch (607:5): [True: 0, False: 28.2M]
  ------------------
  608|      0|    case V_ASN1_IA5STRING:
  ------------------
  |  |   83|      0|#define V_ASN1_IA5STRING 22
  ------------------
  |  Branch (608:5): [True: 0, False: 28.2M]
  ------------------
  609|      0|    case V_ASN1_UTCTIME:
  ------------------
  |  |   84|      0|#define V_ASN1_UTCTIME 23
  ------------------
  |  Branch (609:5): [True: 0, False: 28.2M]
  ------------------
  610|      0|    case V_ASN1_GENERALIZEDTIME:
  ------------------
  |  |   85|      0|#define V_ASN1_GENERALIZEDTIME 24
  ------------------
  |  Branch (610:5): [True: 0, False: 28.2M]
  ------------------
  611|      0|    case V_ASN1_GRAPHICSTRING:
  ------------------
  |  |   86|      0|#define V_ASN1_GRAPHICSTRING 25
  ------------------
  |  Branch (611:5): [True: 0, False: 28.2M]
  ------------------
  612|      0|    case V_ASN1_VISIBLESTRING:
  ------------------
  |  |   88|      0|#define V_ASN1_VISIBLESTRING 26 /* alias */
  ------------------
  |  Branch (612:5): [True: 0, False: 28.2M]
  ------------------
  613|      0|    case V_ASN1_GENERALSTRING:
  ------------------
  |  |   89|      0|#define V_ASN1_GENERALSTRING 27
  ------------------
  |  Branch (613:5): [True: 0, False: 28.2M]
  ------------------
  614|      0|    case V_ASN1_UNIVERSALSTRING:
  ------------------
  |  |   90|      0|#define V_ASN1_UNIVERSALSTRING 28
  ------------------
  |  Branch (614:5): [True: 0, False: 28.2M]
  ------------------
  615|      0|    case V_ASN1_BMPSTRING:
  ------------------
  |  |   91|      0|#define V_ASN1_BMPSTRING 30
  ------------------
  |  Branch (615:5): [True: 0, False: 28.2M]
  ------------------
  616|  12.3M|    case V_ASN1_UTF8STRING:
  ------------------
  |  |   75|  12.3M|#define V_ASN1_UTF8STRING 12
  ------------------
  |  Branch (616:5): [True: 12.3M, False: 15.8M]
  ------------------
  617|  12.3M|    case V_ASN1_SEQUENCE:
  ------------------
  |  |   76|  12.3M|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (617:5): [True: 0, False: 28.2M]
  ------------------
  618|  12.3M|    case V_ASN1_SET:
  ------------------
  |  |   77|  12.3M|#define V_ASN1_SET 17
  ------------------
  |  Branch (618:5): [True: 0, False: 28.2M]
  ------------------
  619|  12.3M|    default:
  ------------------
  |  Branch (619:5): [True: 0, False: 28.2M]
  ------------------
  620|       |        /* All based on ASN1_STRING and handled the same */
  621|  12.3M|        strtmp = (ASN1_STRING *)*pval;
  622|       |        /* Special handling for NDEF */
  623|  12.3M|        if ((it->size == ASN1_TFLG_NDEF)
  ------------------
  |  |  583|  12.3M|#define ASN1_TFLG_NDEF (0x1 << 11)
  ------------------
  |  Branch (623:13): [True: 0, False: 12.3M]
  ------------------
  624|      0|            && (strtmp->flags & ASN1_STRING_FLAG_NDEF)) {
  ------------------
  |  |   29|      0|#define ASN1_STRING_FLAG_NDEF 0x010
  ------------------
  |  Branch (624:16): [True: 0, False: 0]
  ------------------
  625|      0|            if (cout) {
  ------------------
  |  Branch (625:17): [True: 0, False: 0]
  ------------------
  626|      0|                strtmp->data = cout;
  627|      0|                strtmp->length = 0;
  628|      0|            }
  629|       |            /* Special return code */
  630|      0|            return -2;
  631|      0|        }
  632|  12.3M|        cont = strtmp->data;
  633|  12.3M|        len = strtmp->length;
  634|       |
  635|  12.3M|        break;
  636|  28.2M|    }
  637|  27.0M|    if (cout && len)
  ------------------
  |  Branch (637:9): [True: 5.41M, False: 21.6M]
  |  Branch (637:17): [True: 5.21M, False: 195k]
  ------------------
  638|  5.21M|        memcpy(cout, cont, len);
  639|  27.0M|    return len;
  640|  28.2M|}

ASN1_item_free:
   19|  14.4M|{
   20|  14.4M|    ossl_asn1_item_embed_free(&val, it, 0);
   21|  14.4M|}
ossl_asn1_item_embed_free:
   29|  40.7M|{
   30|  40.7M|    const ASN1_TEMPLATE *tt = NULL, *seqtt;
   31|  40.7M|    const ASN1_EXTERN_FUNCS *ef;
   32|  40.7M|    const ASN1_AUX *aux = it->funcs;
   33|  40.7M|    ASN1_aux_cb *asn1_cb;
   34|  40.7M|    int i;
   35|       |
   36|  40.7M|    if (pval == NULL)
  ------------------
  |  Branch (36:9): [True: 0, False: 40.7M]
  ------------------
   37|      0|        return;
   38|  40.7M|    if ((it->itype != ASN1_ITYPE_PRIMITIVE) && *pval == NULL)
  ------------------
  |  |   82|  40.7M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (38:9): [True: 22.7M, False: 18.0M]
  |  Branch (38:48): [True: 5.65M, False: 17.0M]
  ------------------
   39|  5.65M|        return;
   40|  35.0M|    if (aux && aux->asn1_cb)
  ------------------
  |  Branch (40:9): [True: 2.46M, False: 32.6M]
  |  Branch (40:16): [True: 726k, False: 1.74M]
  ------------------
   41|   726k|        asn1_cb = aux->asn1_cb;
   42|  34.3M|    else
   43|  34.3M|        asn1_cb = 0;
   44|       |
   45|  35.0M|    switch (it->itype) {
  ------------------
  |  Branch (45:13): [True: 35.0M, False: 0]
  ------------------
   46|       |
   47|  18.0M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  18.0M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (47:5): [True: 18.0M, False: 17.0M]
  ------------------
   48|  18.0M|        if (it->templates)
  ------------------
  |  Branch (48:13): [True: 1.39M, False: 16.6M]
  ------------------
   49|  1.39M|            ossl_asn1_template_free(pval, it->templates);
   50|  16.6M|        else
   51|  16.6M|            ossl_asn1_primitive_free(pval, it, embed);
   52|  18.0M|        break;
   53|       |
   54|  5.62M|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  5.62M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (54:5): [True: 5.62M, False: 29.4M]
  ------------------
   55|  5.62M|        ossl_asn1_primitive_free(pval, it, embed);
   56|  5.62M|        break;
   57|       |
   58|  71.4k|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|  71.4k|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (58:5): [True: 71.4k, False: 35.0M]
  ------------------
   59|  71.4k|        if (asn1_cb) {
  ------------------
  |  Branch (59:13): [True: 30.9k, False: 40.4k]
  ------------------
   60|  30.9k|            i = asn1_cb(ASN1_OP_FREE_PRE, pval, it, NULL);
  ------------------
  |  |  733|  30.9k|#define ASN1_OP_FREE_PRE 2
  ------------------
   61|  30.9k|            if (i == 2)
  ------------------
  |  Branch (61:17): [True: 0, False: 30.9k]
  ------------------
   62|      0|                return;
   63|  30.9k|        }
   64|  71.4k|        i = ossl_asn1_get_choice_selector(pval, it);
   65|  71.4k|        if ((i >= 0) && (i < it->tcount)) {
  ------------------
  |  Branch (65:13): [True: 71.4k, False: 0]
  |  Branch (65:25): [True: 71.4k, False: 0]
  ------------------
   66|  71.4k|            ASN1_VALUE **pchval;
   67|       |
   68|  71.4k|            tt = it->templates + i;
   69|  71.4k|            pchval = ossl_asn1_get_field_ptr(pval, tt);
   70|  71.4k|            ossl_asn1_template_free(pchval, tt);
   71|  71.4k|        }
   72|  71.4k|        if (asn1_cb)
  ------------------
  |  Branch (72:13): [True: 30.9k, False: 40.4k]
  ------------------
   73|  30.9k|            asn1_cb(ASN1_OP_FREE_POST, pval, it, NULL);
  ------------------
  |  |  734|  30.9k|#define ASN1_OP_FREE_POST 3
  ------------------
   74|  71.4k|        if (embed == 0) {
  ------------------
  |  Branch (74:13): [True: 71.4k, False: 0]
  ------------------
   75|  71.4k|            OPENSSL_free(*pval);
  ------------------
  |  |  132|  71.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   76|  71.4k|            *pval = NULL;
   77|  71.4k|        }
   78|  71.4k|        break;
   79|       |
   80|  1.39M|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|  1.39M|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (80:5): [True: 1.39M, False: 33.6M]
  ------------------
   81|  1.39M|        ef = it->funcs;
   82|  1.39M|        if (ef && ef->asn1_ex_free)
  ------------------
  |  Branch (82:13): [True: 1.39M, False: 0]
  |  Branch (82:19): [True: 1.39M, False: 0]
  ------------------
   83|  1.39M|            ef->asn1_ex_free(pval, it);
   84|  1.39M|        break;
   85|       |
   86|      0|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|      0|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (86:5): [True: 0, False: 35.0M]
  ------------------
   87|  9.97M|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  9.97M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (87:5): [True: 9.97M, False: 25.1M]
  ------------------
   88|  9.97M|        if (ossl_asn1_do_lock(pval, -1, it) != 0) {
  ------------------
  |  Branch (88:13): [True: 347k, False: 9.63M]
  ------------------
   89|       |            /* if error or ref-counter > 0 */
   90|   347k|            OPENSSL_assert(embed == 0);
  ------------------
  |  |  477|   347k|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (477:12): [True: 347k, False: 0]
  |  |  ------------------
  ------------------
   91|   347k|            *pval = NULL;
   92|   347k|            return;
   93|   347k|        }
   94|  9.63M|        if (asn1_cb) {
  ------------------
  |  Branch (94:13): [True: 347k, False: 9.28M]
  ------------------
   95|   347k|            i = asn1_cb(ASN1_OP_FREE_PRE, pval, it, NULL);
  ------------------
  |  |  733|   347k|#define ASN1_OP_FREE_PRE 2
  ------------------
   96|   347k|            if (i == 2)
  ------------------
  |  Branch (96:17): [True: 0, False: 347k]
  ------------------
   97|      0|                return;
   98|   347k|        }
   99|  9.63M|        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|  9.63M|        tt = it->templates + it->tcount;
  106|  33.3M|        for (i = 0; i < it->tcount; i++) {
  ------------------
  |  Branch (106:21): [True: 23.6M, False: 9.63M]
  ------------------
  107|  23.6M|            ASN1_VALUE **pseqval;
  108|       |
  109|  23.6M|            tt--;
  110|  23.6M|            seqtt = ossl_asn1_do_adb(*pval, tt, 0);
  111|  23.6M|            if (!seqtt)
  ------------------
  |  Branch (111:17): [True: 0, False: 23.6M]
  ------------------
  112|      0|                continue;
  113|  23.6M|            pseqval = ossl_asn1_get_field_ptr(pval, seqtt);
  114|  23.6M|            ossl_asn1_template_free(pseqval, seqtt);
  115|  23.6M|        }
  116|  9.63M|        if (asn1_cb)
  ------------------
  |  Branch (116:13): [True: 347k, False: 9.28M]
  ------------------
  117|   347k|            asn1_cb(ASN1_OP_FREE_POST, pval, it, NULL);
  ------------------
  |  |  734|   347k|#define ASN1_OP_FREE_POST 3
  ------------------
  118|  9.63M|        if (embed == 0) {
  ------------------
  |  Branch (118:13): [True: 8.23M, False: 1.39M]
  ------------------
  119|  8.23M|            OPENSSL_free(*pval);
  ------------------
  |  |  132|  8.23M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  120|       |            *pval = NULL;
  121|  8.23M|        }
  122|  9.63M|        break;
  123|  35.0M|    }
  124|  35.0M|}
ossl_asn1_template_free:
  127|  27.0M|{
  128|  27.0M|    int embed = tt->flags & ASN1_TFLG_EMBED;
  ------------------
  |  |  586|  27.0M|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  129|  27.0M|    ASN1_VALUE *tval;
  130|  27.0M|    if (embed) {
  ------------------
  |  Branch (130:9): [True: 3.27M, False: 23.7M]
  ------------------
  131|  3.27M|        tval = (ASN1_VALUE *)pval;
  132|  3.27M|        pval = &tval;
  133|  3.27M|    }
  134|  27.0M|    if (tt->flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|  27.0M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (134:9): [True: 1.96M, False: 25.0M]
  ------------------
  135|  1.96M|        STACK_OF(ASN1_VALUE) *sk = (STACK_OF(ASN1_VALUE) *)*pval;
  ------------------
  |  |   33|  1.96M|#define STACK_OF(type) struct stack_st_##type
  ------------------
  136|  1.96M|        int i;
  137|       |
  138|  3.21M|        for (i = 0; i < sk_ASN1_VALUE_num(sk); i++) {
  ------------------
  |  |  887|  3.21M|#define sk_ASN1_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_VALUE_sk_type(sk))
  ------------------
  |  Branch (138:21): [True: 1.25M, False: 1.96M]
  ------------------
  139|  1.25M|            ASN1_VALUE *vtmp = sk_ASN1_VALUE_value(sk, i);
  ------------------
  |  |  888|  1.25M|#define sk_ASN1_VALUE_value(sk, idx) ((ASN1_VALUE *)OPENSSL_sk_value(ossl_check_const_ASN1_VALUE_sk_type(sk), (idx)))
  ------------------
  140|       |
  141|  1.25M|            ossl_asn1_item_embed_free(&vtmp, ASN1_ITEM_ptr(tt->item), embed);
  ------------------
  |  |  394|  1.25M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  142|  1.25M|        }
  143|  1.96M|        sk_ASN1_VALUE_free(sk);
  ------------------
  |  |  893|  1.96M|#define sk_ASN1_VALUE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_VALUE_sk_type(sk))
  ------------------
  144|  1.96M|        *pval = NULL;
  145|  25.0M|    } else {
  146|  25.0M|        ossl_asn1_item_embed_free(pval, ASN1_ITEM_ptr(tt->item), embed);
  ------------------
  |  |  394|  25.0M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  147|  25.0M|    }
  148|  27.0M|}
ossl_asn1_primitive_free:
  151|  23.7M|{
  152|  23.7M|    int utype;
  153|       |
  154|       |    /* Special case: if 'it' is a primitive with a free_func, use that. */
  155|  23.7M|    if (it) {
  ------------------
  |  Branch (155:9): [True: 22.2M, False: 1.51M]
  ------------------
  156|  22.2M|        const ASN1_PRIMITIVE_FUNCS *pf = it->funcs;
  157|       |
  158|  22.2M|        if (embed) {
  ------------------
  |  Branch (158:13): [True: 1.88M, False: 20.3M]
  ------------------
  159|  1.88M|            if (pf && pf->prim_clear) {
  ------------------
  |  Branch (159:17): [True: 0, False: 1.88M]
  |  Branch (159:23): [True: 0, False: 0]
  ------------------
  160|      0|                pf->prim_clear(pval, it);
  161|      0|                return;
  162|      0|            }
  163|  20.3M|        } else if (pf && pf->prim_free) {
  ------------------
  |  Branch (163:20): [True: 0, False: 20.3M]
  |  Branch (163:26): [True: 0, False: 0]
  ------------------
  164|      0|            pf->prim_free(pval, it);
  165|      0|            return;
  166|      0|        }
  167|  22.2M|    }
  168|       |
  169|       |    /* Special case: if 'it' is NULL, free contents of ASN1_TYPE */
  170|  23.7M|    if (!it) {
  ------------------
  |  Branch (170:9): [True: 1.51M, False: 22.2M]
  ------------------
  171|  1.51M|        ASN1_TYPE *typ = (ASN1_TYPE *)*pval;
  172|       |
  173|  1.51M|        utype = typ->type;
  174|  1.51M|        pval = &typ->value.asn1_value;
  175|  1.51M|        if (*pval == NULL)
  ------------------
  |  Branch (175:13): [True: 1.17M, False: 336k]
  ------------------
  176|  1.17M|            return;
  177|  22.2M|    } else if (it->itype == ASN1_ITYPE_MSTRING) {
  ------------------
  |  |   87|  22.2M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (177:16): [True: 5.62M, False: 16.6M]
  ------------------
  178|  5.62M|        utype = -1;
  179|  5.62M|        if (*pval == NULL)
  ------------------
  |  Branch (179:13): [True: 0, False: 5.62M]
  ------------------
  180|      0|            return;
  181|  16.6M|    } else {
  182|  16.6M|        utype = it->utype;
  183|  16.6M|        if ((utype != V_ASN1_BOOLEAN) && *pval == NULL)
  ------------------
  |  |   65|  16.6M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (183:13): [True: 14.6M, False: 1.96M]
  |  Branch (183:42): [True: 2.59M, False: 12.0M]
  ------------------
  184|  2.59M|            return;
  185|  16.6M|    }
  186|       |
  187|  19.9M|    switch (utype) {
  188|  8.19M|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|  8.19M|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (188:5): [True: 8.19M, False: 11.7M]
  ------------------
  189|  8.19M|        ASN1_OBJECT_free((ASN1_OBJECT *)*pval);
  190|  8.19M|        break;
  191|       |
  192|  1.96M|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|  1.96M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (192:5): [True: 1.96M, False: 18.0M]
  ------------------
  193|  1.96M|        if (it)
  ------------------
  |  Branch (193:13): [True: 1.96M, False: 0]
  ------------------
  194|  1.96M|            *(ASN1_BOOLEAN *)pval = it->size;
  195|      0|        else
  196|      0|            *(ASN1_BOOLEAN *)pval = -1;
  197|  1.96M|        return;
  198|       |
  199|      0|    case V_ASN1_NULL:
  ------------------
  |  |   69|      0|#define V_ASN1_NULL 5
  ------------------
  |  Branch (199:5): [True: 0, False: 19.9M]
  ------------------
  200|      0|        break;
  201|       |
  202|  1.51M|    case V_ASN1_ANY:
  ------------------
  |  |   60|  1.51M|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (202:5): [True: 1.51M, False: 18.4M]
  ------------------
  203|  1.51M|        ossl_asn1_primitive_free(pval, NULL, 0);
  204|  1.51M|        OPENSSL_free(*pval);
  ------------------
  |  |  132|  1.51M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  205|  1.51M|        break;
  206|       |
  207|  8.31M|    default:
  ------------------
  |  Branch (207:5): [True: 8.31M, False: 11.6M]
  ------------------
  208|  8.31M|        ossl_asn1_string_embed_free((ASN1_STRING *)*pval, embed);
  209|  8.31M|        break;
  210|  19.9M|    }
  211|  18.0M|    *pval = NULL;
  212|  18.0M|}

ASN1_item_new:
   30|  4.67M|{
   31|  4.67M|    ASN1_VALUE *ret = NULL;
   32|  4.67M|    if (ASN1_item_ex_new(&ret, it) > 0)
  ------------------
  |  Branch (32:9): [True: 4.67M, False: 0]
  ------------------
   33|  4.67M|        return ret;
   34|      0|    return NULL;
   35|  4.67M|}
ASN1_item_new_ex:
   39|   347k|{
   40|   347k|    ASN1_VALUE *ret = NULL;
   41|   347k|    if (asn1_item_embed_new(&ret, it, 0, libctx, propq) > 0)
  ------------------
  |  Branch (41:9): [True: 347k, False: 0]
  ------------------
   42|   347k|        return ret;
   43|      0|    return NULL;
   44|   347k|}
ossl_asn1_item_ex_new_intern:
   50|  4.68M|{
   51|  4.68M|    return asn1_item_embed_new(pval, it, 0, libctx, propq);
   52|  4.68M|}
ASN1_item_ex_new:
   55|  4.67M|{
   56|  4.67M|    return asn1_item_embed_new(pval, it, 0, NULL, NULL);
   57|  4.67M|}
tasn_new.c:asn1_item_embed_new:
   61|  27.5M|{
   62|  27.5M|    const ASN1_TEMPLATE *tt = NULL;
   63|  27.5M|    const ASN1_EXTERN_FUNCS *ef;
   64|  27.5M|    const ASN1_AUX *aux = it->funcs;
   65|  27.5M|    ASN1_aux_cb *asn1_cb;
   66|  27.5M|    ASN1_VALUE **pseqval;
   67|  27.5M|    int i;
   68|  27.5M|    if (aux && aux->asn1_cb)
  ------------------
  |  Branch (68:9): [True: 2.00M, False: 25.5M]
  |  Branch (68:16): [True: 614k, False: 1.39M]
  ------------------
   69|   614k|        asn1_cb = aux->asn1_cb;
   70|  26.8M|    else
   71|  26.8M|        asn1_cb = 0;
   72|       |
   73|  27.5M|    switch (it->itype) {
  ------------------
  |  Branch (73:13): [True: 27.5M, False: 0]
  ------------------
   74|       |
   75|  1.04M|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|  1.04M|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (75:5): [True: 1.04M, False: 26.4M]
  ------------------
   76|  1.04M|        ef = it->funcs;
   77|  1.04M|        if (ef != NULL) {
  ------------------
  |  Branch (77:13): [True: 1.04M, False: 0]
  ------------------
   78|  1.04M|            if (ef->asn1_ex_new_ex != NULL) {
  ------------------
  |  Branch (78:17): [True: 347k, False: 695k]
  ------------------
   79|   347k|                if (!ef->asn1_ex_new_ex(pval, it, libctx, propq))
  ------------------
  |  Branch (79:21): [True: 0, False: 347k]
  ------------------
   80|      0|                    goto asn1err;
   81|   695k|            } else if (ef->asn1_ex_new != NULL) {
  ------------------
  |  Branch (81:24): [True: 695k, False: 0]
  ------------------
   82|   695k|                if (!ef->asn1_ex_new(pval, it))
  ------------------
  |  Branch (82:21): [True: 0, False: 695k]
  ------------------
   83|      0|                    goto asn1err;
   84|   695k|            }
   85|  1.04M|        }
   86|  1.04M|        break;
   87|       |
   88|  11.2M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  11.2M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (88:5): [True: 11.2M, False: 16.2M]
  ------------------
   89|  11.2M|        if (it->templates) {
  ------------------
  |  Branch (89:13): [True: 0, False: 11.2M]
  ------------------
   90|      0|            if (!asn1_template_new(pval, it->templates, libctx, propq))
  ------------------
  |  Branch (90:17): [True: 0, False: 0]
  ------------------
   91|      0|                goto asn1err;
   92|  11.2M|        } else if (!asn1_primitive_new(pval, it, embed))
  ------------------
  |  Branch (92:20): [True: 0, False: 11.2M]
  ------------------
   93|      0|            goto asn1err;
   94|  11.2M|        break;
   95|       |
   96|  11.2M|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  5.62M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (96:5): [True: 5.62M, False: 21.8M]
  ------------------
   97|  5.62M|        if (!asn1_primitive_new(pval, it, embed))
  ------------------
  |  Branch (97:13): [True: 0, False: 5.62M]
  ------------------
   98|      0|            goto asn1err;
   99|  5.62M|        break;
  100|       |
  101|  5.62M|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|  71.4k|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (101:5): [True: 71.4k, False: 27.4M]
  ------------------
  102|  71.4k|        if (asn1_cb) {
  ------------------
  |  Branch (102:13): [True: 30.9k, False: 40.4k]
  ------------------
  103|  30.9k|            i = asn1_cb(ASN1_OP_NEW_PRE, pval, it, NULL);
  ------------------
  |  |  731|  30.9k|#define ASN1_OP_NEW_PRE 0
  ------------------
  104|  30.9k|            if (!i)
  ------------------
  |  Branch (104:17): [True: 0, False: 30.9k]
  ------------------
  105|      0|                goto auxerr;
  106|  30.9k|            if (i == 2) {
  ------------------
  |  Branch (106:17): [True: 0, False: 30.9k]
  ------------------
  107|      0|                return 1;
  108|      0|            }
  109|  30.9k|        }
  110|  71.4k|        if (embed) {
  ------------------
  |  Branch (110:13): [True: 0, False: 71.4k]
  ------------------
  111|      0|            memset(*pval, 0, it->size);
  112|  71.4k|        } else {
  113|  71.4k|            *pval = OPENSSL_zalloc(it->size);
  ------------------
  |  |  109|  71.4k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  114|  71.4k|            if (*pval == NULL)
  ------------------
  |  Branch (114:17): [True: 0, False: 71.4k]
  ------------------
  115|      0|                return 0;
  116|  71.4k|        }
  117|  71.4k|        ossl_asn1_set_choice_selector(pval, -1, it);
  118|  71.4k|        if (asn1_cb && !asn1_cb(ASN1_OP_NEW_POST, pval, it, NULL))
  ------------------
  |  |  732|  30.9k|#define ASN1_OP_NEW_POST 1
  ------------------
  |  Branch (118:13): [True: 30.9k, False: 40.4k]
  |  Branch (118:24): [True: 0, False: 30.9k]
  ------------------
  119|      0|            goto auxerr2;
  120|  71.4k|        break;
  121|       |
  122|  71.4k|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|      0|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (122:5): [True: 0, False: 27.5M]
  ------------------
  123|  9.51M|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  9.51M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (123:5): [True: 9.51M, False: 17.9M]
  ------------------
  124|  9.51M|        if (asn1_cb) {
  ------------------
  |  Branch (124:13): [True: 583k, False: 8.93M]
  ------------------
  125|   583k|            i = asn1_cb(ASN1_OP_NEW_PRE, pval, it, NULL);
  ------------------
  |  |  731|   583k|#define ASN1_OP_NEW_PRE 0
  ------------------
  126|   583k|            if (!i)
  ------------------
  |  Branch (126:17): [True: 0, False: 583k]
  ------------------
  127|      0|                goto auxerr;
  128|   583k|            if (i == 2) {
  ------------------
  |  Branch (128:17): [True: 235k, False: 347k]
  ------------------
  129|   235k|                return 1;
  130|   235k|            }
  131|   583k|        }
  132|  9.28M|        if (embed) {
  ------------------
  |  Branch (132:13): [True: 1.39M, False: 7.89M]
  ------------------
  133|  1.39M|            memset(*pval, 0, it->size);
  134|  7.89M|        } else {
  135|  7.89M|            *pval = OPENSSL_zalloc(it->size);
  ------------------
  |  |  109|  7.89M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  136|  7.89M|            if (*pval == NULL)
  ------------------
  |  Branch (136:17): [True: 0, False: 7.89M]
  ------------------
  137|      0|                return 0;
  138|  7.89M|        }
  139|       |        /* 0 : init. lock */
  140|  9.28M|        if (ossl_asn1_do_lock(pval, 0, it) < 0) {
  ------------------
  |  Branch (140:13): [True: 0, False: 9.28M]
  ------------------
  141|      0|            if (!embed) {
  ------------------
  |  Branch (141:17): [True: 0, False: 0]
  ------------------
  142|      0|                OPENSSL_free(*pval);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  143|      0|                *pval = NULL;
  144|      0|            }
  145|      0|            goto asn1err;
  146|      0|        }
  147|  9.28M|        ossl_asn1_enc_init(pval, it);
  148|  32.2M|        for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (148:41): [True: 22.9M, False: 9.28M]
  ------------------
  149|  22.9M|            pseqval = ossl_asn1_get_field_ptr(pval, tt);
  150|  22.9M|            if (!asn1_template_new(pseqval, tt, libctx, propq))
  ------------------
  |  Branch (150:17): [True: 0, False: 22.9M]
  ------------------
  151|      0|                goto asn1err2;
  152|  22.9M|        }
  153|  9.28M|        if (asn1_cb && !asn1_cb(ASN1_OP_NEW_POST, pval, it, NULL))
  ------------------
  |  |  732|   347k|#define ASN1_OP_NEW_POST 1
  ------------------
  |  Branch (153:13): [True: 347k, False: 8.93M]
  |  Branch (153:24): [True: 0, False: 347k]
  ------------------
  154|      0|            goto auxerr2;
  155|  9.28M|        break;
  156|  27.5M|    }
  157|  27.2M|    return 1;
  158|       |
  159|      0|asn1err2:
  160|      0|    ossl_asn1_item_embed_free(pval, it, embed);
  161|      0|asn1err:
  162|      0|    ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  163|      0|    return 0;
  164|       |
  165|      0|auxerr2:
  166|      0|    ossl_asn1_item_embed_free(pval, it, embed);
  167|      0|auxerr:
  168|       |    ERR_raise(ERR_LIB_ASN1, ASN1_R_AUX_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  169|      0|    return 0;
  170|      0|}
tasn_new.c:asn1_template_new:
  207|  22.9M|{
  208|  22.9M|    const ASN1_ITEM *it = ASN1_ITEM_ptr(tt->item);
  ------------------
  |  |  394|  22.9M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  209|  22.9M|    int embed = tt->flags & ASN1_TFLG_EMBED;
  ------------------
  |  |  586|  22.9M|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  210|  22.9M|    ASN1_VALUE *tval;
  211|  22.9M|    int ret;
  212|  22.9M|    if (embed) {
  ------------------
  |  Branch (212:9): [True: 3.27M, False: 19.7M]
  ------------------
  213|  3.27M|        tval = (ASN1_VALUE *)pval;
  214|  3.27M|        pval = &tval;
  215|  3.27M|    }
  216|  22.9M|    if (tt->flags & ASN1_TFLG_OPTIONAL) {
  ------------------
  |  |  512|  22.9M|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (216:9): [True: 5.17M, False: 17.7M]
  ------------------
  217|  5.17M|        asn1_template_clear(pval, tt);
  218|  5.17M|        return 1;
  219|  5.17M|    }
  220|       |    /* If ANY DEFINED BY nothing to do */
  221|       |
  222|  17.7M|    if (tt->flags & ASN1_TFLG_ADB_MASK) {
  ------------------
  |  |  572|  17.7M|#define ASN1_TFLG_ADB_MASK (0x3 << 8)
  ------------------
  |  Branch (222:9): [True: 0, False: 17.7M]
  ------------------
  223|      0|        *pval = NULL;
  224|      0|        return 1;
  225|      0|    }
  226|       |    /* If SET OF or SEQUENCE OF, its a STACK */
  227|  17.7M|    if (tt->flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|  17.7M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (227:9): [True: 0, False: 17.7M]
  ------------------
  228|      0|        STACK_OF(ASN1_VALUE) *skval;
  ------------------
  |  |   33|      0|#define STACK_OF(type) struct stack_st_##type
  ------------------
  229|      0|        skval = sk_ASN1_VALUE_new_null();
  ------------------
  |  |  890|      0|#define sk_ASN1_VALUE_new_null() ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_ASN1_VALUE_freefunc_thunk))
  ------------------
  230|      0|        if (!skval) {
  ------------------
  |  Branch (230:13): [True: 0, False: 0]
  ------------------
  231|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  232|      0|            ret = 0;
  233|      0|            goto done;
  234|      0|        }
  235|      0|        *pval = (ASN1_VALUE *)skval;
  236|      0|        ret = 1;
  237|      0|        goto done;
  238|      0|    }
  239|       |    /* Otherwise pass it back to the item routine */
  240|  17.7M|    ret = asn1_item_embed_new(pval, it, embed, libctx, propq);
  241|  17.7M|done:
  242|  17.7M|    return ret;
  243|  17.7M|}
tasn_new.c:asn1_template_clear:
  246|  5.17M|{
  247|       |    /* If ADB or STACK just NULL the field */
  248|  5.17M|    if (tt->flags & (ASN1_TFLG_ADB_MASK | ASN1_TFLG_SK_MASK))
  ------------------
  |  |  572|  5.17M|#define ASN1_TFLG_ADB_MASK (0x3 << 8)
  ------------------
                  if (tt->flags & (ASN1_TFLG_ADB_MASK | ASN1_TFLG_SK_MASK))
  ------------------
  |  |  528|  5.17M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (248:9): [True: 443k, False: 4.73M]
  ------------------
  249|   443k|        *pval = NULL;
  250|  4.73M|    else
  251|  4.73M|        asn1_item_clear(pval, ASN1_ITEM_ptr(tt->item));
  ------------------
  |  |  394|  4.73M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  252|  5.17M|}
tasn_new.c:asn1_item_clear:
  173|  4.73M|{
  174|  4.73M|    const ASN1_EXTERN_FUNCS *ef;
  175|       |
  176|  4.73M|    switch (it->itype) {
  ------------------
  |  Branch (176:13): [True: 4.73M, False: 0]
  ------------------
  177|       |
  178|      0|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|      0|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (178:5): [True: 0, False: 4.73M]
  ------------------
  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|  4.70M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  4.70M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (186:5): [True: 4.70M, False: 30.9k]
  ------------------
  187|  4.70M|        if (it->templates)
  ------------------
  |  Branch (187:13): [True: 0, False: 4.70M]
  ------------------
  188|      0|            asn1_template_clear(pval, it->templates);
  189|  4.70M|        else
  190|  4.70M|            asn1_primitive_clear(pval, it);
  191|  4.70M|        break;
  192|       |
  193|      0|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|      0|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (193:5): [True: 0, False: 4.73M]
  ------------------
  194|      0|        asn1_primitive_clear(pval, it);
  195|      0|        break;
  196|       |
  197|  30.9k|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|  30.9k|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (197:5): [True: 30.9k, False: 4.70M]
  ------------------
  198|  30.9k|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  30.9k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (198:5): [True: 0, False: 4.73M]
  ------------------
  199|  30.9k|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|  30.9k|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (199:5): [True: 0, False: 4.73M]
  ------------------
  200|       |        *pval = NULL;
  201|  30.9k|        break;
  202|  4.73M|    }
  203|  4.73M|}
tasn_new.c:asn1_primitive_clear:
  326|  4.70M|{
  327|  4.70M|    int utype;
  328|  4.70M|    if (it && it->funcs) {
  ------------------
  |  Branch (328:9): [True: 4.70M, False: 0]
  |  Branch (328:15): [True: 0, False: 4.70M]
  ------------------
  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|  4.70M|    if (!it || (it->itype == ASN1_ITYPE_MSTRING))
  ------------------
  |  |   87|  4.70M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (336:9): [True: 0, False: 4.70M]
  |  Branch (336:16): [True: 0, False: 4.70M]
  ------------------
  337|      0|        utype = -1;
  338|  4.70M|    else
  339|  4.70M|        utype = it->utype;
  340|  4.70M|    if (utype == V_ASN1_BOOLEAN)
  ------------------
  |  |   65|  4.70M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (340:9): [True: 1.47M, False: 3.23M]
  ------------------
  341|  1.47M|        *(ASN1_BOOLEAN *)pval = it->size;
  342|  3.23M|    else
  343|  3.23M|        *pval = NULL;
  344|  4.70M|}
tasn_new.c:asn1_primitive_new:
  261|  16.8M|{
  262|  16.8M|    ASN1_TYPE *typ;
  263|  16.8M|    ASN1_STRING *str;
  264|  16.8M|    int utype;
  265|       |
  266|  16.8M|    if (!it)
  ------------------
  |  Branch (266:9): [True: 0, False: 16.8M]
  ------------------
  267|      0|        return 0;
  268|       |
  269|  16.8M|    if (it->funcs) {
  ------------------
  |  Branch (269:9): [True: 0, False: 16.8M]
  ------------------
  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|  16.8M|    if (it->itype == ASN1_ITYPE_MSTRING)
  ------------------
  |  |   87|  16.8M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (281:9): [True: 5.62M, False: 11.2M]
  ------------------
  282|  5.62M|        utype = -1;
  283|  11.2M|    else
  284|  11.2M|        utype = it->utype;
  285|  16.8M|    switch (utype) {
  286|  7.85M|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|  7.85M|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (286:5): [True: 7.85M, False: 9.02M]
  ------------------
  287|  7.85M|        *pval = (ASN1_VALUE *)OBJ_nid2obj(NID_undef);
  ------------------
  |  |   18|  7.85M|#define NID_undef                       0
  ------------------
  288|  7.85M|        return 1;
  289|       |
  290|      0|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|      0|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (290:5): [True: 0, False: 16.8M]
  ------------------
  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: 16.8M]
  ------------------
  295|      0|        *pval = (ASN1_VALUE *)1;
  296|      0|        return 1;
  297|       |
  298|  1.51M|    case V_ASN1_ANY:
  ------------------
  |  |   60|  1.51M|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (298:5): [True: 1.51M, False: 15.3M]
  ------------------
  299|  1.51M|        if ((typ = OPENSSL_malloc(sizeof(*typ))) == NULL)
  ------------------
  |  |  107|  1.51M|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (299:13): [True: 0, False: 1.51M]
  ------------------
  300|      0|            return 0;
  301|  1.51M|        typ->value.ptr = NULL;
  302|  1.51M|        typ->type = -1;
  303|  1.51M|        *pval = (ASN1_VALUE *)typ;
  304|  1.51M|        break;
  305|       |
  306|  7.50M|    default:
  ------------------
  |  Branch (306:5): [True: 7.50M, False: 9.37M]
  ------------------
  307|  7.50M|        if (embed) {
  ------------------
  |  Branch (307:13): [True: 1.88M, False: 5.62M]
  ------------------
  308|  1.88M|            str = *(ASN1_STRING **)pval;
  309|  1.88M|            memset(str, 0, sizeof(*str));
  310|  1.88M|            str->type = utype;
  311|  1.88M|            str->flags = ASN1_STRING_FLAG_EMBED;
  ------------------
  |  |   44|  1.88M|#define ASN1_STRING_FLAG_EMBED 0x080
  ------------------
  312|  5.62M|        } else {
  313|  5.62M|            str = ASN1_STRING_type_new(utype);
  314|  5.62M|            *pval = (ASN1_VALUE *)str;
  315|  5.62M|        }
  316|  7.50M|        if (it->itype == ASN1_ITYPE_MSTRING && str)
  ------------------
  |  |   87|  15.0M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (316:13): [True: 5.62M, False: 1.88M]
  |  Branch (316:48): [True: 5.62M, False: 0]
  ------------------
  317|  5.62M|            str->flags |= ASN1_STRING_FLAG_MSTRING;
  ------------------
  |  |   42|  5.62M|#define ASN1_STRING_FLAG_MSTRING 0x040
  ------------------
  318|  7.50M|        break;
  319|  16.8M|    }
  320|  9.02M|    if (*pval)
  ------------------
  |  Branch (320:9): [True: 9.02M, False: 0]
  ------------------
  321|  9.02M|        return 1;
  322|      0|    return 0;
  323|  9.02M|}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

BN_div:
  213|  1.31M|{
  214|  1.31M|    int ret;
  215|       |
  216|  1.31M|    if (BN_is_zero(divisor)) {
  ------------------
  |  Branch (216:9): [True: 0, False: 1.31M]
  ------------------
  217|      0|        ERR_raise(ERR_LIB_BN, BN_R_DIV_BY_ZERO);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  218|      0|        return 0;
  219|      0|    }
  220|       |
  221|       |    /*
  222|       |     * Invalid zero-padding would have particularly bad consequences so don't
  223|       |     * just rely on bn_check_top() here (bn_check_top() works only for
  224|       |     * BN_DEBUG builds)
  225|       |     */
  226|  1.31M|    if (divisor->d[divisor->top - 1] == 0) {
  ------------------
  |  Branch (226:9): [True: 0, False: 1.31M]
  ------------------
  227|      0|        ERR_raise(ERR_LIB_BN, BN_R_NOT_INITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  228|      0|        return 0;
  229|      0|    }
  230|       |
  231|  1.31M|    ret = bn_div_fixed_top(dv, rm, num, divisor, ctx);
  232|       |
  233|  1.31M|    if (ret) {
  ------------------
  |  Branch (233:9): [True: 1.31M, False: 0]
  ------------------
  234|  1.31M|        if (dv != NULL)
  ------------------
  |  Branch (234:13): [True: 103k, False: 1.20M]
  ------------------
  235|   103k|            bn_correct_top(dv);
  236|  1.31M|        if (rm != NULL)
  ------------------
  |  Branch (236:13): [True: 1.20M, False: 103k]
  ------------------
  237|  1.20M|            bn_correct_top(rm);
  238|  1.31M|    }
  239|       |
  240|  1.31M|    return ret;
  241|  1.31M|}
bn_div_fixed_top:
  268|  1.31M|{
  269|  1.31M|    int norm_shift, i, j, loop;
  270|  1.31M|    BIGNUM *tmp, *snum, *sdiv, *res;
  271|  1.31M|    BN_ULONG *resp, *wnum, *wnumtop;
  272|  1.31M|    BN_ULONG d0, d1;
  273|  1.31M|    int num_n, div_n, num_neg;
  274|       |
  275|  1.31M|    assert(divisor->top > 0 && divisor->d[divisor->top - 1] != 0);
  ------------------
  |  Branch (275:5): [True: 0, False: 1.31M]
  |  Branch (275:5): [True: 0, False: 0]
  |  Branch (275:5): [True: 1.31M, False: 0]
  |  Branch (275:5): [True: 1.31M, False: 0]
  ------------------
  276|       |
  277|  1.31M|    bn_check_top(num);
  278|  1.31M|    bn_check_top(divisor);
  279|  1.31M|    bn_check_top(dv);
  280|  1.31M|    bn_check_top(rm);
  281|       |
  282|  1.31M|    BN_CTX_start(ctx);
  283|  1.31M|    res = (dv == NULL) ? BN_CTX_get(ctx) : dv;
  ------------------
  |  Branch (283:11): [True: 1.20M, False: 103k]
  ------------------
  284|  1.31M|    tmp = BN_CTX_get(ctx);
  285|  1.31M|    snum = BN_CTX_get(ctx);
  286|  1.31M|    sdiv = BN_CTX_get(ctx);
  287|  1.31M|    if (sdiv == NULL)
  ------------------
  |  Branch (287:9): [True: 0, False: 1.31M]
  ------------------
  288|      0|        goto err;
  289|       |
  290|       |    /* First we normalise the numbers */
  291|  1.31M|    if (!BN_copy(sdiv, divisor))
  ------------------
  |  Branch (291:9): [True: 0, False: 1.31M]
  ------------------
  292|      0|        goto err;
  293|  1.31M|    norm_shift = bn_left_align(sdiv);
  294|  1.31M|    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.31M|    if (!(bn_lshift_fixed_top(snum, num, norm_shift)))
  ------------------
  |  Branch (302:9): [True: 0, False: 1.31M]
  ------------------
  303|      0|        goto err;
  304|       |
  305|  1.31M|    div_n = sdiv->top;
  306|  1.31M|    num_n = snum->top;
  307|       |
  308|  1.31M|    if (num_n <= div_n) {
  ------------------
  |  Branch (308:9): [True: 224k, False: 1.08M]
  ------------------
  309|       |        /* caller didn't pad dividend -> no constant-time guarantee... */
  310|   224k|        if (bn_wexpand(snum, div_n + 1) == NULL)
  ------------------
  |  Branch (310:13): [True: 0, False: 224k]
  ------------------
  311|      0|            goto err;
  312|   224k|        memset(&(snum->d[num_n]), 0, (div_n - num_n + 1) * sizeof(BN_ULONG));
  313|   224k|        snum->top = num_n = div_n + 1;
  314|   224k|    }
  315|       |
  316|  1.31M|    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.31M|    wnum = &(snum->d[loop]);
  322|  1.31M|    wnumtop = &(snum->d[num_n - 1]);
  323|       |
  324|       |    /* Get the top 2 words of sdiv */
  325|  1.31M|    d0 = sdiv->d[div_n - 1];
  326|  1.31M|    d1 = (div_n == 1) ? 0 : sdiv->d[div_n - 2];
  ------------------
  |  Branch (326:10): [True: 311k, False: 1.00M]
  ------------------
  327|       |
  328|       |    /* Setup quotient */
  329|  1.31M|    if (!bn_wexpand(res, loop))
  ------------------
  |  Branch (329:9): [True: 0, False: 1.31M]
  ------------------
  330|      0|        goto err;
  331|  1.31M|    num_neg = num->neg;
  332|  1.31M|    res->neg = (num_neg ^ divisor->neg);
  333|  1.31M|    res->top = loop;
  334|  1.31M|    res->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  1.31M|#define BN_FLG_FIXED_TOP 0
  ------------------
  335|  1.31M|    resp = &(res->d[loop]);
  336|       |
  337|       |    /* space for temp */
  338|  1.31M|    if (!bn_wexpand(tmp, (div_n + 1)))
  ------------------
  |  Branch (338:9): [True: 0, False: 1.31M]
  ------------------
  339|      0|        goto err;
  340|       |
  341|  3.67M|    for (i = 0; i < loop; i++, wnumtop--) {
  ------------------
  |  Branch (341:17): [True: 2.35M, False: 1.31M]
  ------------------
  342|  2.35M|        BN_ULONG q, l0;
  343|       |        /*
  344|       |         * the first part of the loop uses the top two words of snum and sdiv
  345|       |         * to calculate a BN_ULONG q such that | wnum - sdiv * q | < sdiv
  346|       |         */
  347|       |#if defined(BN_DIV3W)
  348|       |        q = bn_div_3_words(wnumtop, d1, d0);
  349|       |#else
  350|  2.35M|        BN_ULONG n0, n1, rem = 0;
  351|       |
  352|  2.35M|        n0 = wnumtop[0];
  353|  2.35M|        n1 = wnumtop[-1];
  354|  2.35M|        if (n0 == d0)
  ------------------
  |  Branch (354:13): [True: 0, False: 2.35M]
  ------------------
  355|      0|            q = BN_MASK2;
  ------------------
  |  |   77|      0|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  356|  2.35M|        else { /* n0 < d0 */
  357|  2.35M|            BN_ULONG n2 = (wnumtop == wnum) ? 0 : wnumtop[-2];
  ------------------
  |  Branch (357:27): [True: 622k, False: 1.73M]
  ------------------
  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.35M|            BN_ULONG t2l, t2h;
  387|       |
  388|  2.35M|            q = bn_div_words(n0, n1, d0);
  389|  2.35M|#ifndef REMAINDER_IS_ALREADY_CALCULATED
  390|  2.35M|            rem = (n1 - q * d0) & BN_MASK2;
  ------------------
  |  |   77|  2.35M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  391|  2.35M|#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.35M|            {
  400|  2.35M|                BN_ULONG ql, qh;
  401|  2.35M|                t2l = LBITS(d1);
  ------------------
  |  |  560|  2.35M|#define LBITS(a) ((a) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   78|  2.35M|#define BN_MASK2l (0xffffffffL)
  |  |  ------------------
  ------------------
  402|  2.35M|                t2h = HBITS(d1);
  ------------------
  |  |  561|  2.35M|#define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   76|  2.35M|#define BN_BITS4 32
  |  |  ------------------
  |  |               #define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   78|  2.35M|#define BN_MASK2l (0xffffffffL)
  |  |  ------------------
  ------------------
  403|  2.35M|                ql = LBITS(q);
  ------------------
  |  |  560|  2.35M|#define LBITS(a) ((a) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   78|  2.35M|#define BN_MASK2l (0xffffffffL)
  |  |  ------------------
  ------------------
  404|  2.35M|                qh = HBITS(q);
  ------------------
  |  |  561|  2.35M|#define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   76|  2.35M|#define BN_BITS4 32
  |  |  ------------------
  |  |               #define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   78|  2.35M|#define BN_MASK2l (0xffffffffL)
  |  |  ------------------
  ------------------
  405|  2.35M|                mul64(t2l, t2h, ql, qh); /* t2=(BN_ULLONG)d1*q; */
  ------------------
  |  |  569|  2.35M|    {                                      \
  |  |  570|  2.35M|        BN_ULONG m, m1, lt, ht;            \
  |  |  571|  2.35M|                                           \
  |  |  572|  2.35M|        lt = l;                            \
  |  |  573|  2.35M|        ht = h;                            \
  |  |  574|  2.35M|        m = (bh) * (lt);                   \
  |  |  575|  2.35M|        lt = (bl) * (lt);                  \
  |  |  576|  2.35M|        m1 = (bl) * (ht);                  \
  |  |  577|  2.35M|        ht = (bh) * (ht);                  \
  |  |  578|  2.35M|        m = (m + m1) & BN_MASK2;           \
  |  |  ------------------
  |  |  |  |   77|  2.35M|#define BN_MASK2 (0xffffffffffffffffL)
  |  |  ------------------
  |  |  579|  2.35M|        ht += L2HBITS((BN_ULONG)(m < m1)); \
  |  |  ------------------
  |  |  |  |  562|  2.35M|#define L2HBITS(a) (((a) << BN_BITS4) & BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  2.35M|#define BN_BITS4 32
  |  |  |  |  ------------------
  |  |  |  |               #define L2HBITS(a) (((a) << BN_BITS4) & BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  2.35M|#define BN_MASK2 (0xffffffffffffffffL)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  580|  2.35M|        ht += HBITS(m);                    \
  |  |  ------------------
  |  |  |  |  561|  2.35M|#define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  2.35M|#define BN_BITS4 32
  |  |  |  |  ------------------
  |  |  |  |               #define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|  2.35M|#define BN_MASK2l (0xffffffffL)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  581|  2.35M|        m1 = L2HBITS(m);                   \
  |  |  ------------------
  |  |  |  |  562|  2.35M|#define L2HBITS(a) (((a) << BN_BITS4) & BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  2.35M|#define BN_BITS4 32
  |  |  |  |  ------------------
  |  |  |  |               #define L2HBITS(a) (((a) << BN_BITS4) & BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  2.35M|#define BN_MASK2 (0xffffffffffffffffL)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  582|  2.35M|        lt = (lt + m1) & BN_MASK2;         \
  |  |  ------------------
  |  |  |  |   77|  2.35M|#define BN_MASK2 (0xffffffffffffffffL)
  |  |  ------------------
  |  |  583|  2.35M|        ht += (lt < m1);                   \
  |  |  584|  2.35M|        (l) = lt;                          \
  |  |  585|  2.35M|        (h) = ht;                          \
  |  |  586|  2.35M|    }
  ------------------
  406|  2.35M|            }
  407|  2.35M|#endif
  408|       |
  409|  2.35M|            for (;;) {
  410|  2.35M|                if ((t2h < rem) || ((t2h == rem) && (t2l <= n2)))
  ------------------
  |  Branch (410:21): [True: 1.70M, False: 656k]
  |  Branch (410:37): [True: 647k, False: 8.62k]
  |  Branch (410:53): [True: 647k, False: 0]
  ------------------
  411|  2.35M|                    break;
  412|  8.62k|                q--;
  413|  8.62k|                rem += d0;
  414|  8.62k|                if (rem < d0)
  ------------------
  |  Branch (414:21): [True: 8.62k, False: 0]
  ------------------
  415|  8.62k|                    break; /* don't let rem overflow */
  416|      0|                if (t2l < d1)
  ------------------
  |  Branch (416:21): [True: 0, False: 0]
  ------------------
  417|      0|                    t2h--;
  418|      0|                t2l -= d1;
  419|      0|            }
  420|  2.35M|#endif /* !BN_LLONG */
  421|  2.35M|        }
  422|  2.35M|#endif /* !BN_DIV3W */
  423|       |
  424|  2.35M|        l0 = bn_mul_words(tmp->d, sdiv->d, div_n, q);
  425|  2.35M|        tmp->d[div_n] = l0;
  426|  2.35M|        wnum--;
  427|       |        /*
  428|       |         * ignore top values of the bignums just sub the two BN_ULONG arrays
  429|       |         * with bn_sub_words
  430|       |         */
  431|  2.35M|        l0 = bn_sub_words(wnum, wnum, tmp->d, div_n + 1);
  432|  2.35M|        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|  13.4M|        for (l0 = 0 - l0, j = 0; j < div_n; j++)
  ------------------
  |  Branch (438:34): [True: 11.0M, False: 2.35M]
  ------------------
  439|  11.0M|            tmp->d[j] = sdiv->d[j] & l0;
  440|  2.35M|        l0 = bn_add_words(wnum, wnum, tmp->d, div_n);
  441|  2.35M|        (*wnumtop) += l0;
  442|  2.35M|        assert((*wnumtop) == 0);
  ------------------
  |  Branch (442:9): [True: 0, False: 2.35M]
  |  Branch (442:9): [True: 2.35M, False: 0]
  ------------------
  443|       |
  444|       |        /* store part of the result */
  445|  2.35M|        *--resp = q;
  446|  2.35M|    }
  447|       |    /* snum holds remainder, it's as wide as divisor */
  448|  1.31M|    snum->neg = num_neg;
  449|  1.31M|    snum->top = div_n;
  450|  1.31M|    snum->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  1.31M|#define BN_FLG_FIXED_TOP 0
  ------------------
  451|       |
  452|  1.31M|    if (rm != NULL && bn_rshift_fixed_top(rm, snum, norm_shift) == 0)
  ------------------
  |  Branch (452:9): [True: 1.20M, False: 103k]
  |  Branch (452:23): [True: 0, False: 1.20M]
  ------------------
  453|      0|        goto err;
  454|       |
  455|  1.31M|    BN_CTX_end(ctx);
  456|  1.31M|    return 1;
  457|      0|err:
  458|      0|    bn_check_top(rm);
  459|      0|    BN_CTX_end(ctx);
  460|      0|    return 0;
  461|  1.31M|}
bn_div.c:bn_left_align:
  142|  1.31M|{
  143|  1.31M|    BN_ULONG *d = num->d, n, m, rmask;
  144|  1.31M|    int top = num->top;
  145|  1.31M|    int rshift = BN_num_bits_word(d[top - 1]), lshift, i;
  146|       |
  147|  1.31M|    lshift = BN_BITS2 - rshift;
  ------------------
  |  |   54|  1.31M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  1.31M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  148|  1.31M|    rshift %= BN_BITS2; /* say no to undefined behaviour */
  ------------------
  |  |   54|  1.31M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  1.31M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  149|  1.31M|    rmask = (BN_ULONG)0 - rshift; /* rmask = 0 - (rshift != 0) */
  150|  1.31M|    rmask |= rmask >> 8;
  151|       |
  152|  7.57M|    for (i = 0, m = 0; i < top; i++) {
  ------------------
  |  Branch (152:24): [True: 6.25M, False: 1.31M]
  ------------------
  153|  6.25M|        n = d[i];
  154|  6.25M|        d[i] = ((n << lshift) | m) & BN_MASK2;
  ------------------
  |  |   77|  6.25M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  155|  6.25M|        m = (n >> rshift) & rmask;
  156|  6.25M|    }
  157|       |
  158|  1.31M|    return lshift;
  159|  1.31M|}

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|    142|{
  314|    142|    int i, j, bits, ret = 0, wstart, wend, window;
  315|    142|    int start = 1;
  316|    142|    BIGNUM *d, *r;
  317|    142|    const BIGNUM *aa;
  318|       |    /* Table of variables obtained from 'ctx' */
  319|    142|    BIGNUM *val[TABLE_SIZE];
  320|    142|    BN_MONT_CTX *mont = NULL;
  321|       |
  322|    142|    bn_check_top(a);
  323|    142|    bn_check_top(p);
  324|    142|    bn_check_top(m);
  325|       |
  326|    142|    if (!BN_is_odd(m)) {
  ------------------
  |  Branch (326:9): [True: 0, False: 142]
  ------------------
  327|      0|        ERR_raise(ERR_LIB_BN, BN_R_CALLED_WITH_EVEN_MODULUS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  328|      0|        return 0;
  329|      0|    }
  330|       |
  331|    142|    if (m->top <= BN_CONSTTIME_SIZE_LIMIT
  ------------------
  |  |   46|    284|#define BN_CONSTTIME_SIZE_LIMIT (INT_MAX / BN_BYTES / 256)
  |  |  ------------------
  |  |  |  |   38|    142|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (331:9): [True: 142, False: 0]
  ------------------
  332|    142|        && (BN_get_flags(p, BN_FLG_CONSTTIME) != 0
  ------------------
  |  |   67|    142|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (332:13): [True: 0, False: 142]
  ------------------
  333|    142|            || BN_get_flags(a, BN_FLG_CONSTTIME) != 0
  ------------------
  |  |   67|    142|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (333:16): [True: 0, False: 142]
  ------------------
  334|    142|            || BN_get_flags(m, BN_FLG_CONSTTIME) != 0)) {
  ------------------
  |  |   67|    142|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (334:16): [True: 0, False: 142]
  ------------------
  335|      0|        return BN_mod_exp_mont_consttime(rr, a, p, m, ctx, in_mont);
  336|      0|    }
  337|       |
  338|    142|    bits = BN_num_bits(p);
  339|    142|    if (bits == 0) {
  ------------------
  |  Branch (339:9): [True: 0, False: 142]
  ------------------
  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|    142|    BN_CTX_start(ctx);
  351|    142|    d = BN_CTX_get(ctx);
  352|    142|    r = BN_CTX_get(ctx);
  353|    142|    val[0] = BN_CTX_get(ctx);
  354|    142|    if (val[0] == NULL)
  ------------------
  |  Branch (354:9): [True: 0, False: 142]
  ------------------
  355|      0|        goto err;
  356|       |
  357|       |    /*
  358|       |     * If this is not done, things will break in the montgomery part
  359|       |     */
  360|       |
  361|    142|    if (in_mont != NULL)
  ------------------
  |  Branch (361:9): [True: 142, False: 0]
  ------------------
  362|    142|        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|    142|    if (a->neg || BN_ucmp(a, m) >= 0) {
  ------------------
  |  Branch (370:9): [True: 0, False: 142]
  |  Branch (370:19): [True: 0, False: 142]
  ------------------
  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|    142|        aa = a;
  376|    142|    if (!bn_to_mont_fixed_top(val[0], aa, mont, ctx))
  ------------------
  |  Branch (376:9): [True: 0, False: 142]
  ------------------
  377|      0|        goto err; /* 1 */
  378|       |
  379|    142|    window = BN_window_bits_for_exponent_size(bits);
  ------------------
  |  |  309|    142|    ((b) > 671 ? 6 : (b) > 239 ? 5          \
  |  |  ------------------
  |  |  |  Branch (309:6): [True: 0, False: 142]
  |  |  |  Branch (309:22): [True: 142, False: 0]
  |  |  ------------------
  |  |  310|    142|            : (b) > 79         ? 4          \
  |  |  ------------------
  |  |  |  Branch (310:15): [True: 0, False: 0]
  |  |  ------------------
  |  |  311|      0|            : (b) > 23         ? 3          \
  |  |  ------------------
  |  |  |  Branch (311:15): [True: 0, False: 0]
  |  |  ------------------
  |  |  312|      0|                               : 1)
  ------------------
  380|    142|    if (window > 1) {
  ------------------
  |  Branch (380:9): [True: 142, False: 0]
  ------------------
  381|    142|        if (!bn_mul_mont_fixed_top(d, val[0], val[0], mont, ctx))
  ------------------
  |  Branch (381:13): [True: 0, False: 142]
  ------------------
  382|      0|            goto err; /* 2 */
  383|    142|        j = 1 << (window - 1);
  384|  2.27k|        for (i = 1; i < j; i++) {
  ------------------
  |  Branch (384:21): [True: 2.13k, False: 142]
  ------------------
  385|  2.13k|            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: 2.13k]
  |  Branch (385:57): [True: 0, False: 2.13k]
  ------------------
  386|      0|                goto err;
  387|  2.13k|        }
  388|    142|    }
  389|       |
  390|    142|    start = 1; /* This is used to avoid multiplication etc
  391|       |                * when there is only the value '1' in the
  392|       |                * buffer. */
  393|    142|    wstart = bits - 1; /* The top bit of the window */
  394|    142|    wend = 0; /* The bottom bit of the window */
  395|       |
  396|    142|#if 1 /* by Shay Gueron's suggestion */
  397|    142|    j = m->top; /* borrow j */
  398|    142|    if (m->d[j - 1] & (((BN_ULONG)1) << (BN_BITS2 - 1))) {
  ------------------
  |  |   54|    142|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|    142|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (398:9): [True: 142, False: 0]
  ------------------
  399|    142|        if (bn_wexpand(r, j) == NULL)
  ------------------
  |  Branch (399:13): [True: 0, False: 142]
  ------------------
  400|      0|            goto err;
  401|       |        /* 2^(top*BN_BITS2) - m */
  402|    142|        r->d[0] = (0 - m->d[0]) & BN_MASK2;
  ------------------
  |  |   77|    142|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  403|    568|        for (i = 1; i < j; i++)
  ------------------
  |  Branch (403:21): [True: 426, False: 142]
  ------------------
  404|    426|            r->d[i] = (~m->d[i]) & BN_MASK2;
  ------------------
  |  |   77|    568|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  405|    142|        r->top = j;
  406|    142|        r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|    142|#define BN_FLG_FIXED_TOP 0
  ------------------
  407|    142|    } 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|  10.9k|    for (;;) {
  412|  10.9k|        int wvalue; /* The 'value' of the window */
  413|       |
  414|  10.9k|        if (BN_is_bit_set(p, wstart) == 0) {
  ------------------
  |  Branch (414:13): [True: 4.54k, False: 6.39k]
  ------------------
  415|  4.54k|            if (!start) {
  ------------------
  |  Branch (415:17): [True: 4.54k, False: 0]
  ------------------
  416|  4.54k|                if (!bn_mul_mont_fixed_top(r, r, r, mont, ctx))
  ------------------
  |  Branch (416:21): [True: 0, False: 4.54k]
  ------------------
  417|      0|                    goto err;
  418|  4.54k|            }
  419|  4.54k|            if (wstart == 0)
  ------------------
  |  Branch (419:17): [True: 0, False: 4.54k]
  ------------------
  420|      0|                break;
  421|  4.54k|            wstart--;
  422|  4.54k|            continue;
  423|  4.54k|        }
  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|  6.39k|        wvalue = 1;
  430|  6.39k|        wend = 0;
  431|  31.8k|        for (i = 1; i < window; i++) {
  ------------------
  |  Branch (431:21): [True: 25.5k, False: 6.24k]
  ------------------
  432|  25.5k|            if (wstart - i < 0)
  ------------------
  |  Branch (432:17): [True: 142, False: 25.4k]
  ------------------
  433|    142|                break;
  434|  25.4k|            if (BN_is_bit_set(p, wstart - i)) {
  ------------------
  |  Branch (434:17): [True: 25.1k, False: 284]
  ------------------
  435|  25.1k|                wvalue <<= (i - wend);
  436|  25.1k|                wvalue |= 1;
  437|  25.1k|                wend = i;
  438|  25.1k|            }
  439|  25.4k|        }
  440|       |
  441|       |        /* wend is the size of the current window */
  442|  6.39k|        j = wend + 1;
  443|       |        /* add the 'bytes above' */
  444|  6.39k|        if (!start)
  ------------------
  |  Branch (444:13): [True: 6.24k, False: 142]
  ------------------
  445|  37.3k|            for (i = 0; i < j; i++) {
  ------------------
  |  Branch (445:25): [True: 31.0k, False: 6.24k]
  ------------------
  446|  31.0k|                if (!bn_mul_mont_fixed_top(r, r, r, mont, ctx))
  ------------------
  |  Branch (446:21): [True: 0, False: 31.0k]
  ------------------
  447|      0|                    goto err;
  448|  31.0k|            }
  449|       |
  450|       |        /* wvalue will be an odd number < 2^window */
  451|  6.39k|        if (!bn_mul_mont_fixed_top(r, r, val[wvalue >> 1], mont, ctx))
  ------------------
  |  Branch (451:13): [True: 0, False: 6.39k]
  ------------------
  452|      0|            goto err;
  453|       |
  454|       |        /* move the 'window' down further */
  455|  6.39k|        wstart -= wend + 1;
  456|  6.39k|        start = 0;
  457|  6.39k|        if (wstart < 0)
  ------------------
  |  Branch (457:13): [True: 142, False: 6.24k]
  ------------------
  458|    142|            break;
  459|  6.39k|    }
  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|    142|        if (!BN_from_montgomery(rr, r, mont, ctx))
  ------------------
  |  Branch (476:13): [True: 0, False: 142]
  ------------------
  477|      0|        goto err;
  478|    142|    ret = 1;
  479|    142|err:
  480|    142|    if (in_mont == NULL)
  ------------------
  |  Branch (480:9): [True: 0, False: 142]
  ------------------
  481|      0|        BN_MONT_CTX_free(mont);
  482|    142|    BN_CTX_end(ctx);
  483|    142|    bn_check_top(rr);
  484|    142|    return ret;
  485|    142|}

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

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

BN_value_one:
   83|   233k|{
   84|   233k|    static const BN_ULONG data_one = 1L;
   85|   233k|    static const BIGNUM const_one = {
   86|   233k|        (BN_ULONG *)&data_one, 1, 1, 0, BN_FLG_STATIC_DATA
  ------------------
  |  |   59|   233k|#define BN_FLG_STATIC_DATA 0x02
  ------------------
   87|   233k|    };
   88|       |
   89|   233k|    return &const_one;
   90|   233k|}
BN_num_bits_word:
  102|  3.42M|{
  103|  3.42M|    BN_ULONG x, mask;
  104|  3.42M|    int bits = (l != 0);
  105|       |
  106|  3.42M|#if BN_BITS2 > 32
  107|  3.42M|    x = l >> 32;
  108|  3.42M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|  3.42M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  109|  3.42M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  3.42M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  3.42M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  110|  3.42M|    bits += 32 & mask;
  111|  3.42M|    l ^= (x ^ l) & mask;
  112|  3.42M|#endif
  113|       |
  114|  3.42M|    x = l >> 16;
  115|  3.42M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|  3.42M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  116|  3.42M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  3.42M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  3.42M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  117|  3.42M|    bits += 16 & mask;
  118|  3.42M|    l ^= (x ^ l) & mask;
  119|       |
  120|  3.42M|    x = l >> 8;
  121|  3.42M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|  3.42M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  122|  3.42M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  3.42M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  3.42M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  123|  3.42M|    bits += 8 & mask;
  124|  3.42M|    l ^= (x ^ l) & mask;
  125|       |
  126|  3.42M|    x = l >> 4;
  127|  3.42M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|  3.42M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  128|  3.42M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  3.42M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  3.42M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  129|  3.42M|    bits += 4 & mask;
  130|  3.42M|    l ^= (x ^ l) & mask;
  131|       |
  132|  3.42M|    x = l >> 2;
  133|  3.42M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|  3.42M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  134|  3.42M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  3.42M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  3.42M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  135|  3.42M|    bits += 2 & mask;
  136|  3.42M|    l ^= (x ^ l) & mask;
  137|       |
  138|  3.42M|    x = l >> 1;
  139|  3.42M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|  3.42M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  140|  3.42M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  3.42M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  3.42M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  141|  3.42M|    bits += 1 & mask;
  142|       |
  143|  3.42M|    return bits;
  144|  3.42M|}
BN_num_bits:
  179|  2.10M|{
  180|  2.10M|    int i = a->top - 1;
  181|  2.10M|    bn_check_top(a);
  182|       |
  183|  2.10M|    if (a->flags & BN_FLG_CONSTTIME) {
  ------------------
  |  |   67|  2.10M|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (183:9): [True: 852, False: 2.10M]
  ------------------
  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|    852|        return bn_num_bits_consttime(a);
  194|    852|    }
  195|       |
  196|  2.10M|    if (ossl_unlikely(BN_is_zero(a)))
  ------------------
  |  |   23|  2.10M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.10M]
  |  |  ------------------
  ------------------
  197|      0|        return 0;
  198|       |
  199|  2.10M|    return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));
  ------------------
  |  |   54|  2.10M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  2.10M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  200|  2.10M|}
BN_clear_free:
  213|  4.95M|{
  214|  4.95M|    if (a == NULL)
  ------------------
  |  Branch (214:9): [True: 1.53M, False: 3.41M]
  ------------------
  215|  1.53M|        return;
  216|  3.41M|    if (a->d != NULL && !BN_get_flags(a, BN_FLG_STATIC_DATA))
  ------------------
  |  |   59|  3.17M|#define BN_FLG_STATIC_DATA 0x02
  ------------------
  |  Branch (216:9): [True: 3.17M, False: 242k]
  |  Branch (216:25): [True: 3.17M, False: 0]
  ------------------
  217|  3.17M|        bn_free_d(a, 1);
  218|  3.41M|    if (BN_get_flags(a, BN_FLG_MALLOCED)) {
  ------------------
  |  |   58|  3.41M|#define BN_FLG_MALLOCED 0x01
  ------------------
  |  Branch (218:9): [True: 639, False: 3.41M]
  ------------------
  219|    639|        OPENSSL_cleanse(a, sizeof(*a));
  220|    639|        OPENSSL_free(a);
  ------------------
  |  |  132|    639|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  221|    639|    }
  222|  3.41M|}
BN_free:
  225|  3.88M|{
  226|  3.88M|    if (a == NULL)
  ------------------
  |  Branch (226:9): [True: 252k, False: 3.63M]
  ------------------
  227|   252k|        return;
  228|  3.63M|    if (!BN_get_flags(a, BN_FLG_STATIC_DATA))
  ------------------
  |  |   59|  3.63M|#define BN_FLG_STATIC_DATA 0x02
  ------------------
  |  Branch (228:9): [True: 3.63M, False: 0]
  ------------------
  229|  3.63M|        bn_free_d(a, 0);
  230|  3.63M|    if (a->flags & BN_FLG_MALLOCED)
  ------------------
  |  |   58|  3.63M|#define BN_FLG_MALLOCED 0x01
  ------------------
  |  Branch (230:9): [True: 3.63M, False: 0]
  ------------------
  231|  3.63M|        OPENSSL_free(a);
  ------------------
  |  |  132|  3.63M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  232|  3.63M|}
bn_init:
  235|  6.08M|{
  236|  6.08M|    static BIGNUM nilbn;
  237|       |
  238|  6.08M|    *a = nilbn;
  239|  6.08M|    bn_check_top(a);
  240|  6.08M|}
BN_new:
  243|  3.63M|{
  244|  3.63M|    BIGNUM *ret;
  245|       |
  246|  3.63M|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  109|  3.63M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (246:9): [True: 0, False: 3.63M]
  ------------------
  247|      0|        return NULL;
  248|  3.63M|    ret->flags = BN_FLG_MALLOCED;
  ------------------
  |  |   58|  3.63M|#define BN_FLG_MALLOCED 0x01
  ------------------
  249|  3.63M|    bn_check_top(ret);
  250|  3.63M|    return ret;
  251|  3.63M|}
BN_secure_new:
  254|    213|{
  255|    213|    BIGNUM *ret = BN_new();
  256|       |
  257|    213|    if (ret != NULL)
  ------------------
  |  Branch (257:9): [True: 213, False: 0]
  ------------------
  258|    213|        ret->flags |= BN_FLG_SECURE;
  ------------------
  |  |   68|    213|#define BN_FLG_SECURE 0x08
  ------------------
  259|    213|    return ret;
  260|    213|}
bn_expand2:
  299|  8.60M|{
  300|  8.60M|    if (ossl_likely(words > b->dmax)) {
  ------------------
  |  |   22|  8.60M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 8.60M, False: 0]
  |  |  ------------------
  ------------------
  301|  8.60M|        BN_ULONG *a = bn_expand_internal(b, words);
  302|       |
  303|  8.60M|        if (ossl_unlikely(!a))
  ------------------
  |  |   23|  8.60M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 8.60M]
  |  |  ------------------
  ------------------
  304|      0|            return NULL;
  305|  8.60M|        if (b->d != NULL)
  ------------------
  |  Branch (305:13): [True: 1.78M, False: 6.81M]
  ------------------
  306|  1.78M|            bn_free_d(b, 1);
  307|  8.60M|        b->d = a;
  308|  8.60M|        b->dmax = words;
  309|  8.60M|    }
  310|       |
  311|  8.60M|    return b;
  312|  8.60M|}
BN_dup:
  315|  8.89k|{
  316|  8.89k|    BIGNUM *t;
  317|       |
  318|  8.89k|    if (a == NULL)
  ------------------
  |  Branch (318:9): [True: 0, False: 8.89k]
  ------------------
  319|      0|        return NULL;
  320|  8.89k|    bn_check_top(a);
  321|       |
  322|  8.89k|    t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();
  ------------------
  |  |   68|  8.89k|#define BN_FLG_SECURE 0x08
  ------------------
  |  Branch (322:9): [True: 0, False: 8.89k]
  ------------------
  323|  8.89k|    if (t == NULL)
  ------------------
  |  Branch (323:9): [True: 0, False: 8.89k]
  ------------------
  324|      0|        return NULL;
  325|  8.89k|    if (!BN_copy(t, a)) {
  ------------------
  |  Branch (325:9): [True: 0, False: 8.89k]
  ------------------
  326|      0|        BN_free(t);
  327|      0|        return NULL;
  328|      0|    }
  329|  8.89k|    bn_check_top(t);
  330|  8.89k|    return t;
  331|  8.89k|}
BN_copy:
  334|  3.94M|{
  335|  3.94M|    int bn_words;
  336|       |
  337|  3.94M|    bn_check_top(b);
  338|       |
  339|  3.94M|    bn_words = BN_get_flags(b, BN_FLG_CONSTTIME) ? b->dmax : b->top;
  ------------------
  |  |   67|  3.94M|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (339:16): [True: 426, False: 3.94M]
  ------------------
  340|       |
  341|  3.94M|    if (ossl_unlikely(a == b))
  ------------------
  |  |   23|  3.94M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3.94M]
  |  |  ------------------
  ------------------
  342|      0|        return a;
  343|  3.94M|    if (ossl_unlikely(bn_wexpand(a, bn_words) == NULL))
  ------------------
  |  |   23|  3.94M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3.94M]
  |  |  ------------------
  ------------------
  344|      0|        return NULL;
  345|       |
  346|  3.94M|    if (ossl_likely(b->top > 0))
  ------------------
  |  |   22|  3.94M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3.82M, False: 121k]
  |  |  ------------------
  ------------------
  347|  3.82M|        memcpy(a->d, b->d, sizeof(b->d[0]) * bn_words);
  348|       |
  349|  3.94M|    a->neg = b->neg;
  350|  3.94M|    a->top = b->top;
  351|  3.94M|    a->flags |= b->flags & BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  3.94M|#define BN_FLG_FIXED_TOP 0
  ------------------
  352|  3.94M|    bn_check_top(a);
  353|  3.94M|    return a;
  354|  3.94M|}
BN_set_word:
  415|   224k|{
  416|   224k|    bn_check_top(a);
  417|   224k|    if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
  ------------------
  |  Branch (417:9): [True: 0, False: 224k]
  ------------------
  418|      0|        return 0;
  419|   224k|    a->neg = 0;
  420|   224k|    a->d[0] = w;
  421|   224k|    a->top = (w ? 1 : 0);
  ------------------
  |  Branch (421:15): [True: 224k, False: 0]
  ------------------
  422|   224k|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|   224k|#define BN_FLG_FIXED_TOP 0
  ------------------
  423|   224k|    bn_check_top(a);
  424|   224k|    return 1;
  425|   224k|}
BN_bin2bn:
  535|  1.69M|{
  536|  1.69M|    return bin2bn(s, len, ret, BIG, UNSIGNED);
  537|  1.69M|}
BN_bn2bin:
  642|    426|{
  643|    426|    return bn2binpad(a, to, -1, BIG, UNSIGNED);
  644|    426|}
BN_lebin2bn:
  647|     96|{
  648|     96|    return bin2bn(s, len, ret, LITTLE, UNSIGNED);
  649|     96|}
BN_bn2lebinpad:
  657|     48|{
  658|     48|    if (tolen < 0)
  ------------------
  |  Branch (658:9): [True: 0, False: 48]
  ------------------
  659|      0|        return -1;
  660|     48|    return bn2binpad(a, to, tolen, LITTLE, UNSIGNED);
  661|     48|}
BN_ucmp:
  707|  9.01M|{
  708|  9.01M|    int i;
  709|  9.01M|    BN_ULONG t1, t2, *ap, *bp;
  710|       |
  711|  9.01M|    ap = a->d;
  712|  9.01M|    bp = b->d;
  713|       |
  714|  9.01M|    if (BN_get_flags(a, BN_FLG_CONSTTIME)
  ------------------
  |  |   67|  9.01M|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (714:9): [True: 37.8k, False: 8.97M]
  ------------------
  715|  37.8k|        && a->top == b->top) {
  ------------------
  |  Branch (715:12): [True: 37.1k, False: 710]
  ------------------
  716|  37.1k|        int res = 0;
  717|       |
  718|   185k|        for (i = 0; i < b->top; i++) {
  ------------------
  |  Branch (718:21): [True: 148k, False: 37.1k]
  ------------------
  719|   148k|            res = constant_time_select_int((int)constant_time_lt_bn(ap[i], bp[i]),
  720|   148k|                -1, res);
  721|   148k|            res = constant_time_select_int((int)constant_time_lt_bn(bp[i], ap[i]),
  722|   148k|                1, res);
  723|   148k|        }
  724|  37.1k|        return res;
  725|  37.1k|    }
  726|       |
  727|  8.97M|    bn_check_top(a);
  728|  8.97M|    bn_check_top(b);
  729|       |
  730|  8.97M|    i = a->top - b->top;
  731|  8.97M|    if (i != 0)
  ------------------
  |  Branch (731:9): [True: 865k, False: 8.10M]
  ------------------
  732|   865k|        return i;
  733|       |
  734|  9.54M|    for (i = a->top - 1; i >= 0; i--) {
  ------------------
  |  Branch (734:26): [True: 9.21M, False: 328k]
  ------------------
  735|  9.21M|        t1 = ap[i];
  736|  9.21M|        t2 = bp[i];
  737|  9.21M|        if (t1 != t2)
  ------------------
  |  Branch (737:13): [True: 7.77M, False: 1.43M]
  ------------------
  738|  7.77M|            return ((t1 > t2) ? 1 : -1);
  ------------------
  |  Branch (738:21): [True: 3.32M, False: 4.45M]
  ------------------
  739|  9.21M|    }
  740|   328k|    return 0;
  741|  8.10M|}
BN_cmp:
  744|   533k|{
  745|   533k|    int i;
  746|   533k|    int gt, lt;
  747|   533k|    BN_ULONG t1, t2;
  748|       |
  749|   533k|    if ((a == NULL) || (b == NULL)) {
  ------------------
  |  Branch (749:9): [True: 0, False: 533k]
  |  Branch (749:24): [True: 0, False: 533k]
  ------------------
  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|   533k|    bn_check_top(a);
  759|   533k|    bn_check_top(b);
  760|       |
  761|   533k|    if (a->neg != b->neg) {
  ------------------
  |  Branch (761:9): [True: 0, False: 533k]
  ------------------
  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|   533k|    if (a->neg == 0) {
  ------------------
  |  Branch (767:9): [True: 533k, False: 0]
  ------------------
  768|   533k|        gt = 1;
  769|   533k|        lt = -1;
  770|   533k|    } else {
  771|      0|        gt = -1;
  772|      0|        lt = 1;
  773|      0|    }
  774|       |
  775|   533k|    if (a->top > b->top)
  ------------------
  |  Branch (775:9): [True: 37.0k, False: 496k]
  ------------------
  776|  37.0k|        return gt;
  777|   496k|    if (a->top < b->top)
  ------------------
  |  Branch (777:9): [True: 0, False: 496k]
  ------------------
  778|      0|        return lt;
  779|  3.05M|    for (i = a->top - 1; i >= 0; i--) {
  ------------------
  |  Branch (779:26): [True: 2.62M, False: 422k]
  ------------------
  780|  2.62M|        t1 = a->d[i];
  781|  2.62M|        t2 = b->d[i];
  782|  2.62M|        if (t1 > t2)
  ------------------
  |  Branch (782:13): [True: 0, False: 2.62M]
  ------------------
  783|      0|            return gt;
  784|  2.62M|        if (t1 < t2)
  ------------------
  |  Branch (784:13): [True: 73.4k, False: 2.55M]
  ------------------
  785|  73.4k|            return lt;
  786|  2.62M|    }
  787|   422k|    return 0;
  788|   496k|}
BN_set_bit:
  791|   207k|{
  792|   207k|    int i, j, k;
  793|       |
  794|   207k|    if (n < 0)
  ------------------
  |  Branch (794:9): [True: 0, False: 207k]
  ------------------
  795|      0|        return 0;
  796|       |
  797|   207k|    i = n / BN_BITS2;
  ------------------
  |  |   54|   207k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   207k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  798|   207k|    j = n % BN_BITS2;
  ------------------
  |  |   54|   207k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   207k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  799|   207k|    if (a->top <= i) {
  ------------------
  |  Branch (799:9): [True: 207k, False: 0]
  ------------------
  800|   207k|        if (bn_wexpand(a, i + 1) == NULL)
  ------------------
  |  Branch (800:13): [True: 0, False: 207k]
  ------------------
  801|      0|            return 0;
  802|  1.78M|        for (k = a->top; k < i + 1; k++)
  ------------------
  |  Branch (802:26): [True: 1.57M, False: 207k]
  ------------------
  803|  1.57M|            a->d[k] = 0;
  804|   207k|        a->top = i + 1;
  805|   207k|        a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|   207k|#define BN_FLG_FIXED_TOP 0
  ------------------
  806|   207k|    }
  807|       |
  808|   207k|    a->d[i] |= (((BN_ULONG)1) << j);
  809|   207k|    bn_check_top(a);
  810|   207k|    return 1;
  811|   207k|}
BN_is_bit_set:
  832|  19.8M|{
  833|  19.8M|    int i, j;
  834|       |
  835|  19.8M|    bn_check_top(a);
  836|  19.8M|    if (ossl_unlikely(n < 0))
  ------------------
  |  |   23|  19.8M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 19.8M]
  |  |  ------------------
  ------------------
  837|      0|        return 0;
  838|  19.8M|    i = n / BN_BITS2;
  ------------------
  |  |   54|  19.8M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  19.8M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  839|  19.8M|    j = n % BN_BITS2;
  ------------------
  |  |   54|  19.8M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  19.8M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  840|  19.8M|    if (ossl_unlikely(a->top <= i))
  ------------------
  |  |   23|  19.8M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 19.8M]
  |  |  ------------------
  ------------------
  841|      0|        return 0;
  842|  19.8M|    return (int)(((a->d[i]) >> j) & ((BN_ULONG)1));
  843|  19.8M|}
BN_set_negative:
  878|   112k|{
  879|   112k|    if (b && !BN_is_zero(a))
  ------------------
  |  Branch (879:9): [True: 0, False: 112k]
  |  Branch (879:14): [True: 0, False: 0]
  ------------------
  880|      0|        a->neg = 1;
  881|   112k|    else
  882|   112k|        a->neg = 0;
  883|   112k|}
BN_consttime_swap:
  943|   109k|{
  944|   109k|    BN_ULONG t;
  945|   109k|    int i;
  946|       |
  947|   109k|    bn_wcheck_size(a, nwords);
  948|   109k|    bn_wcheck_size(b, nwords);
  949|       |
  950|   109k|    condition = ((~condition & ((condition - 1))) >> (BN_BITS2 - 1)) - 1;
  ------------------
  |  |   54|   109k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   109k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  951|       |
  952|   109k|    t = (a->top ^ b->top) & condition;
  953|   109k|    a->top ^= t;
  954|   109k|    b->top ^= t;
  955|       |
  956|   109k|    t = (a->neg ^ b->neg) & condition;
  957|   109k|    a->neg ^= t;
  958|   109k|    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|   109k|#define BN_CONSTTIME_SWAP_FLAGS (BN_FLG_CONSTTIME | BN_FLG_FIXED_TOP)
  983|       |
  984|   109k|    t = ((a->flags ^ b->flags) & BN_CONSTTIME_SWAP_FLAGS) & condition;
  ------------------
  |  |  982|   109k|#define BN_CONSTTIME_SWAP_FLAGS (BN_FLG_CONSTTIME | BN_FLG_FIXED_TOP)
  |  |  ------------------
  |  |  |  |   67|   109k|#define BN_FLG_CONSTTIME 0x04
  |  |  ------------------
  |  |               #define BN_CONSTTIME_SWAP_FLAGS (BN_FLG_CONSTTIME | BN_FLG_FIXED_TOP)
  |  |  ------------------
  |  |  |  |  213|   109k|#define BN_FLG_FIXED_TOP 0
  |  |  ------------------
  ------------------
  985|   109k|    a->flags ^= t;
  986|   109k|    b->flags ^= t;
  987|       |
  988|       |    /* conditionally swap the data */
  989|   548k|    for (i = 0; i < nwords; i++) {
  ------------------
  |  Branch (989:17): [True: 438k, False: 109k]
  ------------------
  990|   438k|        t = (a->d[i] ^ b->d[i]) & condition;
  991|   438k|        a->d[i] ^= t;
  992|   438k|        b->d[i] ^= t;
  993|   438k|    }
  994|   109k|}
BN_zero_ex:
 1024|  8.72M|{
 1025|  8.72M|    a->neg = 0;
 1026|  8.72M|    a->top = 0;
 1027|  8.72M|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  8.72M|#define BN_FLG_FIXED_TOP 0
  ------------------
 1028|  8.72M|}
BN_abs_is_word:
 1031|   536k|{
 1032|   536k|    return ((a->top == 1) && (a->d[0] == w)) || ((w == 0) && (a->top == 0));
  ------------------
  |  Branch (1032:13): [True: 536k, False: 12]
  |  Branch (1032:30): [True: 328k, False: 207k]
  |  Branch (1032:50): [True: 0, False: 207k]
  |  Branch (1032:62): [True: 0, False: 0]
  ------------------
 1033|   536k|}
BN_is_zero:
 1036|  17.7M|{
 1037|  17.7M|    return a->top == 0;
 1038|  17.7M|}
BN_is_one:
 1041|   432k|{
 1042|   432k|    return BN_abs_is_word(a, 1) && !a->neg;
  ------------------
  |  Branch (1042:12): [True: 328k, False: 103k]
  |  Branch (1042:36): [True: 328k, False: 0]
  ------------------
 1043|   432k|}
BN_is_odd:
 1067|  6.85M|{
 1068|  6.85M|    return (a->top > 0) && (a->d[0] & 1);
  ------------------
  |  Branch (1068:12): [True: 6.85M, False: 0]
  |  Branch (1068:28): [True: 3.56M, False: 3.29M]
  ------------------
 1069|  6.85M|}
BN_is_negative:
 1072|  1.15M|{
 1073|  1.15M|    return (a->neg != 0);
 1074|  1.15M|}
BN_to_montgomery:
 1078|  61.8k|{
 1079|  61.8k|    return BN_mod_mul_montgomery(r, a, &(mont->RR), mont, ctx);
 1080|  61.8k|}
BN_set_flags:
 1111|  6.29k|{
 1112|  6.29k|    b->flags |= n;
 1113|  6.29k|}
BN_get_flags:
 1116|  49.4M|{
 1117|  49.4M|    return b->flags & n;
 1118|  49.4M|}
bn_wexpand:
 1146|  30.7M|{
 1147|  30.7M|    return (words <= a->dmax) ? a : bn_expand2(a, words);
  ------------------
  |  Branch (1147:12): [True: 22.2M, False: 8.48M]
  ------------------
 1148|  30.7M|}
bn_correct_top:
 1173|  12.4M|{
 1174|  12.4M|    BN_ULONG *ftl;
 1175|  12.4M|    int tmp_top = a->top;
 1176|       |
 1177|  12.4M|    if (ossl_likely(tmp_top > 0)) {
  ------------------
  |  |   22|  12.4M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 12.4M, False: 0]
  |  |  ------------------
  ------------------
 1178|  13.8M|        for (ftl = &(a->d[tmp_top]); tmp_top > 0; tmp_top--) {
  ------------------
  |  Branch (1178:38): [True: 13.8M, False: 0]
  ------------------
 1179|  13.8M|            ftl--;
 1180|  13.8M|            if (*ftl != 0)
  ------------------
  |  Branch (1180:17): [True: 12.4M, False: 1.36M]
  ------------------
 1181|  12.4M|                break;
 1182|  13.8M|        }
 1183|  12.4M|        a->top = tmp_top;
 1184|  12.4M|    }
 1185|  12.4M|    if (a->top == 0)
  ------------------
  |  Branch (1185:9): [True: 0, False: 12.4M]
  ------------------
 1186|      0|        a->neg = 0;
 1187|  12.4M|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  12.4M|#define BN_FLG_FIXED_TOP 0
  ------------------
 1188|  12.4M|    bn_pollute(a);
 1189|  12.4M|}
bn_lib.c:bn_num_bits_consttime:
  154|    852|{
  155|    852|    int j, ret;
  156|    852|    unsigned int mask, past_i;
  157|    852|    int i = a->top - 1;
  158|    852|    bn_check_top(a);
  159|       |
  160|  4.97k|    for (j = 0, past_i = 0, ret = 0; j < a->dmax; j++) {
  ------------------
  |  Branch (160:38): [True: 4.11k, False: 852]
  ------------------
  161|  4.11k|        mask = constant_time_eq_int(i, j); /* 0xff..ff if i==j, 0x0 otherwise */
  162|       |
  163|  4.11k|        ret += BN_BITS2 & (~mask & ~past_i);
  ------------------
  |  |   54|  4.11k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  4.11k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  164|  4.11k|        ret += BN_num_bits_word(a->d[j]) & mask;
  165|       |
  166|  4.11k|        past_i |= mask; /* past_i will become 0xff..ff after i==j */
  167|  4.11k|    }
  168|       |
  169|       |    /*
  170|       |     * if BN_is_zero(a) => i is -1 and ret contains garbage, so we mask the
  171|       |     * final result.
  172|       |     */
  173|    852|    mask = ~(constant_time_eq_int(i, ((int)-1)));
  174|       |
  175|    852|    return ret & mask;
  176|    852|}
bn_lib.c:bn_free_d:
  203|  8.60M|{
  204|  8.60M|    if (BN_get_flags(a, BN_FLG_SECURE))
  ------------------
  |  |   68|  8.60M|#define BN_FLG_SECURE 0x08
  ------------------
  |  Branch (204:9): [True: 5.42k, False: 8.59M]
  ------------------
  205|  5.42k|        OPENSSL_secure_clear_free(a->d, a->dmax * sizeof(a->d[0]));
  ------------------
  |  |  150|  5.42k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  206|  8.59M|    else if (clear != 0)
  ------------------
  |  Branch (206:14): [True: 4.96M, False: 3.63M]
  ------------------
  207|  4.96M|        OPENSSL_clear_free(a->d, a->dmax * sizeof(a->d[0]));
  ------------------
  |  |  130|  4.96M|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  208|  3.63M|    else
  209|  3.63M|        OPENSSL_free(a->d);
  ------------------
  |  |  132|  3.63M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  210|  8.60M|}
bn_lib.c:bn_expand_internal:
  265|  8.60M|{
  266|  8.60M|    BN_ULONG *a = NULL;
  267|       |
  268|  8.60M|    if (ossl_unlikely(words > (INT_MAX / (4 * BN_BITS2)))) {
  ------------------
  |  |   23|  8.60M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 8.60M]
  |  |  ------------------
  ------------------
  269|      0|        ERR_raise(ERR_LIB_BN, BN_R_BIGNUM_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  270|      0|        return NULL;
  271|      0|    }
  272|  8.60M|    if (ossl_unlikely(BN_get_flags(b, BN_FLG_STATIC_DATA))) {
  ------------------
  |  |   23|  8.60M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 8.60M]
  |  |  ------------------
  ------------------
  273|      0|        ERR_raise(ERR_LIB_BN, BN_R_EXPAND_ON_STATIC_BIGNUM_DATA);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  274|      0|        return NULL;
  275|      0|    }
  276|  8.60M|    if (BN_get_flags(b, BN_FLG_SECURE))
  ------------------
  |  |   68|  8.60M|#define BN_FLG_SECURE 0x08
  ------------------
  |  Branch (276:9): [True: 5.42k, False: 8.59M]
  ------------------
  277|  5.42k|        a = OPENSSL_secure_calloc(words, sizeof(*a));
  ------------------
  |  |  146|  5.42k|    CRYPTO_secure_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  278|  8.59M|    else
  279|  8.59M|        a = OPENSSL_calloc(words, sizeof(*a));
  ------------------
  |  |  113|  8.59M|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  280|  8.60M|    if (ossl_unlikely(a == NULL))
  ------------------
  |  |   23|  8.60M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 8.60M]
  |  |  ------------------
  ------------------
  281|      0|        return NULL;
  282|       |
  283|  8.60M|    assert(b->top <= words);
  ------------------
  |  Branch (283:5): [True: 0, False: 8.60M]
  |  Branch (283:5): [True: 8.60M, False: 0]
  ------------------
  284|  8.60M|    if (b->top > 0)
  ------------------
  |  Branch (284:9): [True: 424k, False: 8.17M]
  ------------------
  285|   424k|        memcpy(a, b->d, sizeof(*a) * b->top);
  286|       |
  287|  8.60M|    return a;
  288|  8.60M|}
bn_lib.c:bin2bn:
  434|  1.69M|{
  435|  1.69M|    int inc;
  436|  1.69M|    const unsigned char *s2;
  437|  1.69M|    int inc2;
  438|  1.69M|    int neg = 0, xor = 0, carry = 0;
  439|  1.69M|    unsigned int i;
  440|  1.69M|    unsigned int n;
  441|  1.69M|    BIGNUM *bn = NULL;
  442|       |
  443|       |    /* Negative length is not acceptable */
  444|  1.69M|    if (len < 0)
  ------------------
  |  Branch (444:9): [True: 0, False: 1.69M]
  ------------------
  445|      0|        return NULL;
  446|       |
  447|  1.69M|    if (ret == NULL)
  ------------------
  |  Branch (447:9): [True: 674k, False: 1.02M]
  ------------------
  448|   674k|        ret = bn = BN_new();
  449|  1.69M|    if (ret == NULL)
  ------------------
  |  Branch (449:9): [True: 0, False: 1.69M]
  ------------------
  450|      0|        return NULL;
  451|  1.69M|    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.69M|    if (len == 0) {
  ------------------
  |  Branch (457:9): [True: 0, False: 1.69M]
  ------------------
  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.69M|    if (endianness == LITTLE) {
  ------------------
  |  Branch (467:9): [True: 96, False: 1.69M]
  ------------------
  468|     96|        s2 = s + len - 1;
  469|     96|        inc2 = -1;
  470|     96|        inc = 1;
  471|  1.69M|    } else {
  472|  1.69M|        s2 = s;
  473|  1.69M|        inc2 = 1;
  474|  1.69M|        inc = -1;
  475|  1.69M|        s += len - 1;
  476|  1.69M|    }
  477|       |
  478|       |    /* Take note of the signedness of the input bytes*/
  479|  1.69M|    if (signedness == SIGNED) {
  ------------------
  |  Branch (479:9): [True: 0, False: 1.69M]
  ------------------
  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|  1.97M|    for (; len > 0 && *s2 == xor; s2 += inc2, len--)
  ------------------
  |  Branch (489:12): [True: 1.97M, False: 0]
  |  Branch (489:23): [True: 279k, False: 1.69M]
  ------------------
  490|   279k|        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.69M|    if (xor == 0xff) {
  ------------------
  |  Branch (497:9): [True: 0, False: 1.69M]
  ------------------
  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.69M|    if (len == 0) {
  ------------------
  |  Branch (502:9): [True: 0, False: 1.69M]
  ------------------
  503|      0|        ret->top = 0;
  504|      0|        return ret;
  505|      0|    }
  506|  1.69M|    n = ((len - 1) / BN_BYTES) + 1; /* Number of resulting bignum chunks */
  ------------------
  |  |   38|  1.69M|#define BN_BYTES 8
  ------------------
  507|  1.69M|    if (bn_wexpand(ret, (int)n) == NULL) {
  ------------------
  |  Branch (507:9): [True: 0, False: 1.69M]
  ------------------
  508|      0|        BN_free(bn);
  509|      0|        return NULL;
  510|      0|    }
  511|  1.69M|    ret->top = n;
  512|  1.69M|    ret->neg = neg;
  513|  22.0M|    for (i = 0; n-- > 0; i++) {
  ------------------
  |  Branch (513:17): [True: 20.3M, False: 1.69M]
  ------------------
  514|  20.3M|        BN_ULONG l = 0; /* Accumulator */
  515|  20.3M|        unsigned int m = 0; /* Offset in a bignum chunk, in bits */
  516|       |
  517|   182M|        for (; len > 0 && m < BN_BYTES * 8; len--, s += inc, m += 8) {
  ------------------
  |  |   38|   180M|#define BN_BYTES 8
  ------------------
  |  Branch (517:16): [True: 180M, False: 1.69M]
  |  Branch (517:27): [True: 161M, False: 18.6M]
  ------------------
  518|   161M|            BN_ULONG byte_xored = *s ^ xor;
  519|   161M|            BN_ULONG byte = (byte_xored + carry) & 0xff;
  520|       |
  521|   161M|            carry = byte_xored > byte; /* Implicit 1 or 0 */
  522|   161M|            l |= (byte << m);
  523|   161M|        }
  524|  20.3M|        ret->d[i] = l;
  525|  20.3M|    }
  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.69M|    bn_correct_top(ret);
  531|  1.69M|    return ret;
  532|  1.69M|}
bn_lib.c:bn2binpad:
  546|    474|{
  547|    474|    int inc;
  548|    474|    int n, n8;
  549|    474|    int xor = 0, carry = 0, ext = 0;
  550|    474|    size_t i, lasti, j, atop, mask;
  551|    474|    BN_ULONG l;
  552|       |
  553|       |    /*
  554|       |     * In case |a| is fixed-top, BN_num_bits can return bogus length,
  555|       |     * but it's assumed that fixed-top inputs ought to be "nominated"
  556|       |     * even for padded output, so it works out...
  557|       |     */
  558|    474|    n8 = BN_num_bits(a);
  559|    474|    n = (n8 + 7) / 8; /* This is what BN_num_bytes() does */
  560|       |
  561|       |    /* Take note of the signedness of the bignum */
  562|    474|    if (signedness == SIGNED) {
  ------------------
  |  Branch (562:9): [True: 0, False: 474]
  ------------------
  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|    474|    if (tolen == -1) {
  ------------------
  |  Branch (577:9): [True: 426, False: 48]
  ------------------
  578|    426|        tolen = n + ext;
  579|    426|    } else if (tolen < n + ext) { /* uncommon/unlike case */
  ------------------
  |  Branch (579:16): [True: 0, False: 48]
  ------------------
  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|    474|    atop = a->dmax * BN_BYTES;
  ------------------
  |  |   38|    474|#define BN_BYTES 8
  ------------------
  591|    474|    if (atop == 0) {
  ------------------
  |  Branch (591:9): [True: 0, False: 474]
  ------------------
  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|    474|    if (endianness == LITTLE) {
  ------------------
  |  Branch (602:9): [True: 48, False: 426]
  ------------------
  603|     48|        inc = 1;
  604|    426|    } else {
  605|    426|        inc = -1;
  606|    426|        to += tolen - 1; /* Move to the last byte, not beyond */
  607|    426|    }
  608|       |
  609|    474|    lasti = atop - 1;
  610|    474|    atop = a->top * BN_BYTES;
  ------------------
  |  |   38|    474|#define BN_BYTES 8
  ------------------
  611|  16.7k|    for (i = 0, j = 0; j < (size_t)tolen; j++) {
  ------------------
  |  Branch (611:24): [True: 16.3k, False: 474]
  ------------------
  612|  16.3k|        unsigned char byte, byte_xored;
  613|       |
  614|  16.3k|        l = a->d[i / BN_BYTES];
  ------------------
  |  |   38|  16.3k|#define BN_BYTES 8
  ------------------
  615|  16.3k|        mask = 0 - ((j - atop) >> (8 * sizeof(i) - 1));
  616|  16.3k|        byte = (unsigned char)(l >> (8 * (i % BN_BYTES)) & mask);
  ------------------
  |  |   38|  16.3k|#define BN_BYTES 8
  ------------------
  617|  16.3k|        byte_xored = byte ^ xor;
  618|  16.3k|        *to = (unsigned char)(byte_xored + carry);
  619|  16.3k|        carry = byte_xored > *to; /* Implicit 1 or 0 */
  620|  16.3k|        to += inc;
  621|  16.3k|        i += (i - lasti) >> (8 * sizeof(i) - 1); /* stay on last limb */
  622|  16.3k|    }
  623|       |
  624|    474|    return tolen;
  625|    474|}

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

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

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

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

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

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

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

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

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

ossl_bsearch:
   18|  9.29M|{
   19|  9.29M|    const char *base_ = base;
   20|  9.29M|    int l, h, i = 0, c = 0;
   21|  9.29M|    const char *p = NULL;
   22|       |
   23|  9.29M|    if (num == 0)
  ------------------
  |  Branch (23:9): [True: 0, False: 9.29M]
  ------------------
   24|      0|        return NULL;
   25|  9.29M|    l = 0;
   26|  9.29M|    h = num;
   27|  71.7M|    while (l < h) {
  ------------------
  |  Branch (27:12): [True: 71.3M, False: 401k]
  ------------------
   28|  71.3M|        i = l + (h - l) / 2;
   29|  71.3M|        p = &(base_[i * size]);
   30|  71.3M|        if (cmp_thunk != NULL)
  ------------------
  |  Branch (30:13): [True: 151k, False: 71.1M]
  ------------------
   31|   151k|            c = cmp_thunk((cmpthunk_fn)cmp, key, (const void *)p);
   32|  71.1M|        else
   33|  71.1M|            c = cmp(key, p);
   34|  71.3M|        if (c < 0)
  ------------------
  |  Branch (34:13): [True: 41.7M, False: 29.5M]
  ------------------
   35|  41.7M|            h = i;
   36|  29.5M|        else if (c > 0)
  ------------------
  |  Branch (36:18): [True: 20.7M, False: 8.89M]
  ------------------
   37|  20.7M|            l = i + 1;
   38|  8.89M|        else
   39|  8.89M|            break;
   40|  71.3M|    }
   41|  9.29M|    if (c != 0 && !(flags & OSSL_BSEARCH_VALUE_ON_NOMATCH))
  ------------------
  |  |  149|   401k|#define OSSL_BSEARCH_VALUE_ON_NOMATCH 0x01
  ------------------
  |  Branch (41:9): [True: 401k, False: 8.89M]
  |  Branch (41:19): [True: 401k, False: 0]
  ------------------
   42|   401k|        p = NULL;
   43|  8.89M|    else if (c == 0 && (flags & OSSL_BSEARCH_FIRST_VALUE_ON_MATCH)) {
  ------------------
  |  |  150|  8.89M|#define OSSL_BSEARCH_FIRST_VALUE_ON_MATCH 0x02
  ------------------
  |  Branch (43:14): [True: 8.89M, False: 0]
  |  Branch (43:24): [True: 148k, False: 8.74M]
  ------------------
   44|   148k|        while (i > 0) {
  ------------------
  |  Branch (44:16): [True: 1.57k, False: 146k]
  ------------------
   45|  1.57k|            if (cmp_thunk != NULL) {
  ------------------
  |  Branch (45:17): [True: 1.54k, False: 33]
  ------------------
   46|  1.54k|                if (cmp_thunk((cmpthunk_fn)cmp, key, (const void *)&(base_[(i - 1) * size])))
  ------------------
  |  Branch (46:21): [True: 1.54k, False: 0]
  ------------------
   47|  1.54k|                    break;
   48|  1.54k|            } else {
   49|     33|                if (cmp(key, &(base_[(i - 1) * size])))
  ------------------
  |  Branch (49:21): [True: 33, False: 0]
  ------------------
   50|     33|                    break;
   51|     33|            }
   52|      0|            i--;
   53|      0|        }
   54|   148k|        p = &(base_[i * size]);
   55|   148k|    }
   56|  9.29M|    return p;
   57|  9.29M|}

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

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

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

COMP_zlib:
  310|    709|{
  311|    709|    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|    709|    return meth;
  319|    709|}

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

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

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

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

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

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

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

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

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

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

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

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

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

SCT_LIST_free:
   47|  1.76k|{
   48|  1.76k|    sk_SCT_pop_free(a, SCT_free);
  ------------------
  |  |   59|  1.76k|#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.76k|}

ossl_ctype_check:
  253|  50.4M|{
  254|  50.4M|    const int max = sizeof(ctype_char_map) / sizeof(*ctype_char_map);
  255|  50.4M|    const int a = ossl_toascii(c);
  ------------------
  |  |   56|  50.4M|#define ossl_toascii(c) (c)
  ------------------
  256|       |
  257|  50.4M|    return a >= 0 && a < max && (ctype_char_map[a] & mask) != 0;
  ------------------
  |  Branch (257:12): [True: 50.4M, False: 7.75k]
  |  Branch (257:22): [True: 50.4M, False: 0]
  |  Branch (257:33): [True: 5.41M, False: 44.9M]
  ------------------
  258|  50.4M|}
ossl_isdigit:
  270|   524k|{
  271|   524k|    int a = ossl_toascii(c);
  ------------------
  |  |   56|   524k|#define ossl_toascii(c) (c)
  ------------------
  272|       |
  273|   524k|    return ASCII_IS_DIGIT(a);
  ------------------
  |  |  265|   524k|#define ASCII_IS_DIGIT(c) (c >= 0x30 && c <= 0x39)
  |  |  ------------------
  |  |  |  Branch (265:28): [True: 515k, False: 9.25k]
  |  |  |  Branch (265:41): [True: 497k, False: 18.6k]
  |  |  ------------------
  ------------------
  274|   524k|}
ossl_tolower:
  297|   141M|{
  298|   141M|    int a = ossl_toascii(c);
  ------------------
  |  |   56|   141M|#define ossl_toascii(c) (c)
  ------------------
  299|       |
  300|   141M|    return ASCII_IS_UPPER(a) ? c ^ case_change : c;
  ------------------
  |  |  266|   141M|#define ASCII_IS_UPPER(c) (c >= 0x41 && c <= 0x5A)
  |  |  ------------------
  |  |  |  Branch (266:28): [True: 125M, False: 15.5M]
  |  |  |  Branch (266:41): [True: 49.1M, False: 76.4M]
  |  |  ------------------
  ------------------
  301|   141M|}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

EC_GFp_nistp521_method:
 1588|  2.87k|{
 1589|  2.87k|    static const EC_METHOD ret = {
 1590|  2.87k|        EC_FLAGS_DEFAULT_OCT,
  ------------------
  |  |   26|  2.87k|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
 1591|  2.87k|        NID_X9_62_prime_field,
  ------------------
  |  |  152|  2.87k|#define NID_X9_62_prime_field           406
  ------------------
 1592|  2.87k|        ossl_ec_GFp_nistp521_group_init,
 1593|  2.87k|        ossl_ec_GFp_simple_group_finish,
 1594|  2.87k|        ossl_ec_GFp_simple_group_clear_finish,
 1595|  2.87k|        ossl_ec_GFp_nist_group_copy,
 1596|  2.87k|        ossl_ec_GFp_nistp521_group_set_curve,
 1597|  2.87k|        ossl_ec_GFp_simple_group_get_curve,
 1598|  2.87k|        ossl_ec_GFp_simple_group_get_degree,
 1599|  2.87k|        ossl_ec_group_simple_order_bits,
 1600|  2.87k|        ossl_ec_GFp_simple_group_check_discriminant,
 1601|  2.87k|        ossl_ec_GFp_simple_point_init,
 1602|  2.87k|        ossl_ec_GFp_simple_point_finish,
 1603|  2.87k|        ossl_ec_GFp_simple_point_clear_finish,
 1604|  2.87k|        ossl_ec_GFp_simple_point_copy,
 1605|  2.87k|        ossl_ec_GFp_simple_point_set_to_infinity,
 1606|  2.87k|        ossl_ec_GFp_simple_point_set_affine_coordinates,
 1607|  2.87k|        ossl_ec_GFp_nistp521_point_get_affine_coordinates,
 1608|  2.87k|        0 /* point_set_compressed_coordinates */,
 1609|  2.87k|        0 /* point2oct */,
 1610|  2.87k|        0 /* oct2point */,
 1611|  2.87k|        ossl_ec_GFp_simple_add,
 1612|  2.87k|        ossl_ec_GFp_simple_dbl,
 1613|  2.87k|        ossl_ec_GFp_simple_invert,
 1614|  2.87k|        ossl_ec_GFp_simple_is_at_infinity,
 1615|  2.87k|        ossl_ec_GFp_simple_is_on_curve,
 1616|  2.87k|        ossl_ec_GFp_simple_cmp,
 1617|  2.87k|        ossl_ec_GFp_simple_make_affine,
 1618|  2.87k|        ossl_ec_GFp_simple_points_make_affine,
 1619|  2.87k|        ossl_ec_GFp_nistp521_points_mul,
 1620|  2.87k|        ossl_ec_GFp_nistp521_precompute_mult,
 1621|  2.87k|        ossl_ec_GFp_nistp521_have_precompute_mult,
 1622|  2.87k|        ossl_ec_GFp_nist_field_mul,
 1623|  2.87k|        ossl_ec_GFp_nist_field_sqr,
 1624|  2.87k|        0 /* field_div */,
 1625|  2.87k|        ossl_ec_GFp_simple_field_inv,
 1626|  2.87k|        0 /* field_encode */,
 1627|  2.87k|        0 /* field_decode */,
 1628|  2.87k|        0, /* field_set_to_one */
 1629|  2.87k|        ossl_ec_key_simple_priv2oct,
 1630|  2.87k|        ossl_ec_key_simple_oct2priv,
 1631|  2.87k|        0, /* set private */
 1632|  2.87k|        ossl_ec_key_simple_generate_key,
 1633|  2.87k|        ossl_ec_key_simple_check_key,
 1634|  2.87k|        ossl_ec_key_simple_generate_public_key,
 1635|  2.87k|        0, /* keycopy */
 1636|  2.87k|        0, /* keyfinish */
 1637|  2.87k|        ossl_ecdh_simple_compute_key,
 1638|  2.87k|        ossl_ecdsa_simple_sign_setup,
 1639|  2.87k|        ossl_ecdsa_simple_sign_sig,
 1640|  2.87k|        ossl_ecdsa_simple_verify_sig,
 1641|  2.87k|        0, /* field_inverse_mod_ord */
 1642|  2.87k|        0, /* blind_coordinates */
 1643|  2.87k|        0, /* ladder_pre */
 1644|  2.87k|        0, /* ladder_step */
 1645|  2.87k|        0 /* ladder_post */
 1646|  2.87k|    };
 1647|       |
 1648|  2.87k|    return &ret;
 1649|  2.87k|}
ossl_ec_GFp_nistp521_group_init:
 1701|  5.75k|{
 1702|  5.75k|    int ret;
 1703|  5.75k|    ret = ossl_ec_GFp_simple_group_init(group);
 1704|  5.75k|    group->a_is_minus3 = 1;
 1705|  5.75k|    return ret;
 1706|  5.75k|}
ossl_ec_GFp_nistp521_group_set_curve:
 1711|  2.87k|{
 1712|  2.87k|    int ret = 0;
 1713|  2.87k|    BIGNUM *curve_p, *curve_a, *curve_b;
 1714|  2.87k|#ifndef FIPS_MODULE
 1715|  2.87k|    BN_CTX *new_ctx = NULL;
 1716|       |
 1717|  2.87k|    if (ctx == NULL)
  ------------------
  |  Branch (1717:9): [True: 0, False: 2.87k]
  ------------------
 1718|      0|        ctx = new_ctx = BN_CTX_new();
 1719|  2.87k|#endif
 1720|  2.87k|    if (ctx == NULL)
  ------------------
  |  Branch (1720:9): [True: 0, False: 2.87k]
  ------------------
 1721|      0|        return 0;
 1722|       |
 1723|  2.87k|    BN_CTX_start(ctx);
 1724|  2.87k|    curve_p = BN_CTX_get(ctx);
 1725|  2.87k|    curve_a = BN_CTX_get(ctx);
 1726|  2.87k|    curve_b = BN_CTX_get(ctx);
 1727|  2.87k|    if (curve_b == NULL)
  ------------------
  |  Branch (1727:9): [True: 0, False: 2.87k]
  ------------------
 1728|      0|        goto err;
 1729|  2.87k|    BN_bin2bn(nistp521_curve_params[0], sizeof(felem_bytearray), curve_p);
 1730|  2.87k|    BN_bin2bn(nistp521_curve_params[1], sizeof(felem_bytearray), curve_a);
 1731|  2.87k|    BN_bin2bn(nistp521_curve_params[2], sizeof(felem_bytearray), curve_b);
 1732|  2.87k|    if ((BN_cmp(curve_p, p)) || (BN_cmp(curve_a, a)) || (BN_cmp(curve_b, b))) {
  ------------------
  |  Branch (1732:9): [True: 0, False: 2.87k]
  |  Branch (1732:33): [True: 0, False: 2.87k]
  |  Branch (1732:57): [True: 0, False: 2.87k]
  ------------------
 1733|      0|        ERR_raise(ERR_LIB_EC, EC_R_WRONG_CURVE_PARAMETERS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1734|      0|        goto err;
 1735|      0|    }
 1736|  2.87k|    group->field_mod_func = BN_nist_mod_521;
 1737|  2.87k|    ret = ossl_ec_GFp_simple_group_set_curve(group, p, a, b, ctx);
 1738|  2.87k|err:
 1739|  2.87k|    BN_CTX_end(ctx);
 1740|  2.87k|#ifndef FIPS_MODULE
 1741|  2.87k|    BN_CTX_free(new_ctx);
 1742|  2.87k|#endif
 1743|  2.87k|    return ret;
 1744|  2.87k|}

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

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

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

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

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

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

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

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

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

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

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

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

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

ERR_set_mark:
   14|  5.25M|{
   15|  5.25M|    ERR_STATE *es;
   16|       |
   17|  5.25M|    es = ossl_err_get_state_int();
   18|  5.25M|    if (es == NULL)
  ------------------
  |  Branch (18:9): [True: 0, False: 5.25M]
  ------------------
   19|      0|        return 0;
   20|       |
   21|  5.25M|    if (es->bottom == es->top)
  ------------------
  |  Branch (21:9): [True: 2.74M, False: 2.51M]
  ------------------
   22|  2.74M|        return 0;
   23|  2.51M|    es->err_marks[es->top]++;
   24|  2.51M|    return 1;
   25|  5.25M|}
ERR_pop_to_mark:
   41|  3.50M|{
   42|  3.50M|    ERR_STATE *es;
   43|       |
   44|  3.50M|    es = ossl_err_get_state_int();
   45|  3.50M|    if (es == NULL)
  ------------------
  |  Branch (45:9): [True: 0, False: 3.50M]
  ------------------
   46|      0|        return 0;
   47|       |
   48|  5.24M|    while (es->bottom != es->top
  ------------------
  |  Branch (48:12): [True: 3.48M, False: 1.75M]
  ------------------
   49|  3.48M|        && es->err_marks[es->top] == 0) {
  ------------------
  |  Branch (49:12): [True: 1.73M, False: 1.75M]
  ------------------
   50|  1.73M|        err_clear(es, es->top, 0);
   51|  1.73M|        es->top = es->top > 0 ? es->top - 1 : ERR_NUM_ERRORS - 1;
  ------------------
  |  |   14|    168|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (51:19): [True: 1.73M, False: 168]
  ------------------
   52|  1.73M|    }
   53|       |
   54|  3.50M|    if (es->bottom == es->top)
  ------------------
  |  Branch (54:9): [True: 1.75M, False: 1.75M]
  ------------------
   55|  1.75M|        return 0;
   56|  1.75M|    es->err_marks[es->top]--;
   57|  1.75M|    return 1;
   58|  3.50M|}
ERR_count_to_mark:
   61|    528|{
   62|    528|    ERR_STATE *es;
   63|    528|    int count = 0, top;
   64|       |
   65|    528|    es = ossl_err_get_state_int();
   66|    528|    if (es == NULL)
  ------------------
  |  Branch (66:9): [True: 0, False: 528]
  ------------------
   67|      0|        return 0;
   68|       |
   69|    528|    top = es->top;
   70|    528|    while (es->bottom != top
  ------------------
  |  Branch (70:12): [True: 525, False: 3]
  ------------------
   71|    525|        && es->err_marks[top] == 0) {
  ------------------
  |  Branch (71:12): [True: 0, False: 525]
  ------------------
   72|      0|        ++count;
   73|      0|        top = top > 0 ? top - 1 : ERR_NUM_ERRORS - 1;
  ------------------
  |  |   14|      0|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (73:15): [True: 0, False: 0]
  ------------------
   74|      0|    }
   75|       |
   76|    528|    return count;
   77|    528|}
ERR_clear_last_mark:
   80|  1.74M|{
   81|  1.74M|    ERR_STATE *es;
   82|  1.74M|    int top;
   83|       |
   84|  1.74M|    es = ossl_err_get_state_int();
   85|  1.74M|    if (es == NULL)
  ------------------
  |  Branch (85:9): [True: 0, False: 1.74M]
  ------------------
   86|      0|        return 0;
   87|       |
   88|  1.74M|    top = es->top;
   89|  1.75M|    while (es->bottom != top
  ------------------
  |  Branch (89:12): [True: 760k, False: 990k]
  ------------------
   90|   760k|        && es->err_marks[top] == 0) {
  ------------------
  |  Branch (90:12): [True: 2.12k, False: 758k]
  ------------------
   91|  2.12k|        top = top > 0 ? top - 1 : ERR_NUM_ERRORS - 1;
  ------------------
  |  |   14|     16|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (91:15): [True: 2.10k, False: 16]
  ------------------
   92|  2.12k|    }
   93|       |
   94|  1.74M|    if (es->bottom == top)
  ------------------
  |  Branch (94:9): [True: 990k, False: 758k]
  ------------------
   95|   990k|        return 0;
   96|   758k|    es->err_marks[top]--;
   97|   758k|    return 1;
   98|  1.74M|}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

evp_generic_fetch:
  398|   561k|{
  399|   561k|    struct evp_method_data_st methdata;
  400|   561k|    void *method;
  401|       |
  402|   561k|    methdata.libctx = libctx;
  403|   561k|    methdata.tmp_store = NULL;
  404|       |    method = inner_evp_generic_fetch(&methdata, NULL, operation_id,
  405|   561k|        name, properties,
  406|   561k|        new_method, up_ref_method, free_method);
  407|   561k|    dealloc_tmp_evp_method_store(methdata.tmp_store);
  408|   561k|    return method;
  409|   561k|}
evp_generic_fetch_from_prov:
  424|  3.16k|{
  425|  3.16k|    struct evp_method_data_st methdata;
  426|  3.16k|    void *method;
  427|       |
  428|  3.16k|    methdata.libctx = ossl_provider_libctx(prov);
  429|       |    methdata.tmp_store = NULL;
  430|  3.16k|    method = inner_evp_generic_fetch(&methdata, prov, operation_id,
  431|  3.16k|        name, properties,
  432|  3.16k|        new_method, up_ref_method, free_method);
  433|  3.16k|    dealloc_tmp_evp_method_store(methdata.tmp_store);
  434|  3.16k|    return method;
  435|  3.16k|}
evp_method_store_cache_flush:
  438|    774|{
  439|    774|    OSSL_METHOD_STORE *store = get_evp_method_store(libctx);
  440|       |
  441|    774|    if (store != NULL)
  ------------------
  |  Branch (441:9): [True: 774, False: 0]
  ------------------
  442|    774|        return ossl_method_store_cache_flush_all(store);
  443|      0|    return 1;
  444|    774|}
evp_method_store_remove_all_provided:
  447|    774|{
  448|    774|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  449|    774|    OSSL_METHOD_STORE *store = get_evp_method_store(libctx);
  450|       |
  451|    774|    if (store != NULL)
  ------------------
  |  Branch (451:9): [True: 774, False: 0]
  ------------------
  452|    774|        return ossl_method_store_remove_all_provided(store, prov);
  453|      0|    return 1;
  454|    774|}
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|   923k|{
  661|       |    /*
  662|       |     * For a |prov| that is NULL, the library context will be NULL
  663|       |     */
  664|   923k|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  665|   923k|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  666|       |
  667|   923k|    if (prov == NULL)
  ------------------
  |  Branch (667:9): [True: 287k, False: 635k]
  ------------------
  668|   287k|        number = ossl_namemap_name2num(namemap, legacy_name);
  669|   923k|    return ossl_namemap_name2num(namemap, name) == number;
  670|   923k|}
evp_names_do_all:
  675|   478k|{
  676|   478k|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  677|   478k|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  678|       |
  679|   478k|    return ossl_namemap_doall_names(namemap, number, fn, data);
  680|   478k|}
evp_fetch.c:inner_evp_generic_fetch:
  259|   564k|{
  260|   564k|    OSSL_METHOD_STORE *store = get_evp_method_store(methdata->libctx);
  261|   564k|    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|   564k|    const char *const propq = properties != NULL ? properties : "";
  ------------------
  |  Branch (271:31): [True: 71.4k, False: 493k]
  ------------------
  272|   564k|#endif /* FIPS_MODULE */
  273|   564k|    uint32_t meth_id = 0;
  274|   564k|    void *method = NULL;
  275|   564k|    int unsupported, name_id;
  276|       |
  277|   564k|    if (store == NULL || namemap == NULL) {
  ------------------
  |  Branch (277:9): [True: 0, False: 564k]
  |  Branch (277:26): [True: 0, False: 564k]
  ------------------
  278|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  279|      0|        return NULL;
  280|      0|    }
  281|       |
  282|       |    /*
  283|       |     * If there's ever an operation_id == 0 passed, we have an internal
  284|       |     * programming error.
  285|       |     */
  286|   564k|    if (!ossl_assert(operation_id > 0)) {
  ------------------
  |  |   52|   564k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   564k|    __FILE__, __LINE__)
  ------------------
  |  Branch (286:9): [True: 0, False: 564k]
  ------------------
  287|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  288|      0|        return NULL;
  289|      0|    }
  290|       |
  291|       |    /* If we haven't received a name id yet, try to get one for the name */
  292|   564k|    name_id = ossl_namemap_name2num(namemap, name);
  293|       |
  294|       |    /*
  295|       |     * If we have a name id, calculate a method id with evp_method_id().
  296|       |     *
  297|       |     * evp_method_id returns 0 if we have too many operations (more than
  298|       |     * about 2^8) or too many names (more than about 2^24).  In that case,
  299|       |     * we can't create any new method.
  300|       |     * For all intents and purposes, this is an internal error.
  301|       |     */
  302|   564k|    if (name_id != 0 && (meth_id = evp_method_id(name_id, operation_id)) == 0) {
  ------------------
  |  Branch (302:9): [True: 536k, False: 28.0k]
  |  Branch (302:25): [True: 0, False: 536k]
  ------------------
  303|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  304|      0|        return NULL;
  305|      0|    }
  306|       |
  307|       |    /*
  308|       |     * If we haven't found the name yet, chances are that the algorithm to
  309|       |     * be fetched is unsupported.
  310|       |     */
  311|   564k|    unsupported = name_id == 0;
  312|       |
  313|   564k|    if (meth_id == 0
  ------------------
  |  Branch (313:9): [True: 28.0k, False: 536k]
  ------------------
  314|   536k|        || !ossl_method_store_cache_get(store, prov, meth_id, propq, &method)) {
  ------------------
  |  Branch (314:12): [True: 46.4k, False: 490k]
  ------------------
  315|  74.4k|        OSSL_METHOD_CONSTRUCT_METHOD mcm = {
  316|  74.4k|            get_tmp_evp_method_store,
  317|  74.4k|            reserve_evp_method_store,
  318|  74.4k|            unreserve_evp_method_store,
  319|  74.4k|            get_evp_method_from_store,
  320|  74.4k|            put_evp_method_in_store,
  321|  74.4k|            construct_evp_method,
  322|  74.4k|            destruct_evp_method
  323|  74.4k|        };
  324|       |
  325|  74.4k|        methdata->operation_id = operation_id;
  326|  74.4k|        methdata->name_id = name_id;
  327|  74.4k|        methdata->names = name;
  328|  74.4k|        methdata->propquery = propq;
  329|  74.4k|        methdata->method_from_algorithm = new_method;
  330|  74.4k|        methdata->refcnt_up_method = up_ref_method;
  331|  74.4k|        methdata->destruct_method = free_method;
  332|  74.4k|        methdata->flag_construct_error_occurred = 0;
  333|  74.4k|        if ((method = ossl_method_construct(methdata->libctx, operation_id,
  ------------------
  |  Branch (333:13): [True: 29.8k, False: 44.6k]
  ------------------
  334|  74.4k|                 &prov, 0 /* !force_cache */,
  335|  74.4k|                 &mcm, methdata))
  336|  74.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|  29.8k|            if (name_id == 0)
  ------------------
  |  Branch (349:17): [True: 1.05k, False: 28.8k]
  ------------------
  350|  1.05k|                name_id = ossl_namemap_name2num(namemap, name);
  351|  29.8k|            if (name_id == 0) {
  ------------------
  |  Branch (351:17): [True: 0, False: 29.8k]
  ------------------
  352|      0|                ERR_raise_data(ERR_LIB_EVP, ERR_R_FETCH_FAILED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                              ERR_raise_data(ERR_LIB_EVP, ERR_R_FETCH_FAILED,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                              ERR_raise_data(ERR_LIB_EVP, ERR_R_FETCH_FAILED,
  ------------------
  |  |  318|      0|#define ERR_R_FETCH_FAILED (269 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  353|      0|                    "Algorithm %s cannot be found", name != NULL ? name : "<null>");
  ------------------
  |  Branch (353:53): [True: 0, False: 0]
  ------------------
  354|      0|                free_method(method);
  355|      0|                method = NULL;
  356|  29.8k|            } else {
  357|  29.8k|                meth_id = evp_method_id(name_id, operation_id);
  358|  29.8k|                if (meth_id != 0)
  ------------------
  |  Branch (358:21): [True: 29.8k, False: 0]
  ------------------
  359|  29.8k|                    ossl_method_store_cache_set(store, prov, meth_id, propq,
  360|  29.8k|                        method, up_ref_method, free_method);
  361|  29.8k|            }
  362|  29.8k|        }
  363|       |
  364|       |        /*
  365|       |         * If we never were in the constructor, the algorithm to be fetched
  366|       |         * is unsupported.
  367|       |         */
  368|  74.4k|        unsupported = !methdata->flag_construct_error_occurred;
  369|  74.4k|    }
  370|       |
  371|   564k|    if ((name_id != 0 || name != NULL) && method == NULL) {
  ------------------
  |  Branch (371:10): [True: 537k, False: 26.9k]
  |  Branch (371:26): [True: 26.9k, False: 2]
  |  Branch (371:43): [True: 44.6k, False: 519k]
  ------------------
  372|  44.6k|        int code = unsupported ? ERR_R_UNSUPPORTED : ERR_R_FETCH_FAILED;
  ------------------
  |  |  317|  44.6k|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|  44.6k|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|  44.6k|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      int code = unsupported ? ERR_R_UNSUPPORTED : ERR_R_FETCH_FAILED;
  ------------------
  |  |  318|      0|#define ERR_R_FETCH_FAILED (269 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (372:20): [True: 44.6k, False: 0]
  ------------------
  373|       |
  374|  44.6k|        if (name == NULL)
  ------------------
  |  Branch (374:13): [True: 0, False: 44.6k]
  ------------------
  375|      0|            name = ossl_namemap_num2name(namemap, name_id, 0);
  376|  44.6k|        ERR_raise_data(ERR_LIB_EVP, code,
  ------------------
  |  |  359|  44.6k|    (ERR_new(),                                                  \
  |  |  360|  44.6k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|  44.6k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  44.6k|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, code,
  ------------------
  |  |   59|  44.6k|#define ERR_LIB_EVP 6
  ------------------
  377|  44.6k|            "%s, Algorithm (%s : %d), Properties (%s)",
  378|  44.6k|            ossl_lib_ctx_get_descriptor(methdata->libctx),
  379|  44.6k|            name == NULL ? "<null>" : name, name_id,
  ------------------
  |  Branch (379:13): [True: 0, False: 44.6k]
  ------------------
  380|  44.6k|            properties == NULL ? "<null>" : properties);
  ------------------
  |  Branch (380:13): [True: 29.3k, False: 15.2k]
  ------------------
  381|   520k|    } else {
  382|   520k|        OSSL_TRACE4(QUERY, "%s, Algorithm (%s : %d), Properties (%s)\n",
  ------------------
  |  |  297|   520k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4))
  |  |  ------------------
  |  |  |  |  283|   520k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  383|   520k|            ossl_lib_ctx_get_descriptor(methdata->libctx),
  384|   520k|            name == NULL ? "<null>" : name, name_id,
  385|   520k|            properties == NULL ? "<null>" : properties);
  386|   520k|    }
  387|       |
  388|   564k|    return method;
  389|   564k|}
evp_fetch.c:evp_method_id:
  117|   782k|{
  118|   782k|    if (!ossl_assert(name_id > 0 && name_id <= METHOD_ID_NAME_MAX)
  ------------------
  |  |   52|  1.56M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 782k, False: 0]
  |  |  |  Branch (52:41): [True: 782k, False: 0]
  |  |  ------------------
  |  |   53|  1.56M|    __FILE__, __LINE__)
  ------------------
  |  Branch (118:9): [True: 0, False: 782k]
  ------------------
  119|   782k|        || !ossl_assert(operation_id > 0
  ------------------
  |  |   52|  1.56M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 782k, False: 0]
  |  |  |  Branch (52:41): [True: 782k, False: 0]
  |  |  ------------------
  |  |   53|   782k|    __FILE__, __LINE__)
  ------------------
  |  Branch (119:12): [True: 0, False: 782k]
  ------------------
  120|   782k|            && operation_id <= METHOD_ID_OPERATION_MAX))
  121|      0|        return 0;
  122|   782k|    return (((name_id << METHOD_ID_NAME_OFFSET) & METHOD_ID_NAME_MASK)
  ------------------
  |  |  114|   782k|#define METHOD_ID_NAME_OFFSET 8
  ------------------
                  return (((name_id << METHOD_ID_NAME_OFFSET) & METHOD_ID_NAME_MASK)
  ------------------
  |  |  113|   782k|#define METHOD_ID_NAME_MASK 0x7FFFFF00
  ------------------
  123|   782k|        | (operation_id & METHOD_ID_OPERATION_MASK));
  ------------------
  |  |  111|   782k|#define METHOD_ID_OPERATION_MASK 0x000000FF
  ------------------
  124|   782k|}
evp_fetch.c:reserve_evp_method_store:
   73|   129k|{
   74|   129k|    struct evp_method_data_st *methdata = data;
   75|       |
   76|   129k|    if (store == NULL
  ------------------
  |  Branch (76:9): [True: 129k, False: 0]
  ------------------
   77|   129k|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (77:12): [True: 0, False: 129k]
  ------------------
   78|      0|        return 0;
   79|       |
   80|   129k|    return ossl_method_lock_store(store);
   81|   129k|}
evp_fetch.c:unreserve_evp_method_store:
   84|   129k|{
   85|   129k|    struct evp_method_data_st *methdata = data;
   86|       |
   87|   129k|    if (store == NULL
  ------------------
  |  Branch (87:9): [True: 129k, False: 0]
  ------------------
   88|   129k|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (88:12): [True: 0, False: 129k]
  ------------------
   89|      0|        return 0;
   90|       |
   91|   129k|    return ossl_method_unlock_store(store);
   92|   129k|}
evp_fetch.c:get_evp_method_from_store:
  128|  74.4k|{
  129|  74.4k|    struct evp_method_data_st *methdata = data;
  130|  74.4k|    void *method = NULL;
  131|  74.4k|    int name_id;
  132|  74.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|  74.4k|    if ((name_id = methdata->name_id) == 0 && methdata->names != NULL) {
  ------------------
  |  Branch (139:9): [True: 28.0k, False: 46.4k]
  |  Branch (139:47): [True: 28.0k, False: 2]
  ------------------
  140|  28.0k|        OSSL_NAMEMAP *namemap = ossl_namemap_stored(methdata->libctx);
  141|  28.0k|        const char *names = methdata->names;
  142|  28.0k|        const char *q = strchr(names, NAME_SEPARATOR);
  ------------------
  |  |   24|  28.0k|#define NAME_SEPARATOR ':'
  ------------------
  143|  28.0k|        size_t l = (q == NULL ? strlen(names) : (size_t)(q - names));
  ------------------
  |  Branch (143:21): [True: 28.0k, False: 0]
  ------------------
  144|       |
  145|  28.0k|        if (namemap == 0)
  ------------------
  |  Branch (145:13): [True: 0, False: 28.0k]
  ------------------
  146|      0|            return NULL;
  147|  28.0k|        name_id = ossl_namemap_name2num_n(namemap, names, l);
  148|  28.0k|    }
  149|       |
  150|  74.4k|    if (name_id == 0
  ------------------
  |  Branch (150:9): [True: 26.9k, False: 47.5k]
  ------------------
  151|  47.5k|        || (meth_id = evp_method_id(name_id, methdata->operation_id)) == 0)
  ------------------
  |  Branch (151:12): [True: 0, False: 47.5k]
  ------------------
  152|  26.9k|        return NULL;
  153|       |
  154|  47.5k|    if (store == NULL
  ------------------
  |  Branch (154:9): [True: 47.5k, False: 0]
  ------------------
  155|  47.5k|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (155:12): [True: 0, False: 47.5k]
  ------------------
  156|      0|        return NULL;
  157|       |
  158|  47.5k|    if (!ossl_method_store_fetch(store, meth_id, methdata->propquery, prov,
  ------------------
  |  Branch (158:9): [True: 17.7k, False: 29.8k]
  ------------------
  159|  47.5k|            &method))
  160|  17.7k|        return NULL;
  161|  29.8k|    return method;
  162|  47.5k|}
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: 52.5k, False: 116k]
  ------------------
  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);
  ------------------
  |  |  291|   168k|    OSSL_TRACEV(category, (trc_out, format, arg1))
  |  |  ------------------
  |  |  |  |  283|   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,
  ------------------
  |  |  299|   168k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5))
  |  |  ------------------
  |  |  |  |  283|   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|   564k|{
   62|   564k|    OSSL_TRACE1(QUERY, "Deallocating the tmp_store %p\n", store);
  ------------------
  |  |  291|   564k|    OSSL_TRACEV(category, (trc_out, format, arg1))
  |  |  ------------------
  |  |  |  |  283|   564k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   63|   564k|    if (store != NULL)
  ------------------
  |  Branch (63:9): [True: 0, False: 564k]
  ------------------
   64|      0|        ossl_method_store_free(store);
   65|   564k|}
evp_fetch.c:get_evp_method_store:
   68|  1.04M|{
   69|  1.04M|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX);
  ------------------
  |  |   95|  1.04M|#define OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX 0
  ------------------
   70|  1.04M|}
evp_fetch.c:filter_on_operation_id:
  623|    546|{
  624|    546|    struct filter_data_st *data = arg;
  625|       |
  626|    546|    if ((id & METHOD_ID_OPERATION_MASK) == data->operation_id)
  ------------------
  |  |  111|    546|#define METHOD_ID_OPERATION_MASK 0x000000FF
  ------------------
  |  Branch (626:9): [True: 84, False: 462]
  ------------------
  627|     84|        data->user_fn(method, data->user_arg);
  628|    546|}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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|    709|{
   22|    709|    INDICATOR_CB *cb;
   23|       |
   24|    709|    cb = OPENSSL_zalloc(sizeof(*cb));
  ------------------
  |  |  109|    709|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   25|    709|    return cb;
   26|    709|}
ossl_indicator_set_callback_free:
   29|    708|{
   30|    708|    OPENSSL_free(cb);
  ------------------
  |  |  132|    708|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   31|    708|}

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

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

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

CRYPTO_malloc:
  190|  98.4M|{
  191|  98.4M|    void *ptr;
  192|       |
  193|  98.4M|    INCREMENT(malloc_count);
  194|  98.4M|    if (malloc_impl != CRYPTO_malloc) {
  ------------------
  |  Branch (194:9): [True: 0, False: 98.4M]
  ------------------
  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|  98.4M|    if (ossl_unlikely(num == 0))
  ------------------
  |  |   23|  98.4M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 98.4M]
  |  |  ------------------
  ------------------
  202|      0|        return NULL;
  203|       |
  204|  98.4M|    FAILTEST();
  205|  98.4M|    if (allow_customize) {
  ------------------
  |  Branch (205:9): [True: 1, False: 98.4M]
  ------------------
  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|  98.4M|    ptr = malloc(num);
  215|  98.4M|    if (ossl_likely(ptr != NULL))
  ------------------
  |  |   22|  98.4M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 98.4M, False: 0]
  |  |  ------------------
  ------------------
  216|  98.4M|        return ptr;
  217|      0|err:
  218|      0|    ossl_report_alloc_err(file, line);
  219|       |    return NULL;
  220|  98.4M|}
CRYPTO_zalloc:
  223|  71.3M|{
  224|  71.3M|    void *ret;
  225|       |
  226|  71.3M|    ret = CRYPTO_malloc(num, file, line);
  227|  71.3M|    if (ret != NULL)
  ------------------
  |  Branch (227:9): [True: 71.3M, False: 0]
  ------------------
  228|  71.3M|        memset(ret, 0, num);
  229|       |
  230|  71.3M|    return ret;
  231|  71.3M|}
CRYPTO_aligned_alloc:
  235|  16.4k|{
  236|  16.4k|    *freeptr = NULL;
  237|       |
  238|       |    /* Ensure that alignment is a power of two no larger than 65536 */
  239|  16.4k|    if (alignment == 0 || (alignment & (alignment - 1)) != 0
  ------------------
  |  Branch (239:9): [True: 0, False: 16.4k]
  |  Branch (239:27): [True: 0, False: 16.4k]
  ------------------
  240|  16.4k|        || alignment > 65536) {
  ------------------
  |  Branch (240:12): [True: 0, False: 16.4k]
  ------------------
  241|      0|        ossl_report_alloc_err_inv(file, line);
  242|      0|        return NULL;
  243|      0|    }
  244|       |
  245|       |    /* Allow non-malloc() allocations as long as no malloc_impl is provided. */
  246|  16.4k|    if (malloc_impl == CRYPTO_malloc) {
  ------------------
  |  Branch (246:9): [True: 16.4k, False: 0]
  ------------------
  247|  16.4k|#if defined(_BSD_SOURCE) || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L)
  248|  16.4k|        void *ret;
  249|       |
  250|       |        /* posix_memalign() requires alignment to be at least sizeof(void *) */
  251|  16.4k|        if (alignment < sizeof(void *))
  ------------------
  |  Branch (251:13): [True: 0, False: 16.4k]
  ------------------
  252|      0|            alignment = sizeof(void *);
  253|       |
  254|  16.4k|        if (posix_memalign(&ret, alignment, num) == 0) {
  ------------------
  |  Branch (254:13): [True: 16.4k, False: 0]
  ------------------
  255|  16.4k|            *freeptr = ret;
  256|  16.4k|            return ret;
  257|  16.4k|        }
  258|  16.4k|#endif
  259|  16.4k|    }
  260|       |
  261|      0|    return ossl_malloc_align(num, alignment, freeptr, file, line);
  262|  16.4k|}
CRYPTO_realloc:
  265|  7.42M|{
  266|  7.42M|    void *ret;
  267|       |
  268|  7.42M|    INCREMENT(realloc_count);
  269|  7.42M|    if (realloc_impl != CRYPTO_realloc) {
  ------------------
  |  Branch (269:9): [True: 0, False: 7.42M]
  ------------------
  270|      0|        ret = realloc_impl(str, num, file, line);
  271|       |
  272|      0|        if (num == 0 || ret != NULL)
  ------------------
  |  Branch (272:13): [True: 0, False: 0]
  |  Branch (272:25): [True: 0, False: 0]
  ------------------
  273|      0|            return ret;
  274|       |
  275|      0|        goto err;
  276|      0|    }
  277|       |
  278|  7.42M|    if (str == NULL)
  ------------------
  |  Branch (278:9): [True: 6.80M, False: 622k]
  ------------------
  279|  6.80M|        return CRYPTO_malloc(num, file, line);
  280|       |
  281|   622k|    if (num == 0) {
  ------------------
  |  Branch (281:9): [True: 0, False: 622k]
  ------------------
  282|      0|        CRYPTO_free(str, file, line);
  283|      0|        return NULL;
  284|      0|    }
  285|       |
  286|   622k|    FAILTEST();
  287|   622k|    ret = realloc(str, num);
  288|       |
  289|   622k|err:
  290|   622k|    if (num != 0 && ret == NULL)
  ------------------
  |  Branch (290:9): [True: 622k, False: 0]
  |  Branch (290:21): [True: 0, False: 622k]
  ------------------
  291|      0|        ossl_report_alloc_err(file, line);
  292|       |
  293|   622k|    return ret;
  294|   622k|}
CRYPTO_clear_realloc:
  298|  4.11M|{
  299|  4.11M|    void *ret = NULL;
  300|       |
  301|  4.11M|    if (str == NULL)
  ------------------
  |  Branch (301:9): [True: 1.04M, False: 3.07M]
  ------------------
  302|  1.04M|        return CRYPTO_malloc(num, file, line);
  303|       |
  304|  3.07M|    if (num == 0) {
  ------------------
  |  Branch (304:9): [True: 0, False: 3.07M]
  ------------------
  305|      0|        CRYPTO_clear_free(str, old_len, file, line);
  306|      0|        return NULL;
  307|      0|    }
  308|       |
  309|       |    /* Can't shrink the buffer since memcpy below copies |old_len| bytes. */
  310|  3.07M|    if (num < old_len) {
  ------------------
  |  Branch (310:9): [True: 0, False: 3.07M]
  ------------------
  311|      0|        OPENSSL_cleanse((char *)str + num, old_len - num);
  312|      0|        return str;
  313|      0|    }
  314|       |
  315|  3.07M|    ret = CRYPTO_malloc(num, file, line);
  316|  3.07M|    if (ret != NULL) {
  ------------------
  |  Branch (316:9): [True: 3.07M, False: 0]
  ------------------
  317|  3.07M|        memcpy(ret, str, old_len);
  318|  3.07M|        CRYPTO_clear_free(str, old_len, file, line);
  319|  3.07M|    }
  320|  3.07M|    return ret;
  321|  3.07M|}
CRYPTO_free:
  324|   128M|{
  325|   128M|    INCREMENT(free_count);
  326|   128M|    if (free_impl != CRYPTO_free) {
  ------------------
  |  Branch (326:9): [True: 0, False: 128M]
  ------------------
  327|      0|        free_impl(str, file, line);
  328|      0|        return;
  329|      0|    }
  330|       |
  331|   128M|    free(str);
  332|   128M|}
CRYPTO_clear_free:
  335|  10.2M|{
  336|  10.2M|    if (str == NULL)
  ------------------
  |  Branch (336:9): [True: 716k, False: 9.50M]
  ------------------
  337|   716k|        return;
  338|  9.50M|    if (num)
  ------------------
  |  Branch (338:9): [True: 9.50M, False: 0]
  ------------------
  339|  9.50M|        OPENSSL_cleanse(str, num);
  340|  9.50M|    CRYPTO_free(str, file, line);
  341|  9.50M|}

CRYPTO_secure_malloc:
  154|  3.55k|{
  155|  3.55k|#ifndef OPENSSL_NO_SECURE_MEMORY
  156|  3.55k|    void *ret = NULL;
  157|  3.55k|    size_t actual_size;
  158|  3.55k|    int reason = CRYPTO_R_SECURE_MALLOC_FAILURE;
  ------------------
  |  |   45|  3.55k|#define CRYPTO_R_SECURE_MALLOC_FAILURE 111
  ------------------
  159|       |
  160|  3.55k|    if (!secure_mem_initialized) {
  ------------------
  |  Branch (160:9): [True: 3.55k, False: 0]
  ------------------
  161|  3.55k|        return CRYPTO_malloc(num, file, line);
  162|  3.55k|    }
  163|      0|    if (!CRYPTO_THREAD_write_lock(sec_malloc_lock)) {
  ------------------
  |  Branch (163:9): [True: 0, False: 0]
  ------------------
  164|      0|        reason = ERR_R_CRYPTO_LIB;
  ------------------
  |  |  281|      0|#define ERR_R_CRYPTO_LIB (ERR_LIB_CRYPTO /* 15 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  |  |  ------------------
  |  |               #define ERR_R_CRYPTO_LIB (ERR_LIB_CRYPTO /* 15 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  165|      0|        goto err;
  166|      0|    }
  167|      0|    ret = sh_malloc(num);
  168|      0|    actual_size = ret ? sh_actual_size(ret) : 0;
  ------------------
  |  Branch (168:19): [True: 0, False: 0]
  ------------------
  169|      0|    secure_mem_used += actual_size;
  170|      0|    CRYPTO_THREAD_unlock(sec_malloc_lock);
  171|      0|err:
  172|      0|    if (ret == NULL && (file != NULL || line != 0)) {
  ------------------
  |  Branch (172:9): [True: 0, False: 0]
  |  Branch (172:25): [True: 0, False: 0]
  |  Branch (172:41): [True: 0, False: 0]
  ------------------
  173|      0|        ERR_new();
  174|      0|        ERR_set_debug(file, line, NULL);
  175|      0|        ERR_set_error(ERR_LIB_CRYPTO, reason, NULL);
  ------------------
  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  ------------------
  176|      0|    }
  177|      0|    return ret;
  178|       |#else
  179|       |    return CRYPTO_malloc(num, file, line);
  180|       |#endif /* OPENSSL_NO_SECURE_MEMORY */
  181|      0|}
CRYPTO_secure_zalloc:
  184|  12.7k|{
  185|  12.7k|#ifndef OPENSSL_NO_SECURE_MEMORY
  186|  12.7k|    if (secure_mem_initialized)
  ------------------
  |  Branch (186:9): [True: 0, False: 12.7k]
  ------------------
  187|       |        /* CRYPTO_secure_malloc() zeroes allocations when it is implemented */
  188|      0|        return CRYPTO_secure_malloc(num, file, line);
  189|  12.7k|#endif
  190|  12.7k|    return CRYPTO_zalloc(num, file, line);
  191|  12.7k|}
CRYPTO_secure_clear_free:
  218|  22.8k|{
  219|  22.8k|#ifndef OPENSSL_NO_SECURE_MEMORY
  220|  22.8k|    size_t actual_size;
  221|       |
  222|  22.8k|    if (ptr == NULL)
  ------------------
  |  Branch (222:9): [True: 6.58k, False: 16.3k]
  ------------------
  223|  6.58k|        return;
  224|  16.3k|    if (!CRYPTO_secure_allocated(ptr)) {
  ------------------
  |  Branch (224:9): [True: 16.3k, False: 0]
  ------------------
  225|  16.3k|        OPENSSL_cleanse(ptr, num);
  226|  16.3k|        CRYPTO_free(ptr, file, line);
  227|  16.3k|        return;
  228|  16.3k|    }
  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|  19.4k|{
  246|  19.4k|#ifndef OPENSSL_NO_SECURE_MEMORY
  247|  19.4k|    if (!secure_mem_initialized)
  ------------------
  |  Branch (247:9): [True: 19.4k, False: 0]
  ------------------
  248|  19.4k|        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|  19.4k|}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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.22k|{
  347|  1.22k|    OSSL_PROPERTY_DEFINITION *prop = NULL;
  348|  1.22k|    OSSL_PROPERTY_LIST *res = NULL;
  349|  1.22k|    STACK_OF(OSSL_PROPERTY_DEFINITION) *sk;
  ------------------
  |  |   33|  1.22k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  350|  1.22k|    const char *s = defn;
  351|  1.22k|    int done;
  352|       |
  353|  1.22k|    if (s == NULL || (sk = sk_OSSL_PROPERTY_DEFINITION_new(&pd_compare)) == NULL)
  ------------------
  |  Branch (353:9): [True: 0, False: 1.22k]
  |  Branch (353:22): [True: 0, False: 1.22k]
  ------------------
  354|      0|        return NULL;
  355|       |
  356|  1.22k|    s = skip_space(s);
  357|  1.22k|    done = *s == '\0';
  358|  2.71k|    while (!done) {
  ------------------
  |  Branch (358:12): [True: 1.48k, False: 1.22k]
  ------------------
  359|  1.48k|        const char *start = s;
  360|       |
  361|  1.48k|        prop = OPENSSL_malloc(sizeof(*prop));
  ------------------
  |  |  107|  1.48k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  362|  1.48k|        if (prop == NULL)
  ------------------
  |  Branch (362:13): [True: 0, False: 1.48k]
  ------------------
  363|      0|            goto err;
  364|  1.48k|        memset(&prop->v, 0, sizeof(prop->v));
  365|  1.48k|        prop->optional = 0;
  366|  1.48k|        if (!parse_name(ctx, &s, 1, &prop->name_idx))
  ------------------
  |  Branch (366:13): [True: 0, False: 1.48k]
  ------------------
  367|      0|            goto err;
  368|  1.48k|        prop->oper = OSSL_PROPERTY_OPER_EQ;
  369|  1.48k|        if (prop->name_idx == 0) {
  ------------------
  |  Branch (369:13): [True: 0, False: 1.48k]
  ------------------
  370|      0|            ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   99|      0|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|      0|#define PROP_R_PARSE_FAILED 108
  ------------------
  371|      0|                "Unknown name HERE-->%s", start);
  372|      0|            goto err;
  373|      0|        }
  374|  1.48k|        if (match_ch(&s, '=')) {
  ------------------
  |  Branch (374:13): [True: 1.48k, False: 0]
  ------------------
  375|  1.48k|            if (!parse_value(ctx, &s, prop, 1)) {
  ------------------
  |  Branch (375:17): [True: 0, False: 1.48k]
  ------------------
  376|      0|                ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_VALUE,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                              ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_VALUE,
  ------------------
  |  |   99|      0|#define ERR_LIB_PROP 55
  ------------------
                              ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_VALUE,
  ------------------
  |  |   34|      0|#define PROP_R_NO_VALUE 107
  ------------------
  377|      0|                    "HERE-->%s", start);
  378|      0|                goto err;
  379|      0|            }
  380|  1.48k|        } 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.48k|        if (!sk_OSSL_PROPERTY_DEFINITION_push(sk, prop))
  ------------------
  |  Branch (386:13): [True: 0, False: 1.48k]
  ------------------
  387|      0|            goto err;
  388|  1.48k|        prop = NULL;
  389|  1.48k|        done = !match_ch(&s, ',');
  390|  1.48k|    }
  391|  1.22k|    if (*s != '\0') {
  ------------------
  |  Branch (391:9): [True: 0, False: 1.22k]
  ------------------
  392|      0|        ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |   99|      0|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |   37|      0|#define PROP_R_TRAILING_CHARACTERS 110
  ------------------
  393|      0|            "HERE-->%s", s);
  394|      0|        goto err;
  395|      0|    }
  396|  1.22k|    res = stack_to_property_list(ctx, sk);
  397|       |
  398|  1.22k|err:
  399|  1.22k|    OPENSSL_free(prop);
  ------------------
  |  |  132|  1.22k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  400|  1.22k|    sk_OSSL_PROPERTY_DEFINITION_pop_free(sk, &pd_free);
  401|  1.22k|    return res;
  402|  1.22k|}
ossl_parse_query:
  406|  35.3k|{
  407|  35.3k|    STACK_OF(OSSL_PROPERTY_DEFINITION) *sk;
  ------------------
  |  |   33|  35.3k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  408|  35.3k|    OSSL_PROPERTY_LIST *res = NULL;
  409|  35.3k|    OSSL_PROPERTY_DEFINITION *prop = NULL;
  410|  35.3k|    int done;
  411|       |
  412|  35.3k|    if (s == NULL || (sk = sk_OSSL_PROPERTY_DEFINITION_new(&pd_compare)) == NULL)
  ------------------
  |  Branch (412:9): [True: 0, False: 35.3k]
  |  Branch (412:22): [True: 0, False: 35.3k]
  ------------------
  413|      0|        return NULL;
  414|       |
  415|  35.3k|    s = skip_space(s);
  416|  35.3k|    done = *s == '\0';
  417|   144k|    while (!done) {
  ------------------
  |  Branch (417:12): [True: 114k, False: 30.5k]
  ------------------
  418|   114k|        prop = OPENSSL_malloc(sizeof(*prop));
  ------------------
  |  |  107|   114k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  419|   114k|        if (prop == NULL)
  ------------------
  |  Branch (419:13): [True: 0, False: 114k]
  ------------------
  420|      0|            goto err;
  421|   114k|        memset(&prop->v, 0, sizeof(prop->v));
  422|       |
  423|   114k|        if (match_ch(&s, '-')) {
  ------------------
  |  Branch (423:13): [True: 1.94k, False: 112k]
  ------------------
  424|  1.94k|            prop->oper = OSSL_PROPERTY_OVERRIDE;
  425|  1.94k|            prop->optional = 0;
  426|  1.94k|            if (!parse_name(ctx, &s, 1, &prop->name_idx))
  ------------------
  |  Branch (426:17): [True: 423, False: 1.51k]
  ------------------
  427|    423|                goto err;
  428|  1.51k|            goto skip_value;
  429|  1.94k|        }
  430|   112k|        prop->optional = match_ch(&s, '?');
  431|   112k|        if (!parse_name(ctx, &s, 1, &prop->name_idx))
  ------------------
  |  Branch (431:13): [True: 4.41k, False: 107k]
  ------------------
  432|  4.41k|            goto err;
  433|       |
  434|   107k|        if (match_ch(&s, '=')) {
  ------------------
  |  Branch (434:13): [True: 26.1k, False: 81.5k]
  ------------------
  435|  26.1k|            prop->oper = OSSL_PROPERTY_OPER_EQ;
  436|  81.5k|        } else if (MATCH(&s, "!=")) {
  ------------------
  |  |   43|  81.5k|#define MATCH(s, m) match(s, m, sizeof(m) - 1)
  |  |  ------------------
  |  |  |  Branch (43:21): [True: 1.22k, False: 80.3k]
  |  |  ------------------
  ------------------
  437|  1.22k|            prop->oper = OSSL_PROPERTY_OPER_NE;
  438|  80.3k|        } else {
  439|       |            /* A name alone is a Boolean comparison for true */
  440|  80.3k|            prop->oper = OSSL_PROPERTY_OPER_EQ;
  441|  80.3k|            prop->type = OSSL_PROPERTY_TYPE_STRING;
  442|  80.3k|            prop->v.str_val = OSSL_PROPERTY_TRUE;
  ------------------
  |  |   39|  80.3k|#define OSSL_PROPERTY_TRUE 1
  ------------------
  443|  80.3k|            goto skip_value;
  444|  80.3k|        }
  445|  27.4k|        if (!parse_value(ctx, &s, prop, create_values))
  ------------------
  |  Branch (445:13): [True: 21.2k, False: 6.12k]
  ------------------
  446|  21.2k|            prop->type = OSSL_PROPERTY_TYPE_VALUE_UNDEFINED;
  447|       |
  448|   109k|    skip_value:
  449|   109k|        if (!sk_OSSL_PROPERTY_DEFINITION_push(sk, prop))
  ------------------
  |  Branch (449:13): [True: 0, False: 109k]
  ------------------
  450|      0|            goto err;
  451|   109k|        prop = NULL;
  452|   109k|        done = !match_ch(&s, ',');
  453|   109k|    }
  454|  30.5k|    if (*s != '\0') {
  ------------------
  |  Branch (454:9): [True: 15.8k, False: 14.6k]
  ------------------
  455|  15.8k|        ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |  359|  15.8k|    (ERR_new(),                                                  \
  |  |  360|  15.8k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|  15.8k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  15.8k|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |   99|  15.8k|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |   37|  15.8k|#define PROP_R_TRAILING_CHARACTERS 110
  ------------------
  456|  15.8k|            "HERE-->%s", s);
  457|  15.8k|        goto err;
  458|  15.8k|    }
  459|  14.6k|    res = stack_to_property_list(ctx, sk);
  460|       |
  461|  35.3k|err:
  462|  35.3k|    OPENSSL_free(prop);
  ------------------
  |  |  132|  35.3k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  463|  35.3k|    sk_OSSL_PROPERTY_DEFINITION_pop_free(sk, &pd_free);
  464|  35.3k|    return res;
  465|  14.6k|}
ossl_property_match_count:
  473|  12.2k|{
  474|  12.2k|    const OSSL_PROPERTY_DEFINITION *const q = query->properties;
  475|  12.2k|    const OSSL_PROPERTY_DEFINITION *const d = defn->properties;
  476|  12.2k|    int i = 0, j = 0, matches = 0;
  477|  12.2k|    OSSL_PROPERTY_OPER oper;
  478|       |
  479|  15.9k|    while (i < query->num_properties) {
  ------------------
  |  Branch (479:12): [True: 9.20k, False: 6.74k]
  ------------------
  480|  9.20k|        if ((oper = q[i].oper) == OSSL_PROPERTY_OVERRIDE) {
  ------------------
  |  Branch (480:13): [True: 296, False: 8.90k]
  ------------------
  481|    296|            i++;
  482|    296|            continue;
  483|    296|        }
  484|  8.90k|        if (j < defn->num_properties) {
  ------------------
  |  Branch (484:13): [True: 6.86k, False: 2.04k]
  ------------------
  485|  6.86k|            if (q[i].name_idx > d[j].name_idx) { /* skip defn, not in query */
  ------------------
  |  Branch (485:17): [True: 1.18k, False: 5.67k]
  ------------------
  486|  1.18k|                j++;
  487|  1.18k|                continue;
  488|  1.18k|            }
  489|  5.67k|            if (q[i].name_idx == d[j].name_idx) { /* both in defn and query */
  ------------------
  |  Branch (489:17): [True: 61, False: 5.61k]
  ------------------
  490|     61|                const int eq = q[i].type == d[j].type
  ------------------
  |  Branch (490:32): [True: 61, False: 0]
  ------------------
  491|     61|                    && memcmp(&q[i].v, &d[j].v, sizeof(q[i].v)) == 0;
  ------------------
  |  Branch (491:24): [True: 0, False: 61]
  ------------------
  492|       |
  493|     61|                if ((eq && oper == OSSL_PROPERTY_OPER_EQ)
  ------------------
  |  Branch (493:22): [True: 0, False: 61]
  |  Branch (493:28): [True: 0, False: 0]
  ------------------
  494|     61|                    || (!eq && oper == OSSL_PROPERTY_OPER_NE))
  ------------------
  |  Branch (494:25): [True: 61, False: 0]
  |  Branch (494:32): [True: 0, False: 61]
  ------------------
  495|      0|                    matches++;
  496|     61|                else if (!q[i].optional)
  ------------------
  |  Branch (496:26): [True: 61, False: 0]
  ------------------
  497|     61|                    return -1;
  498|      0|                i++;
  499|      0|                j++;
  500|      0|                continue;
  501|     61|            }
  502|  5.67k|        }
  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|  7.66k|        if (q[i].type == OSSL_PROPERTY_TYPE_VALUE_UNDEFINED) {
  ------------------
  |  Branch (509:13): [True: 2.12k, False: 5.53k]
  ------------------
  510|  2.12k|            if (oper == OSSL_PROPERTY_OPER_NE)
  ------------------
  |  Branch (510:17): [True: 606, False: 1.52k]
  ------------------
  511|    606|                matches++;
  512|  1.52k|            else if (!q[i].optional)
  ------------------
  |  Branch (512:22): [True: 1.09k, False: 423]
  ------------------
  513|  1.09k|                return -1;
  514|  5.53k|        } else if (q[i].type != OSSL_PROPERTY_TYPE_STRING
  ------------------
  |  Branch (514:20): [True: 2.01k, False: 3.52k]
  ------------------
  515|  3.52k|            || (oper == OSSL_PROPERTY_OPER_EQ
  ------------------
  |  Branch (515:17): [True: 3.37k, False: 155]
  ------------------
  516|  3.37k|                && q[i].v.str_val != OSSL_PROPERTY_FALSE)
  ------------------
  |  |   40|  3.37k|#define OSSL_PROPERTY_FALSE 2
  ------------------
  |  Branch (516:20): [True: 3.32k, False: 47]
  ------------------
  517|    202|            || (oper == OSSL_PROPERTY_OPER_NE
  ------------------
  |  Branch (517:17): [True: 155, False: 47]
  ------------------
  518|  5.39k|                && q[i].v.str_val == OSSL_PROPERTY_FALSE)) {
  ------------------
  |  |   40|    155|#define OSSL_PROPERTY_FALSE 2
  ------------------
  |  Branch (518:20): [True: 61, False: 94]
  ------------------
  519|  5.39k|            if (!q[i].optional)
  ------------------
  |  Branch (519:17): [True: 4.33k, False: 1.06k]
  ------------------
  520|  4.33k|                return -1;
  521|  5.39k|        } else {
  522|    141|            matches++;
  523|    141|        }
  524|  2.23k|        i++;
  525|  2.23k|    }
  526|  6.74k|    return matches;
  527|  12.2k|}
ossl_property_free:
  530|  37.1k|{
  531|  37.1k|    OPENSSL_free(p);
  ------------------
  |  |  132|  37.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  532|  37.1k|}
ossl_property_parse_init:
  575|    709|{
  576|    709|    static const char *const predefined_names[] = {
  577|    709|        "provider", /* Name of provider (default, legacy, fips) */
  578|    709|        "version", /* Version number of this provider */
  579|    709|        "fips", /* FIPS validated or FIPS supporting algorithm */
  580|    709|        "output", /* Output type for encoders */
  581|    709|        "input", /* Input type for decoders */
  582|    709|        "structure", /* Structure name for encoders and decoders */
  583|    709|    };
  584|    709|    size_t i;
  585|       |
  586|  4.96k|    for (i = 0; i < OSSL_NELEM(predefined_names); i++)
  ------------------
  |  |   14|  4.96k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (586:17): [True: 4.25k, False: 709]
  ------------------
  587|  4.25k|        if (ossl_property_name(ctx, predefined_names[i], 1) == 0)
  ------------------
  |  Branch (587:13): [True: 0, False: 4.25k]
  ------------------
  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|    709|    if ((ossl_property_value(ctx, "yes", 1) != OSSL_PROPERTY_TRUE)
  ------------------
  |  |   39|    709|#define OSSL_PROPERTY_TRUE 1
  ------------------
  |  Branch (595:9): [True: 0, False: 709]
  ------------------
  596|    709|        || (ossl_property_value(ctx, "no", 1) != OSSL_PROPERTY_FALSE))
  ------------------
  |  |   40|    709|#define OSSL_PROPERTY_FALSE 2
  ------------------
  |  Branch (596:12): [True: 0, False: 709]
  ------------------
  597|      0|        goto err;
  598|       |
  599|    709|    return 1;
  600|      0|err:
  601|      0|    return 0;
  602|    709|}
property_parse.c:pd_compare:
  289|   114k|{
  290|   114k|    const OSSL_PROPERTY_DEFINITION *pd1 = *p1;
  291|   114k|    const OSSL_PROPERTY_DEFINITION *pd2 = *p2;
  292|       |
  293|   114k|    if (pd1->name_idx < pd2->name_idx)
  ------------------
  |  Branch (293:9): [True: 34.9k, False: 79.8k]
  ------------------
  294|  34.9k|        return -1;
  295|  79.8k|    if (pd1->name_idx > pd2->name_idx)
  ------------------
  |  Branch (295:9): [True: 24.9k, False: 54.9k]
  ------------------
  296|  24.9k|        return 1;
  297|  54.9k|    return 0;
  298|  79.8k|}
property_parse.c:skip_space:
   26|   283k|{
   27|   366k|    while (ossl_isspace(*s))
  ------------------
  |  |   82|   366k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|   366k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  |  |  |  Branch (82:25): [True: 83.2k, False: 283k]
  |  |  ------------------
  ------------------
   28|  83.2k|        s++;
   29|   283k|    return s;
   30|   283k|}
property_parse.c:parse_name:
   58|   115k|{
   59|   115k|    char name[100];
   60|   115k|    int err = 0;
   61|   115k|    size_t i = 0;
   62|   115k|    const char *s = *t;
   63|   115k|    int user_name = 0;
   64|       |
   65|   149k|    for (;;) {
   66|   149k|        if (!ossl_isalpha(*s)) {
  ------------------
  |  |   71|   149k|#define ossl_isalpha(c) (ossl_ctype_check((c), CTYPE_MASK_alpha))
  |  |  ------------------
  |  |  |  |   40|   149k|#define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|   149k|#define CTYPE_MASK_lower 0x1
  |  |  |  |  ------------------
  |  |  |  |               #define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|   149k|#define CTYPE_MASK_upper 0x2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (66:13): [True: 4.37k, False: 145k]
  ------------------
   67|  4.37k|            ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_IDENTIFIER,
  ------------------
  |  |  359|  4.37k|    (ERR_new(),                                                  \
  |  |  360|  4.37k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|  4.37k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  4.37k|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_IDENTIFIER,
  ------------------
  |  |   99|  4.37k|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_IDENTIFIER,
  ------------------
  |  |   30|  4.37k|#define PROP_R_NOT_AN_IDENTIFIER 103
  ------------------
   68|  4.37k|                "HERE-->%s", *t);
   69|  4.37k|            return 0;
   70|  4.37k|        }
   71|   480k|        do {
   72|   480k|            if (i < sizeof(name) - 1)
  ------------------
  |  Branch (72:17): [True: 453k, False: 27.1k]
  ------------------
   73|   453k|                name[i++] = ossl_tolower(*s);
   74|  27.1k|            else
   75|  27.1k|                err = 1;
   76|   480k|        } while (*++s == '_' || ossl_isalnum(*s));
  ------------------
  |  |   70|   458k|#define ossl_isalnum(c) (ossl_ctype_check((c), CTYPE_MASK_alnum))
  |  |  ------------------
  |  |  |  |   41|   458k|#define CTYPE_MASK_alnum (CTYPE_MASK_alpha | CTYPE_MASK_digit)
  |  |  |  |  ------------------
  |  |  |  |  |  |   40|   458k|#define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   27|   458k|#define CTYPE_MASK_lower 0x1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   28|   458k|#define CTYPE_MASK_upper 0x2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define CTYPE_MASK_alnum (CTYPE_MASK_alpha | CTYPE_MASK_digit)
  |  |  |  |  ------------------
  |  |  |  |  |  |   29|   458k|#define CTYPE_MASK_digit 0x4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (70:25): [True: 313k, False: 145k]
  |  |  ------------------
  ------------------
  |  Branch (76:18): [True: 21.8k, False: 458k]
  ------------------
   77|   145k|        if (*s != '.')
  ------------------
  |  Branch (77:13): [True: 111k, False: 34.1k]
  ------------------
   78|   111k|            break;
   79|  34.1k|        user_name = 1;
   80|  34.1k|        if (i < sizeof(name) - 1)
  ------------------
  |  Branch (80:13): [True: 33.6k, False: 517]
  ------------------
   81|  33.6k|            name[i++] = *s;
   82|    517|        else
   83|    517|            err = 1;
   84|  34.1k|        s++;
   85|  34.1k|    }
   86|   111k|    name[i] = '\0';
   87|   111k|    if (err) {
  ------------------
  |  Branch (87:9): [True: 470, False: 110k]
  ------------------
   88|    470|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NAME_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  359|    470|    (ERR_new(),                                                  \
  |  |  360|    470|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|    470|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|    470|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NAME_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   99|    470|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NAME_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   27|    470|#define PROP_R_NAME_TOO_LONG 100
  ------------------
   89|    470|        return 0;
   90|    470|    }
   91|   110k|    *t = skip_space(s);
   92|   110k|    *idx = ossl_property_name(ctx, name, user_name && create);
  ------------------
  |  Branch (92:42): [True: 26.8k, False: 83.8k]
  |  Branch (92:55): [True: 26.8k, False: 0]
  ------------------
   93|   110k|    return 1;
   94|   111k|}
property_parse.c:match_ch:
   33|   446k|{
   34|   446k|    const char *s = *t;
   35|       |
   36|   446k|    if (*s == m) {
  ------------------
  |  Branch (36:9): [True: 119k, False: 326k]
  ------------------
   37|   119k|        *t = skip_space(s + 1);
   38|   119k|        return 1;
   39|   119k|    }
   40|   326k|    return 0;
   41|   446k|}
property_parse.c:parse_value:
  258|  28.8k|{
  259|  28.8k|    const char *s = *t;
  260|  28.8k|    int r = 0;
  261|       |
  262|  28.8k|    if (*s == '"' || *s == '\'') {
  ------------------
  |  Branch (262:9): [True: 714, False: 28.1k]
  |  Branch (262:22): [True: 940, False: 27.2k]
  ------------------
  263|  1.65k|        s++;
  264|  1.65k|        r = parse_string(ctx, &s, s[-1], res, create);
  265|  27.2k|    } else if (*s == '+') {
  ------------------
  |  Branch (265:16): [True: 108, False: 27.1k]
  ------------------
  266|    108|        s++;
  267|    108|        r = parse_number(&s, res);
  268|  27.1k|    } else if (*s == '-') {
  ------------------
  |  Branch (268:16): [True: 1.34k, False: 25.7k]
  ------------------
  269|  1.34k|        s++;
  270|  1.34k|        r = parse_number(&s, res);
  271|  1.34k|        res->v.int_val = -res->v.int_val;
  272|  25.7k|    } else if (*s == '0' && s[1] == 'x') {
  ------------------
  |  Branch (272:16): [True: 10.8k, False: 14.9k]
  |  Branch (272:29): [True: 4.13k, False: 6.68k]
  ------------------
  273|  4.13k|        s += 2;
  274|  4.13k|        r = parse_hex(&s, res);
  275|  21.6k|    } else if (*s == '0' && ossl_isdigit(s[1])) {
  ------------------
  |  Branch (275:16): [True: 6.68k, False: 14.9k]
  |  Branch (275:29): [True: 5.26k, False: 1.42k]
  ------------------
  276|  5.26k|        s++;
  277|  5.26k|        r = parse_oct(&s, res);
  278|  16.3k|    } else if (ossl_isdigit(*s)) {
  ------------------
  |  Branch (278:16): [True: 4.13k, False: 12.2k]
  ------------------
  279|  4.13k|        return parse_number(t, res);
  280|  12.2k|    } else if (ossl_isalpha(*s))
  ------------------
  |  |   71|  12.2k|#define ossl_isalpha(c) (ossl_ctype_check((c), CTYPE_MASK_alpha))
  |  |  ------------------
  |  |  |  |   40|  12.2k|#define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  12.2k|#define CTYPE_MASK_lower 0x1
  |  |  |  |  ------------------
  |  |  |  |               #define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|  12.2k|#define CTYPE_MASK_upper 0x2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (71:25): [True: 9.73k, False: 2.52k]
  |  |  ------------------
  ------------------
  281|  9.73k|        return parse_unquoted(ctx, t, res, create);
  282|  15.0k|    if (r)
  ------------------
  |  Branch (282:9): [True: 3.19k, False: 11.8k]
  ------------------
  283|  3.19k|        *t = s;
  284|  15.0k|    return r;
  285|  28.8k|}
property_parse.c:parse_string:
  195|  1.65k|{
  196|  1.65k|    char v[1000];
  197|  1.65k|    const char *s = *t;
  198|  1.65k|    size_t i = 0;
  199|  1.65k|    int err = 0;
  200|       |
  201|   666k|    while (*s != '\0' && *s != delim) {
  ------------------
  |  Branch (201:12): [True: 665k, False: 987]
  |  Branch (201:26): [True: 664k, False: 667]
  ------------------
  202|   664k|        if (i < sizeof(v) - 1)
  ------------------
  |  Branch (202:13): [True: 588k, False: 75.8k]
  ------------------
  203|   588k|            v[i++] = *s;
  204|  75.8k|        else
  205|  75.8k|            err = 1;
  206|   664k|        s++;
  207|   664k|    }
  208|  1.65k|    if (*s == '\0') {
  ------------------
  |  Branch (208:9): [True: 987, False: 667]
  ------------------
  209|    987|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_MATCHING_STRING_DELIMITER,
  ------------------
  |  |  359|    987|    (ERR_new(),                                                  \
  |  |  360|    987|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|    987|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|    987|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_MATCHING_STRING_DELIMITER,
  ------------------
  |  |   99|    987|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_MATCHING_STRING_DELIMITER,
  ------------------
  |  |   33|    987|#define PROP_R_NO_MATCHING_STRING_DELIMITER 106
  ------------------
  210|    987|            "HERE-->%c%s", delim, *t);
  211|    987|        return 0;
  212|    987|    }
  213|    667|    v[i] = '\0';
  214|    667|    if (err) {
  ------------------
  |  Branch (214:9): [True: 141, False: 526]
  ------------------
  215|    141|        ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  359|    141|    (ERR_new(),                                                  \
  |  |  360|    141|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|    141|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|    141|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   99|    141|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   36|    141|#define PROP_R_STRING_TOO_LONG 109
  ------------------
  216|    526|    } else {
  217|    526|        res->v.str_val = ossl_property_value(ctx, v, create);
  218|    526|    }
  219|    667|    *t = skip_space(s + 1);
  220|    667|    res->type = OSSL_PROPERTY_TYPE_STRING;
  221|    667|    return !err;
  222|  1.65k|}
property_parse.c:parse_number:
   97|  5.58k|{
   98|  5.58k|    const char *s = *t;
   99|  5.58k|    int64_t v = 0;
  100|       |
  101|  47.2k|    do {
  102|  47.2k|        if (!ossl_isdigit(*s)) {
  ------------------
  |  Branch (102:13): [True: 94, False: 47.1k]
  ------------------
  103|     94|            ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |  359|     94|    (ERR_new(),                                                  \
  |  |  360|     94|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|     94|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|     94|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |   99|     94|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |   32|     94|#define PROP_R_NOT_A_DECIMAL_DIGIT 105
  ------------------
  104|     94|                "HERE-->%s", *t);
  105|     94|            return 0;
  106|     94|        }
  107|       |        /* overflow check */
  108|  47.1k|        if (v > ((INT64_MAX - (*s - '0')) / 10)) {
  ------------------
  |  Branch (108:13): [True: 1.88k, False: 45.2k]
  ------------------
  109|  1.88k|            ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  359|  1.88k|    (ERR_new(),                                                  \
  |  |  360|  1.88k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|  1.88k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  1.88k|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   99|  1.88k|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|  1.88k|#define PROP_R_PARSE_FAILED 108
  ------------------
  110|  1.88k|                "Property %s overflows", *t);
  111|  1.88k|            return 0;
  112|  1.88k|        }
  113|  45.2k|        v = v * 10 + (*s++ - '0');
  114|  45.2k|    } while (ossl_isdigit(*s));
  ------------------
  |  Branch (114:14): [True: 41.6k, False: 3.61k]
  ------------------
  115|  3.61k|    if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
  ------------------
  |  |   82|  7.22k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  3.61k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (115:9): [True: 2.96k, False: 648]
  |  Branch (115:30): [True: 2.49k, False: 474]
  |  Branch (115:44): [True: 564, False: 1.92k]
  ------------------
  116|    564|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |  359|    564|    (ERR_new(),                                                  \
  |  |  360|    564|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|    564|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|    564|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |   99|    564|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |   32|    564|#define PROP_R_NOT_A_DECIMAL_DIGIT 105
  ------------------
  117|    564|            "HERE-->%s", *t);
  118|    564|        return 0;
  119|    564|    }
  120|  3.04k|    *t = skip_space(s);
  121|  3.04k|    res->type = OSSL_PROPERTY_TYPE_NUMBER;
  122|  3.04k|    res->v.int_val = v;
  123|  3.04k|    return 1;
  124|  3.61k|}
property_parse.c:parse_hex:
  127|  4.13k|{
  128|  4.13k|    const char *s = *t;
  129|  4.13k|    int64_t v = 0;
  130|  4.13k|    int sval;
  131|       |
  132|  55.1k|    do {
  133|  55.1k|        if (ossl_isdigit(*s)) {
  ------------------
  |  Branch (133:13): [True: 46.9k, False: 8.22k]
  ------------------
  134|  46.9k|            sval = *s - '0';
  135|  46.9k|        } else if (ossl_isxdigit(*s)) {
  ------------------
  |  |   83|  8.22k|#define ossl_isxdigit(c) (ossl_ctype_check((c), CTYPE_MASK_xdigit))
  |  |  ------------------
  |  |  |  |   31|  8.22k|#define CTYPE_MASK_xdigit 0x10
  |  |  ------------------
  |  |  |  Branch (83:26): [True: 8.17k, False: 47]
  |  |  ------------------
  ------------------
  136|  8.17k|            sval = ossl_tolower(*s) - 'a' + 10;
  137|  8.17k|        } else {
  138|     47|            ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |  359|     47|    (ERR_new(),                                                  \
  |  |  360|     47|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|     47|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|     47|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |   99|     47|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |   29|     47|#define PROP_R_NOT_AN_HEXADECIMAL_DIGIT 102
  ------------------
  139|     47|                "%s", *t);
  140|     47|            return 0;
  141|     47|        }
  142|       |
  143|  55.1k|        if (v > ((INT64_MAX - sval) / 16)) {
  ------------------
  |  Branch (143:13): [True: 2.96k, False: 52.1k]
  ------------------
  144|  2.96k|            ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  359|  2.96k|    (ERR_new(),                                                  \
  |  |  360|  2.96k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|  2.96k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  2.96k|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   99|  2.96k|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|  2.96k|#define PROP_R_PARSE_FAILED 108
  ------------------
  145|  2.96k|                "Property %s overflows", *t);
  146|  2.96k|            return 0;
  147|  2.96k|        }
  148|       |
  149|  52.1k|        v <<= 4;
  150|  52.1k|        v += sval;
  151|  52.1k|    } while (ossl_isxdigit(*++s));
  ------------------
  |  |   83|  52.1k|#define ossl_isxdigit(c) (ossl_ctype_check((c), CTYPE_MASK_xdigit))
  |  |  ------------------
  |  |  |  |   31|  52.1k|#define CTYPE_MASK_xdigit 0x10
  |  |  ------------------
  |  |  |  Branch (83:26): [True: 51.0k, False: 1.12k]
  |  |  ------------------
  ------------------
  152|  1.12k|    if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
  ------------------
  |  |   82|  2.25k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  1.12k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (152:9): [True: 925, False: 202]
  |  Branch (152:30): [True: 376, False: 549]
  |  Branch (152:44): [True: 235, False: 141]
  ------------------
  153|    235|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |  359|    235|    (ERR_new(),                                                  \
  |  |  360|    235|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|    235|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|    235|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |   99|    235|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |   29|    235|#define PROP_R_NOT_AN_HEXADECIMAL_DIGIT 102
  ------------------
  154|    235|            "HERE-->%s", *t);
  155|    235|        return 0;
  156|    235|    }
  157|    892|    *t = skip_space(s);
  158|    892|    res->type = OSSL_PROPERTY_TYPE_NUMBER;
  159|    892|    res->v.int_val = v;
  160|    892|    return 1;
  161|  1.12k|}
property_parse.c:parse_oct:
  164|  5.26k|{
  165|  5.26k|    const char *s = *t;
  166|  5.26k|    int64_t v = 0;
  167|       |
  168|  79.5k|    do {
  169|  79.5k|        if (*s == '9' || *s == '8' || !ossl_isdigit(*s)) {
  ------------------
  |  Branch (169:13): [True: 47, False: 79.5k]
  |  Branch (169:26): [True: 94, False: 79.4k]
  |  Branch (169:39): [True: 0, False: 79.4k]
  ------------------
  170|    141|            ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |  359|    141|    (ERR_new(),                                                  \
  |  |  360|    141|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|    141|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|    141|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |   99|    141|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |   31|    141|#define PROP_R_NOT_AN_OCTAL_DIGIT 104
  ------------------
  171|    141|                "HERE-->%s", *t);
  172|    141|            return 0;
  173|    141|        }
  174|  79.4k|        if (v > ((INT64_MAX - (*s - '0')) / 8)) {
  ------------------
  |  Branch (174:13): [True: 2.63k, False: 76.7k]
  ------------------
  175|  2.63k|            ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  359|  2.63k|    (ERR_new(),                                                  \
  |  |  360|  2.63k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|  2.63k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  2.63k|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   99|  2.63k|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|  2.63k|#define PROP_R_PARSE_FAILED 108
  ------------------
  176|  2.63k|                "Property %s overflows", *t);
  177|  2.63k|            return 0;
  178|  2.63k|        }
  179|       |
  180|  76.7k|        v = (v << 3) + (*s - '0');
  181|  76.7k|    } while (ossl_isdigit(*++s) && *s != '9' && *s != '8');
  ------------------
  |  Branch (181:14): [True: 74.5k, False: 2.25k]
  |  Branch (181:36): [True: 74.4k, False: 94]
  |  Branch (181:49): [True: 74.2k, False: 141]
  ------------------
  182|  2.49k|    if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
  ------------------
  |  |   82|  4.98k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  2.49k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (182:9): [True: 2.13k, False: 357]
  |  Branch (182:30): [True: 1.64k, False: 488]
  |  Branch (182:44): [True: 940, False: 705]
  ------------------
  183|    940|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |  359|    940|    (ERR_new(),                                                  \
  |  |  360|    940|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|    940|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|    940|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |   99|    940|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |   31|    940|#define PROP_R_NOT_AN_OCTAL_DIGIT 104
  ------------------
  184|    940|            "HERE-->%s", *t);
  185|    940|        return 0;
  186|    940|    }
  187|  1.55k|    *t = skip_space(s);
  188|  1.55k|    res->type = OSSL_PROPERTY_TYPE_NUMBER;
  189|  1.55k|    res->v.int_val = v;
  190|  1.55k|    return 1;
  191|  2.49k|}
property_parse.c:parse_unquoted:
  226|  9.73k|{
  227|  9.73k|    char v[1000];
  228|  9.73k|    const char *s = *t;
  229|  9.73k|    size_t i = 0;
  230|  9.73k|    int err = 0;
  231|       |
  232|  9.73k|    if (*s == '\0' || *s == ',')
  ------------------
  |  Branch (232:9): [True: 0, False: 9.73k]
  |  Branch (232:23): [True: 0, False: 9.73k]
  ------------------
  233|      0|        return 0;
  234|   810k|    while (ossl_isprint(*s) && !ossl_isspace(*s) && *s != ',') {
  ------------------
  |  |   80|  1.62M|#define ossl_isprint(c) (ossl_ctype_check((c), CTYPE_MASK_print))
  |  |  ------------------
  |  |  |  |   35|   810k|#define CTYPE_MASK_print 0x100
  |  |  ------------------
  |  |  |  Branch (80:25): [True: 807k, False: 3.33k]
  |  |  ------------------
  ------------------
                  while (ossl_isprint(*s) && !ossl_isspace(*s) && *s != ',') {
  ------------------
  |  |   82|  1.61M|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|   807k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (234:32): [True: 806k, False: 338]
  |  Branch (234:53): [True: 800k, False: 6.05k]
  ------------------
  235|   800k|        if (i < sizeof(v) - 1)
  ------------------
  |  Branch (235:13): [True: 753k, False: 47.4k]
  ------------------
  236|   753k|            v[i++] = ossl_tolower(*s);
  237|  47.4k|        else
  238|  47.4k|            err = 1;
  239|   800k|        s++;
  240|   800k|    }
  241|  9.73k|    if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
  ------------------
  |  |   82|  19.4k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  9.73k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (241:9): [True: 9.06k, False: 667]
  |  Branch (241:30): [True: 6.80k, False: 2.25k]
  |  Branch (241:44): [True: 752, False: 6.05k]
  ------------------
  242|    752|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_ASCII_CHARACTER,
  ------------------
  |  |  359|    752|    (ERR_new(),                                                  \
  |  |  360|    752|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|    752|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|    752|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_ASCII_CHARACTER,
  ------------------
  |  |   99|    752|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_ASCII_CHARACTER,
  ------------------
  |  |   28|    752|#define PROP_R_NOT_AN_ASCII_CHARACTER 101
  ------------------
  243|    752|            "HERE-->%s", s);
  244|    752|        return 0;
  245|    752|    }
  246|  8.97k|    v[i] = 0;
  247|  8.97k|    if (err)
  ------------------
  |  Branch (247:9): [True: 216, False: 8.76k]
  ------------------
  248|    216|        ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  359|    216|    (ERR_new(),                                                  \
  |  |  360|    216|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|    216|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|    216|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   99|    216|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   36|    216|#define PROP_R_STRING_TOO_LONG 109
  ------------------
  249|  8.76k|    else if ((res->v.str_val = ossl_property_value(ctx, v, create)) == 0)
  ------------------
  |  Branch (249:14): [True: 7.16k, False: 1.59k]
  ------------------
  250|  7.16k|        err = 1;
  251|  8.97k|    *t = skip_space(s);
  252|  8.97k|    res->type = OSSL_PROPERTY_TYPE_STRING;
  253|  8.97k|    return !err;
  254|  9.73k|}
property_parse.c:stack_to_property_list:
  314|  15.9k|{
  315|  15.9k|    const int n = sk_OSSL_PROPERTY_DEFINITION_num(sk);
  316|  15.9k|    OSSL_PROPERTY_LIST *r;
  317|  15.9k|    OSSL_PROPERTY_IDX prev_name_idx = 0;
  318|  15.9k|    int i;
  319|       |
  320|  15.9k|    r = OPENSSL_malloc(sizeof(*r)
  ------------------
  |  |  107|  31.8k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (107:19): [True: 5.61k, False: 10.2k]
  |  |  ------------------
  ------------------
  321|  15.9k|        + (n <= 0 ? 0 : n - 1) * sizeof(r->properties[0]));
  322|  15.9k|    if (r != NULL) {
  ------------------
  |  Branch (322:9): [True: 15.9k, False: 0]
  ------------------
  323|  15.9k|        sk_OSSL_PROPERTY_DEFINITION_sort(sk);
  324|       |
  325|  15.9k|        r->has_optional = 0;
  326|  37.1k|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (326:21): [True: 23.6k, False: 13.4k]
  ------------------
  327|  23.6k|            r->properties[i] = *sk_OSSL_PROPERTY_DEFINITION_value(sk, i);
  328|  23.6k|            r->has_optional |= r->properties[i].optional;
  329|       |
  330|       |            /* Check for duplicated names */
  331|  23.6k|            if (i > 0 && r->properties[i].name_idx == prev_name_idx) {
  ------------------
  |  Branch (331:17): [True: 13.3k, False: 10.2k]
  |  Branch (331:26): [True: 2.44k, False: 10.9k]
  ------------------
  332|  2.44k|                OPENSSL_free(r);
  ------------------
  |  |  132|  2.44k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  333|  2.44k|                ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  359|  2.44k|    (ERR_new(),                                                  \
  |  |  360|  2.44k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|  2.44k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  2.44k|        ERR_set_error)
  ------------------
                              ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   99|  2.44k|#define ERR_LIB_PROP 55
  ------------------
                              ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|  2.44k|#define PROP_R_PARSE_FAILED 108
  ------------------
  334|  2.44k|                    "Duplicated name `%s'",
  335|  2.44k|                    ossl_property_name_str(ctx, prev_name_idx));
  336|  2.44k|                return NULL;
  337|  2.44k|            }
  338|  21.2k|            prev_name_idx = r->properties[i].name_idx;
  339|  21.2k|        }
  340|  13.4k|        r->num_properties = n;
  341|  13.4k|    }
  342|  13.4k|    return r;
  343|  15.9k|}
property_parse.c:pd_free:
  301|   110k|{
  302|   110k|    OPENSSL_free(pd);
  ------------------
  |  |  132|   110k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  303|   110k|}
property_parse.c:match:
   46|  81.5k|{
   47|  81.5k|    const char *s = *t;
   48|       |
   49|  81.5k|    if (OPENSSL_strncasecmp(s, m, m_len) == 0) {
  ------------------
  |  Branch (49:9): [True: 1.22k, False: 80.3k]
  ------------------
   50|  1.22k|        *t = skip_space(s + m_len);
   51|  1.22k|        return 1;
   52|  1.22k|    }
   53|  80.3k|    return 0;
   54|  81.5k|}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

ossl_sa_new:
   59|   247k|{
   60|   247k|    OPENSSL_SA *res = OPENSSL_zalloc(sizeof(*res));
  ------------------
  |  |  109|   247k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   61|       |
   62|   247k|    return res;
   63|   247k|}
ossl_sa_free:
  111|   247k|{
  112|   247k|    if (sa != NULL) {
  ------------------
  |  Branch (112:9): [True: 247k, False: 0]
  ------------------
  113|   247k|        sa_doall(sa, &sa_free_node, NULL, NULL);
  114|   247k|        OPENSSL_free(sa);
  ------------------
  |  |  132|   247k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  115|   247k|    }
  116|   247k|}
ossl_sa_doall:
  135|  12.3k|{
  136|  12.3k|    struct trampoline_st tramp;
  137|       |
  138|  12.3k|    tramp.func = leaf;
  139|  12.3k|    if (sa != NULL)
  ------------------
  |  Branch (139:9): [True: 12.3k, False: 0]
  ------------------
  140|  12.3k|        sa_doall(sa, NULL, &trampoline, &tramp);
  141|  12.3k|}
ossl_sa_doall_arg:
  146|   259k|{
  147|   259k|    if (sa != NULL)
  ------------------
  |  Branch (147:9): [True: 259k, False: 0]
  ------------------
  148|   259k|        sa_doall(sa, NULL, leaf, arg);
  149|   259k|}
ossl_sa_num:
  152|     24|{
  153|     24|    return sa == NULL ? 0 : sa->nelem;
  ------------------
  |  Branch (153:12): [True: 0, False: 24]
  ------------------
  154|     24|}
ossl_sa_get:
  157|  17.7M|{
  158|  17.7M|    int level;
  159|  17.7M|    void **p, *r = NULL;
  160|       |
  161|  17.7M|    if (sa == NULL || sa->nelem == 0)
  ------------------
  |  Branch (161:9): [True: 0, False: 17.7M]
  |  Branch (161:23): [True: 7.42k, False: 17.7M]
  ------------------
  162|  7.42k|        return NULL;
  163|       |
  164|  17.7M|    if (n <= sa->top) {
  ------------------
  |  Branch (164:9): [True: 17.5M, False: 180k]
  ------------------
  165|  17.5M|        p = sa->nodes;
  166|  20.1M|        for (level = sa->levels - 1; p != NULL && level > 0; level--)
  ------------------
  |  Branch (166:38): [True: 19.9M, False: 174k]
  |  Branch (166:51): [True: 2.52M, False: 17.4M]
  ------------------
  167|  2.52M|            p = (void **)p[(n >> (OPENSSL_SA_BLOCK_BITS * level))
  ------------------
  |  |   34|  2.52M|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
  168|  2.52M|                & SA_BLOCK_MASK];
  ------------------
  |  |   46|  2.52M|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|  2.52M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  2.52M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  169|  17.5M|        r = p == NULL ? NULL : p[n & SA_BLOCK_MASK];
  ------------------
  |  |   46|  17.4M|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|  17.4M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  17.4M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (169:13): [True: 174k, False: 17.4M]
  ------------------
  170|  17.5M|    }
  171|  17.7M|    return r;
  172|  17.7M|}
ossl_sa_set:
  180|   338k|{
  181|   338k|    int i, level = 1;
  182|   338k|    ossl_uintmax_t n = posn;
  183|   338k|    void **p;
  184|       |
  185|   338k|    if (sa == NULL)
  ------------------
  |  Branch (185:9): [True: 0, False: 338k]
  ------------------
  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: 338k, False: 1.02M]
  ------------------
  190|   338k|            break;
  191|       |
  192|   348k|    for (; sa->levels < level; sa->levels++) {
  ------------------
  |  Branch (192:12): [True: 10.4k, False: 338k]
  ------------------
  193|  10.4k|        p = alloc_node();
  194|  10.4k|        if (p == NULL)
  ------------------
  |  Branch (194:13): [True: 0, False: 10.4k]
  ------------------
  195|      0|            return 0;
  196|  10.4k|        p[0] = sa->nodes;
  197|  10.4k|        sa->nodes = p;
  198|  10.4k|    }
  199|   338k|    if (sa->top < posn)
  ------------------
  |  Branch (199:9): [True: 92.8k, False: 245k]
  ------------------
  200|  92.8k|        sa->top = posn;
  201|       |
  202|   338k|    p = sa->nodes;
  203|  1.39M|    for (level = sa->levels - 1; level > 0; level--) {
  ------------------
  |  Branch (203:34): [True: 1.05M, False: 338k]
  ------------------
  204|  1.05M|        i = (posn >> (OPENSSL_SA_BLOCK_BITS * level)) & SA_BLOCK_MASK;
  ------------------
  |  |   34|  1.05M|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
                      i = (posn >> (OPENSSL_SA_BLOCK_BITS * level)) & SA_BLOCK_MASK;
  ------------------
  |  |   46|  1.05M|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|  1.05M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.05M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|  1.05M|        if (p[i] == NULL && (p[i] = alloc_node()) == NULL)
  ------------------
  |  Branch (205:13): [True: 356k, False: 696k]
  |  Branch (205:29): [True: 0, False: 356k]
  ------------------
  206|      0|            return 0;
  207|  1.05M|        p = p[i];
  208|  1.05M|    }
  209|   338k|    p += posn & SA_BLOCK_MASK;
  ------------------
  |  |   46|   338k|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|   338k|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   338k|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  210|   338k|    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|   338k|    *p = val;
  215|   338k|    return 1;
  216|   338k|}
sparse_array.c:sa_doall:
   67|   518k|{
   68|   518k|    int i[SA_BLOCK_MAX_LEVELS];
   69|   518k|    void *nodes[SA_BLOCK_MAX_LEVELS];
   70|   518k|    ossl_uintmax_t idx = 0;
   71|   518k|    int l = 0;
   72|       |
   73|   518k|    i[0] = 0;
   74|   518k|    nodes[0] = sa->nodes;
   75|  29.3M|    while (l >= 0) {
  ------------------
  |  Branch (75:12): [True: 28.8M, False: 518k]
  ------------------
   76|  28.8M|        const int n = i[l];
   77|  28.8M|        void **const p = nodes[l];
   78|       |
   79|  28.8M|        if (n >= SA_BLOCK_MAX) {
  ------------------
  |  |   45|  28.8M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  ------------------
  |  |  |  |   34|  28.8M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  ------------------
  ------------------
  |  Branch (79:13): [True: 1.69M, False: 27.1M]
  ------------------
   80|  1.69M|            if (p != NULL && node != NULL)
  ------------------
  |  Branch (80:17): [True: 1.18M, False: 510k]
  |  Branch (80:30): [True: 365k, False: 819k]
  ------------------
   81|   365k|                (*node)(p);
   82|  1.69M|            l--;
   83|  1.69M|            idx >>= OPENSSL_SA_BLOCK_BITS;
  ------------------
  |  |   34|  1.69M|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
   84|  27.1M|        } else {
   85|  27.1M|            i[l] = n + 1;
   86|  27.1M|            if (p != NULL && p[n] != NULL) {
  ------------------
  |  Branch (86:17): [True: 18.9M, False: 8.17M]
  |  Branch (86:30): [True: 1.55M, False: 17.4M]
  ------------------
   87|  1.55M|                idx = (idx & ~SA_BLOCK_MASK) | n;
  ------------------
  |  |   46|  1.55M|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|  1.55M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.55M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   88|  1.55M|                if (l < sa->levels - 1) {
  ------------------
  |  Branch (88:21): [True: 1.17M, False: 376k]
  ------------------
   89|  1.17M|                    i[++l] = 0;
   90|  1.17M|                    nodes[l] = p[n];
   91|  1.17M|                    idx <<= OPENSSL_SA_BLOCK_BITS;
  ------------------
  |  |   34|  1.17M|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
   92|  1.17M|                } else if (leaf != NULL) {
  ------------------
  |  Branch (92:28): [True: 376k, False: 0]
  ------------------
   93|   376k|                    (*leaf)(idx, p[n], arg);
   94|   376k|                }
   95|  1.55M|            }
   96|  27.1M|        }
   97|  28.8M|    }
   98|   518k|}
sparse_array.c:sa_free_node:
  101|   365k|{
  102|   365k|    OPENSSL_free(p);
  ------------------
  |  |  132|   365k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  103|   365k|}
sparse_array.c:alloc_node:
  175|   366k|{
  176|   366k|    return OPENSSL_calloc(SA_BLOCK_MAX, sizeof(void *));
  ------------------
  |  |  113|   366k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  177|   366k|}

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

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

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

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

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

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

CRYPTO_THREAD_get_local_ex:
  259|  16.8M|{
  260|  16.8M|    MASTER_KEY_ENTRY *mkey;
  261|  16.8M|    CTX_TABLE_ENTRY ctxd;
  262|       |
  263|  16.8M|    ctx = (ctx == CRYPTO_THREAD_NO_CONTEXT) ? NULL : ossl_lib_ctx_get_concrete(ctx);
  ------------------
  |  |   42|  16.8M|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  |  Branch (263:11): [True: 16.8M, False: 23.0k]
  ------------------
  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|  16.8M|    if (!CRYPTO_THREAD_run_once(&master_once, init_master_key))
  ------------------
  |  Branch (276:9): [True: 0, False: 16.8M]
  ------------------
  277|      0|        return NULL;
  278|       |
  279|  16.8M|    if (!ossl_assert(id < CRYPTO_THREAD_LOCAL_KEY_MAX))
  ------------------
  |  |   52|  16.8M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  16.8M|    __FILE__, __LINE__)
  ------------------
  |  Branch (279:9): [True: 0, False: 16.8M]
  ------------------
  280|      0|        return NULL;
  281|       |
  282|       |    /*
  283|       |     * Get our master table sparse array, indexed by key id
  284|       |     */
  285|  16.8M|    mkey = CRYPTO_THREAD_get_local(&master_key);
  286|  16.8M|    if (mkey == NULL)
  ------------------
  |  Branch (286:9): [True: 1, False: 16.8M]
  ------------------
  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|  16.8M|    if (mkey[id].ctx_table == NULL)
  ------------------
  |  Branch (293:9): [True: 3, False: 16.8M]
  ------------------
  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|  16.8M|    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|  16.8M|    return ctxd;
  310|  16.8M|}
CRYPTO_THREAD_set_local_ex:
  338|  2.11k|{
  339|  2.11k|    MASTER_KEY_ENTRY *mkey;
  340|       |
  341|  2.11k|    ctx = (ctx == CRYPTO_THREAD_NO_CONTEXT) ? NULL : ossl_lib_ctx_get_concrete(ctx);
  ------------------
  |  |   42|  2.11k|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  |  Branch (341:11): [True: 4, False: 2.11k]
  ------------------
  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.11k|    if (!CRYPTO_THREAD_run_once(&master_once, init_master_key))
  ------------------
  |  Branch (346:9): [True: 0, False: 2.11k]
  ------------------
  347|      0|        return 0;
  348|       |
  349|  2.11k|    if (!ossl_assert(id < CRYPTO_THREAD_LOCAL_KEY_MAX))
  ------------------
  |  |   52|  2.11k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  2.11k|    __FILE__, __LINE__)
  ------------------
  |  Branch (349:9): [True: 0, False: 2.11k]
  ------------------
  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.11k|    mkey = CRYPTO_THREAD_get_local(&master_key);
  357|  2.11k|    if (mkey == NULL) {
  ------------------
  |  Branch (357:9): [True: 1, False: 2.11k]
  ------------------
  358|       |        /*
  359|       |         * we didn't find one, but that's ok, just initialize it now
  360|       |         */
  361|      1|        mkey = OPENSSL_calloc(CRYPTO_THREAD_LOCAL_KEY_MAX,
  ------------------
  |  |  113|      1|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  362|      1|            sizeof(MASTER_KEY_ENTRY));
  363|      1|        if (mkey == NULL)
  ------------------
  |  Branch (363:13): [True: 0, False: 1]
  ------------------
  364|      0|            return 0;
  365|       |        /*
  366|       |         * make sure to assign it to our master key thread-local storage
  367|       |         */
  368|      1|        if (!CRYPTO_THREAD_set_local(&master_key, mkey)) {
  ------------------
  |  Branch (368:13): [True: 0, False: 1]
  ------------------
  369|      0|            OPENSSL_free(mkey);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  370|      0|            return 0;
  371|      0|        }
  372|      1|    }
  373|       |
  374|       |    /*
  375|       |     * Find the entry that we are looking for using our id index
  376|       |     */
  377|  2.11k|    if (mkey[id].ctx_table == NULL) {
  ------------------
  |  Branch (377:9): [True: 3, False: 2.11k]
  ------------------
  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.11k|    return ossl_sa_CTX_TABLE_ENTRY_set(mkey[id].ctx_table,
  395|  2.11k|        (uintptr_t)ctx, data);
  396|  2.11k|}
threads_common.c:init_master_key:
  216|      1|{
  217|       |    /*
  218|       |     * Note: We assign a cleanup function here, which is atypical for
  219|       |     * uses of CRYPTO_THREAD_init_local.  This is because, nominally
  220|       |     * we expect that the use of ossl_init_thread_start will be used
  221|       |     * to notify openssl of exiting threads.  However, in this case
  222|       |     * we want the metadata for this interface (the sparse arrays) to
  223|       |     * stay valid until the thread actually exits, which is what the
  224|       |     * clean_master_key function does.  Data held in the sparse arrays
  225|       |     * (that is assigned via CRYPTO_THREAD_set_local_ex), are still expected
  226|       |     * to be cleaned via the ossl_init_thread_start/stop api.
  227|       |     */
  228|      1|    if (!CRYPTO_THREAD_init_local(&master_key, clean_master_key))
  ------------------
  |  Branch (228:9): [True: 0, False: 1]
  ------------------
  229|      0|        return;
  230|       |
  231|       |    /*
  232|       |     * Indicate that the key has been set up.
  233|       |     */
  234|      1|    master_key_init = 1;
  235|      1|}

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

ossl_time_now:
   16|  3.44k|{
   17|  3.44k|    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.44k|    struct timeval t;
   37|       |
   38|  3.44k|    if (gettimeofday(&t, NULL) < 0) {
  ------------------
  |  Branch (38:9): [True: 0, False: 3.44k]
  ------------------
   39|      0|        ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   55|      0|#define ERR_LIB_SYS 2
  ------------------
                      ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   30|      0|#define get_last_sys_error() errno
  ------------------
   40|      0|            "calling gettimeofday()");
   41|      0|        return ossl_time_zero();
   42|      0|    }
   43|  3.44k|    if (t.tv_sec <= 0)
  ------------------
  |  Branch (43:9): [True: 0, False: 3.44k]
  ------------------
   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.44k|    else
   46|  3.44k|        r.t = ((uint64_t)t.tv_sec * 1000000 + t.tv_usec) * OSSL_TIME_US;
  ------------------
  |  |   37|  3.44k|#define OSSL_TIME_US (OSSL_TIME_MS / 1000)
  |  |  ------------------
  |  |  |  |   34|  3.44k|#define OSSL_TIME_MS (OSSL_TIME_SECOND / 1000)
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  3.44k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   47|  3.44k|#endif /* defined(_WIN32) */
   48|  3.44k|    return r;
   49|  3.44k|}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

threads_common.c:ossl_sa_CTX_TABLE_ENTRY_get:
   60|  16.8M|    {                                                                                                              \
   61|  16.8M|        return (type *)ossl_sa_get((OPENSSL_SA *)sa, n);                                                           \
   62|  16.8M|    }                                                                                                              \
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.11k|    {                                                                                                              \
   67|  2.11k|        return ossl_sa_set((OPENSSL_SA *)sa, n, (void *)val);                                                      \
   68|  2.11k|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_new:
   26|  11.3k|    {                                                                                                              \
   27|  11.3k|        return (SPARSE_ARRAY_OF(type) *)ossl_sa_new();                                                             \
   28|  11.3k|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_free:
   31|  11.3k|    {                                                                                                              \
   32|  11.3k|        ossl_sa_free((OPENSSL_SA *)sa);                                                                            \
   33|  11.3k|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_get:
   60|   951k|    {                                                                                                              \
   61|   951k|        return (type *)ossl_sa_get((OPENSSL_SA *)sa, n);                                                           \
   62|   951k|    }                                                                                                              \
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_doall_arg:
   55|  23.7k|    {                                                                                                              \
   56|  23.7k|        ossl_sa_doall_arg((OPENSSL_SA *)sa,                                                                        \
   57|  23.7k|            (void (*)(ossl_uintmax_t, void *, void *))leaf, arg);                                                  \
   58|  23.7k|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_num:
   41|     24|    {                                                                                                              \
   42|     24|        return ossl_sa_num((OPENSSL_SA *)sa);                                                                      \
   43|     24|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_doall:
   47|  12.3k|    {                                                                                                              \
   48|  12.3k|        ossl_sa_doall((OPENSSL_SA *)sa,                                                                            \
   49|  12.3k|            (void (*)(ossl_uintmax_t, void *))leaf);                                                               \
   50|  12.3k|    }                                                                                                              \
rsa_ossl.c:ossl_sa_BN_BLINDING_doall_arg:
   55|   235k|    {                                                                                                              \
   56|   235k|        ossl_sa_doall_arg((OPENSSL_SA *)sa,                                                                        \
   57|   235k|            (void (*)(ossl_uintmax_t, void *, void *))leaf, arg);                                                  \
   58|   235k|    }                                                                                                              \
rsa_ossl.c:ossl_sa_BN_BLINDING_free:
   31|   235k|    {                                                                                                              \
   32|   235k|        ossl_sa_free((OPENSSL_SA *)sa);                                                                            \
   33|   235k|    }                                                                                                              \
rsa_ossl.c:ossl_sa_BN_BLINDING_new:
   26|   235k|    {                                                                                                              \
   27|   235k|        return (SPARSE_ARRAY_OF(type) *)ossl_sa_new();                                                             \
   28|   235k|    }                                                                                                              \

s3_lib.c:ossl_assert_int:
   45|  3.51k|{
   46|  3.51k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 3.51k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  3.51k|    return expr;
   50|  3.51k|}
ssl_cert.c:ossl_assert_int:
   45|  2.44k|{
   46|  2.44k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 2.44k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  2.44k|    return expr;
   50|  2.44k|}
ssl_ciph.c:ossl_assert_int:
   45|  18.8k|{
   46|  18.8k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 18.8k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  18.8k|    return expr;
   50|  18.8k|}
ssl_lib.c:ossl_assert_int:
   45|  1.76k|{
   46|  1.76k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 1.76k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  1.76k|    return expr;
   50|  1.76k|}
rec_layer_s3.c:ossl_assert_int:
   45|  10.7k|{
   46|  10.7k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 10.7k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  10.7k|    return expr;
   50|  10.7k|}
tls_common.c:ossl_assert_int:
   45|  10.1k|{
   46|  10.1k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 10.1k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  10.1k|    return expr;
   50|  10.1k|}
extensions.c:ossl_assert_int:
   45|     41|{
   46|     41|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 41]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|     41|    return expr;
   50|     41|}
extensions_clnt.c:ossl_assert_int:
   45|     42|{
   46|     42|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 42]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|     42|    return expr;
   50|     42|}
statem.c:ossl_assert_int:
   45|    212|{
   46|    212|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 212]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|    212|    return expr;
   50|    212|}
decoder_lib.c:ossl_assert_int:
   45|     17|{
   46|     17|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 17]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|     17|    return expr;
   50|     17|}
decoder_meth.c:ossl_assert_int:
   45|  3.60M|{
   46|  3.60M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 3.60M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  3.60M|    return expr;
   50|  3.60M|}
digest.c:ossl_assert_int:
   45|   633k|{
   46|   633k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 633k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   633k|    return expr;
   50|   633k|}
evp_enc.c:ossl_assert_int:
   45|   179k|{
   46|   179k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 179k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   179k|    return expr;
   50|   179k|}
evp_fetch.c:ossl_assert_int:
   45|  2.13M|{
   46|  2.13M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 2.13M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  2.13M|    return expr;
   50|  2.13M|}
p_lib.c:ossl_assert_int:
   45|  2.75M|{
   46|  2.75M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 2.75M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  2.75M|    return expr;
   50|  2.75M|}
pmeth_lib.c:ossl_assert_int:
   45|  64.2k|{
   46|  64.2k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 64.2k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  64.2k|    return expr;
   50|  64.2k|}
core_algorithm.c:ossl_assert_int:
   45|  1.05k|{
   46|  1.05k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 1.05k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  1.05k|    return expr;
   50|  1.05k|}
core_fetch.c:ossl_assert_int:
   45|   137k|{
   46|   137k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 137k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   137k|    return expr;
   50|   137k|}
core_namemap.c:ossl_assert_int:
   45|   378k|{
   46|   378k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 378k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   378k|    return expr;
   50|   378k|}
packet.c:ossl_assert_int:
   45|  2.56M|{
   46|  2.56M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 2.56M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  2.56M|    return expr;
   50|  2.56M|}
provider_core.c:ossl_assert_int:
   45|   132k|{
   46|   132k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 132k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   132k|    return expr;
   50|   132k|}
threads_common.c:ossl_assert_int:
   45|  16.8M|{
   46|  16.8M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 16.8M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  16.8M|    return expr;
   50|  16.8M|}
threads_pthread.c:ossl_assert_int:
   45|  12.7M|{
   46|  12.7M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 12.7M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  12.7M|    return expr;
   50|  12.7M|}
defn_cache.c:ossl_assert_int:
   45|   337k|{
   46|   337k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 337k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   337k|    return expr;
   50|   337k|}
property.c:ossl_assert_int:
   45|   198k|{
   46|   198k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 198k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   198k|    return expr;
   50|   198k|}
x_pubkey.c:ossl_assert_int:
   45|   695k|{
   46|   695k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 695k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   695k|    return expr;
   50|   695k|}
drbg_ctr.c:ossl_assert_int:
   45|  6.86k|{
   46|  6.86k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 6.86k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  6.86k|    return expr;
   50|  6.86k|}
ml_kem.c:ossl_assert_int:
   45|  2.87k|{
   46|  2.87k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 2.87k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  2.87k|    return expr;
   50|  2.87k|}

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

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

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

rec_layer_s3.c:PACKET_buf_init:
   83|     46|{
   84|       |    /* Sanity check for negative values. */
   85|     46|    if (len > (size_t)(SIZE_MAX / 2))
  ------------------
  |  Branch (85:9): [True: 0, False: 46]
  ------------------
   86|      0|        return 0;
   87|       |
   88|     46|    pkt->curr = pkt->msgstart = buf;
   89|     46|    pkt->remaining = len;
   90|     46|    return 1;
   91|     46|}
rec_layer_s3.c:PACKET_get_1:
  335|     91|{
  336|     91|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (336:9): [True: 2, False: 89]
  ------------------
  337|      2|        return 0;
  338|       |
  339|     89|    packet_forward(pkt, 1);
  340|       |
  341|     89|    return 1;
  342|     91|}
rec_layer_s3.c:PACKET_peek_1:
  324|     91|{
  325|     91|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (325:9): [True: 2, False: 89]
  ------------------
  326|      2|        return 0;
  327|       |
  328|     89|    *data = *pkt->curr;
  329|       |
  330|     89|    return 1;
  331|     91|}
rec_layer_s3.c:packet_forward:
   33|     89|{
   34|     89|    pkt->curr += len;
   35|     89|    pkt->remaining -= len;
   36|     89|}
rec_layer_s3.c:PACKET_remaining:
   42|    135|{
   43|    135|    return pkt->remaining;
   44|    135|}
tls_common.c:PACKET_buf_init:
   83|    527|{
   84|       |    /* Sanity check for negative values. */
   85|    527|    if (len > (size_t)(SIZE_MAX / 2))
  ------------------
  |  Branch (85:9): [True: 0, False: 527]
  ------------------
   86|      0|        return 0;
   87|       |
   88|    527|    pkt->curr = pkt->msgstart = buf;
   89|    527|    pkt->remaining = len;
   90|    527|    return 1;
   91|    527|}
tls_common.c:PACKET_get_1:
  335|    527|{
  336|    527|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (336:9): [True: 0, False: 527]
  ------------------
  337|      0|        return 0;
  338|       |
  339|    527|    packet_forward(pkt, 1);
  340|       |
  341|    527|    return 1;
  342|    527|}
tls_common.c:PACKET_peek_1:
  324|    527|{
  325|    527|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (325:9): [True: 0, False: 527]
  ------------------
  326|      0|        return 0;
  327|       |
  328|    527|    *data = *pkt->curr;
  329|       |
  330|    527|    return 1;
  331|    527|}
tls_common.c:PACKET_remaining:
   42|  1.58k|{
   43|  1.58k|    return pkt->remaining;
   44|  1.58k|}
tls_common.c:packet_forward:
   33|  1.58k|{
   34|  1.58k|    pkt->curr += len;
   35|  1.58k|    pkt->remaining -= len;
   36|  1.58k|}
tls_common.c:PACKET_get_net_2:
  166|  1.05k|{
  167|  1.05k|    if (!PACKET_peek_net_2(pkt, data))
  ------------------
  |  Branch (167:9): [True: 0, False: 1.05k]
  ------------------
  168|      0|        return 0;
  169|       |
  170|  1.05k|    packet_forward(pkt, 2);
  171|       |
  172|  1.05k|    return 1;
  173|  1.05k|}
tls_common.c:PACKET_peek_net_2:
  153|  1.05k|{
  154|  1.05k|    if (PACKET_remaining(pkt) < 2)
  ------------------
  |  Branch (154:9): [True: 0, False: 1.05k]
  ------------------
  155|      0|        return 0;
  156|       |
  157|  1.05k|    *data = ((unsigned int)(*pkt->curr)) << 8;
  158|  1.05k|    *data |= *(pkt->curr + 1);
  159|       |
  160|  1.05k|    return 1;
  161|  1.05k|}
tls_common.c:PACKET_get_net_2_len:
  177|    527|{
  178|    527|    unsigned int i;
  179|    527|    int ret = PACKET_get_net_2(pkt, &i);
  180|       |
  181|    527|    if (ret)
  ------------------
  |  Branch (181:9): [True: 527, False: 0]
  ------------------
  182|    527|        *data = (size_t)i;
  183|       |
  184|    527|    return ret;
  185|    527|}
extensions.c:PACKET_data:
   71|      1|{
   72|      1|    return pkt->curr;
   73|      1|}
extensions.c:PACKET_remaining:
   42|    583|{
   43|    583|    return pkt->remaining;
   44|    583|}
extensions.c:PACKET_get_net_2:
  166|    243|{
  167|    243|    if (!PACKET_peek_net_2(pkt, data))
  ------------------
  |  Branch (167:9): [True: 11, False: 232]
  ------------------
  168|     11|        return 0;
  169|       |
  170|    232|    packet_forward(pkt, 2);
  171|       |
  172|    232|    return 1;
  173|    243|}
extensions.c:PACKET_peek_net_2:
  153|    243|{
  154|    243|    if (PACKET_remaining(pkt) < 2)
  ------------------
  |  Branch (154:9): [True: 11, False: 232]
  ------------------
  155|     11|        return 0;
  156|       |
  157|    232|    *data = ((unsigned int)(*pkt->curr)) << 8;
  158|    232|    *data |= *(pkt->curr + 1);
  159|       |
  160|    232|    return 1;
  161|    243|}
extensions.c:packet_forward:
   33|    339|{
   34|    339|    pkt->curr += len;
   35|    339|    pkt->remaining -= len;
   36|    339|}
extensions.c:PACKET_get_length_prefixed_2:
  596|    117|{
  597|    117|    unsigned int length;
  598|    117|    const unsigned char *data;
  599|    117|    PACKET tmp = *pkt;
  600|       |
  601|    117|    if (!PACKET_get_net_2(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
  ------------------
  |  Branch (601:9): [True: 2, False: 115]
  |  Branch (601:45): [True: 8, False: 107]
  ------------------
  602|     10|        return 0;
  603|     10|    }
  604|       |
  605|    107|    *pkt = tmp;
  606|    107|    subpkt->curr = data;
  607|    107|    subpkt->msgstart = pkt->msgstart;
  608|    107|    subpkt->remaining = length;
  609|       |
  610|    107|    return 1;
  611|    117|}
extensions.c:PACKET_get_bytes:
  416|    115|{
  417|    115|    if (!PACKET_peek_bytes(pkt, data, len))
  ------------------
  |  Branch (417:9): [True: 8, False: 107]
  ------------------
  418|      8|        return 0;
  419|       |
  420|    107|    packet_forward(pkt, len);
  421|       |
  422|    107|    return 1;
  423|    115|}
extensions.c:PACKET_peek_bytes:
  398|    115|{
  399|    115|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (399:9): [True: 8, False: 107]
  ------------------
  400|      8|        return 0;
  401|       |
  402|    107|    *data = pkt->curr;
  403|       |
  404|    107|    return 1;
  405|    115|}
extensions_clnt.c:PACKET_get_1_len:
  346|     21|{
  347|     21|    unsigned int i;
  348|     21|    int ret = PACKET_get_1(pkt, &i);
  349|       |
  350|     21|    if (ret)
  ------------------
  |  Branch (350:9): [True: 21, False: 0]
  ------------------
  351|     21|        *data = (size_t)i;
  352|       |
  353|     21|    return ret;
  354|     21|}
extensions_clnt.c:PACKET_remaining:
   42|     92|{
   43|     92|    return pkt->remaining;
   44|     92|}
extensions_clnt.c:PACKET_get_bytes:
  416|     42|{
  417|     42|    if (!PACKET_peek_bytes(pkt, data, len))
  ------------------
  |  Branch (417:9): [True: 1, False: 41]
  ------------------
  418|      1|        return 0;
  419|       |
  420|     41|    packet_forward(pkt, len);
  421|       |
  422|     41|    return 1;
  423|     42|}
extensions_clnt.c:PACKET_peek_bytes:
  398|     42|{
  399|     42|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (399:9): [True: 1, False: 41]
  ------------------
  400|      1|        return 0;
  401|       |
  402|     41|    *data = pkt->curr;
  403|       |
  404|     41|    return 1;
  405|     42|}
extensions_clnt.c:packet_forward:
   33|     65|{
   34|     65|    pkt->curr += len;
   35|     65|    pkt->remaining -= len;
   36|     65|}
extensions_clnt.c:PACKET_get_1:
  335|     23|{
  336|     23|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (336:9): [True: 0, False: 23]
  ------------------
  337|      0|        return 0;
  338|       |
  339|     23|    packet_forward(pkt, 1);
  340|       |
  341|     23|    return 1;
  342|     23|}
extensions_clnt.c:PACKET_peek_1:
  324|     23|{
  325|     23|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (325:9): [True: 0, False: 23]
  ------------------
  326|      0|        return 0;
  327|       |
  328|     23|    *data = *pkt->curr;
  329|       |
  330|     23|    return 1;
  331|     23|}
extensions_clnt.c:PACKET_as_length_prefixed_1:
  571|      2|{
  572|      2|    unsigned int length;
  573|      2|    const unsigned char *data;
  574|      2|    PACKET tmp = *pkt;
  575|      2|    if (!PACKET_get_1(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length) || PACKET_remaining(&tmp) != 0) {
  ------------------
  |  Branch (575:9): [True: 0, False: 2]
  |  Branch (575:41): [True: 1, False: 1]
  |  Branch (575:91): [True: 0, False: 1]
  ------------------
  576|      1|        return 0;
  577|      1|    }
  578|       |
  579|      1|    *pkt = tmp;
  580|      1|    subpkt->curr = data;
  581|      1|    subpkt->msgstart = pkt->msgstart;
  582|      1|    subpkt->remaining = length;
  583|       |
  584|      1|    return 1;
  585|      2|}
extensions_clnt.c:PACKET_get_net_2_len:
  177|      1|{
  178|      1|    unsigned int i;
  179|      1|    int ret = PACKET_get_net_2(pkt, &i);
  180|       |
  181|      1|    if (ret)
  ------------------
  |  Branch (181:9): [True: 0, False: 1]
  ------------------
  182|      0|        *data = (size_t)i;
  183|       |
  184|      1|    return ret;
  185|      1|}
extensions_clnt.c:PACKET_get_net_2:
  166|      3|{
  167|      3|    if (!PACKET_peek_net_2(pkt, data))
  ------------------
  |  Branch (167:9): [True: 2, False: 1]
  ------------------
  168|      2|        return 0;
  169|       |
  170|      1|    packet_forward(pkt, 2);
  171|       |
  172|      1|    return 1;
  173|      3|}
extensions_clnt.c:PACKET_peek_net_2:
  153|      3|{
  154|      3|    if (PACKET_remaining(pkt) < 2)
  ------------------
  |  Branch (154:9): [True: 2, False: 1]
  ------------------
  155|      2|        return 0;
  156|       |
  157|      1|    *data = ((unsigned int)(*pkt->curr)) << 8;
  158|      1|    *data |= *(pkt->curr + 1);
  159|       |
  160|      1|    return 1;
  161|      3|}
statem.c:PACKET_buf_init:
   83|    165|{
   84|       |    /* Sanity check for negative values. */
   85|    165|    if (len > (size_t)(SIZE_MAX / 2))
  ------------------
  |  Branch (85:9): [True: 0, False: 165]
  ------------------
   86|      0|        return 0;
   87|       |
   88|    165|    pkt->curr = pkt->msgstart = buf;
   89|    165|    pkt->remaining = len;
   90|    165|    return 1;
   91|    165|}
statem.c:PACKET_forward:
  531|    165|{
  532|    165|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (532:9): [True: 0, False: 165]
  ------------------
  533|      0|        return 0;
  534|       |
  535|    165|    packet_forward(pkt, len);
  536|       |
  537|    165|    return 1;
  538|    165|}
statem.c:PACKET_remaining:
   42|    165|{
   43|    165|    return pkt->remaining;
   44|    165|}
statem.c:packet_forward:
   33|    165|{
   34|    165|    pkt->curr += len;
   35|    165|    pkt->remaining -= len;
   36|    165|}
statem_clnt.c:PACKET_forward:
  531|      3|{
  532|      3|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (532:9): [True: 0, False: 3]
  ------------------
  533|      0|        return 0;
  534|       |
  535|      3|    packet_forward(pkt, len);
  536|       |
  537|      3|    return 1;
  538|      3|}
statem_clnt.c:packet_forward:
   33|  1.17k|{
   34|  1.17k|    pkt->curr += len;
   35|  1.17k|    pkt->remaining -= len;
   36|  1.17k|}
statem_clnt.c:PACKET_get_length_prefixed_1:
  549|    159|{
  550|    159|    unsigned int length;
  551|    159|    const unsigned char *data;
  552|    159|    PACKET tmp = *pkt;
  553|    159|    if (!PACKET_get_1(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
  ------------------
  |  Branch (553:9): [True: 1, False: 158]
  |  Branch (553:41): [True: 10, False: 148]
  ------------------
  554|     11|        return 0;
  555|     11|    }
  556|       |
  557|    148|    *pkt = tmp;
  558|    148|    subpkt->curr = data;
  559|    148|    subpkt->msgstart = pkt->msgstart;
  560|    148|    subpkt->remaining = length;
  561|       |
  562|    148|    return 1;
  563|    159|}
statem_clnt.c:PACKET_remaining:
   42|  2.17k|{
   43|  2.17k|    return pkt->remaining;
   44|  2.17k|}
statem_clnt.c:PACKET_copy_bytes:
  444|    159|{
  445|    159|    if (!PACKET_peek_copy_bytes(pkt, data, len))
  ------------------
  |  Branch (445:9): [True: 3, False: 156]
  ------------------
  446|      3|        return 0;
  447|       |
  448|    156|    packet_forward(pkt, len);
  449|       |
  450|    156|    return 1;
  451|    159|}
statem_clnt.c:PACKET_peek_copy_bytes:
  429|    159|{
  430|    159|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (430:9): [True: 3, False: 156]
  ------------------
  431|      3|        return 0;
  432|       |
  433|    156|    memcpy(data, pkt->curr, len);
  434|       |
  435|    156|    return 1;
  436|    159|}
statem_clnt.c:PACKET_peek_bytes:
  398|    605|{
  399|    605|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (399:9): [True: 25, False: 580]
  ------------------
  400|     25|        return 0;
  401|       |
  402|    580|    *data = pkt->curr;
  403|       |
  404|    580|    return 1;
  405|    605|}
statem_clnt.c:PACKET_get_net_2:
  166|    302|{
  167|    302|    if (!PACKET_peek_net_2(pkt, data))
  ------------------
  |  Branch (167:9): [True: 5, False: 297]
  ------------------
  168|      5|        return 0;
  169|       |
  170|    297|    packet_forward(pkt, 2);
  171|       |
  172|    297|    return 1;
  173|    302|}
statem_clnt.c:PACKET_peek_net_2:
  153|    302|{
  154|    302|    if (PACKET_remaining(pkt) < 2)
  ------------------
  |  Branch (154:9): [True: 5, False: 297]
  ------------------
  155|      5|        return 0;
  156|       |
  157|    297|    *data = ((unsigned int)(*pkt->curr)) << 8;
  158|    297|    *data |= *(pkt->curr + 1);
  159|       |
  160|    297|    return 1;
  161|    302|}
statem_clnt.c:PACKET_data:
   71|    107|{
   72|    107|    return pkt->curr;
   73|    107|}
statem_clnt.c:PACKET_get_bytes:
  416|    441|{
  417|    441|    if (!PACKET_peek_bytes(pkt, data, len))
  ------------------
  |  Branch (417:9): [True: 25, False: 416]
  ------------------
  418|     25|        return 0;
  419|       |
  420|    416|    packet_forward(pkt, len);
  421|       |
  422|    416|    return 1;
  423|    441|}
statem_clnt.c:PACKET_get_1:
  335|    305|{
  336|    305|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (336:9): [True: 3, False: 302]
  ------------------
  337|      3|        return 0;
  338|       |
  339|    302|    packet_forward(pkt, 1);
  340|       |
  341|    302|    return 1;
  342|    305|}
statem_clnt.c:PACKET_peek_1:
  324|    305|{
  325|    305|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (325:9): [True: 3, False: 302]
  ------------------
  326|      3|        return 0;
  327|       |
  328|    302|    *data = *pkt->curr;
  329|       |
  330|    302|    return 1;
  331|    305|}
statem_clnt.c:PACKET_null_init:
   95|      6|{
   96|       |    pkt->curr = pkt->msgstart = NULL;
   97|      6|    pkt->remaining = 0;
   98|      6|}
statem_clnt.c:PACKET_as_length_prefixed_2:
  619|    138|{
  620|    138|    unsigned int length;
  621|    138|    const unsigned char *data;
  622|    138|    PACKET tmp = *pkt;
  623|       |
  624|    138|    if (!PACKET_get_net_2(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length) || PACKET_remaining(&tmp) != 0) {
  ------------------
  |  Branch (624:9): [True: 3, False: 135]
  |  Branch (624:45): [True: 13, False: 122]
  |  Branch (624:95): [True: 1, False: 121]
  ------------------
  625|     17|        return 0;
  626|     17|    }
  627|       |
  628|    121|    *pkt = tmp;
  629|    121|    subpkt->curr = data;
  630|    121|    subpkt->msgstart = pkt->msgstart;
  631|    121|    subpkt->remaining = length;
  632|       |
  633|    121|    return 1;
  634|    138|}
statem_clnt.c:PACKET_get_net_3:
  207|      1|{
  208|      1|    if (!PACKET_peek_net_3(pkt, data))
  ------------------
  |  Branch (208:9): [True: 1, False: 0]
  ------------------
  209|      1|        return 0;
  210|       |
  211|      0|    packet_forward(pkt, 3);
  212|       |
  213|      0|    return 1;
  214|      1|}
statem_clnt.c:PACKET_peek_net_3:
  193|      1|{
  194|      1|    if (PACKET_remaining(pkt) < 3)
  ------------------
  |  Branch (194:9): [True: 1, False: 0]
  ------------------
  195|      1|        return 0;
  196|       |
  197|      0|    *data = ((unsigned long)(*pkt->curr)) << 16;
  198|      0|    *data |= ((unsigned long)(*(pkt->curr + 1))) << 8;
  199|      0|    *data |= *(pkt->curr + 2);
  200|       |
  201|      0|    return 1;
  202|      1|}

ssl_cert.c:CRYPTO_NEW_REF:
  280|  4.21k|{
  281|  4.21k|    refcnt->val = n;
  282|  4.21k|    return 1;
  283|  4.21k|}
ssl_cert.c:CRYPTO_DOWN_REF:
   56|  4.21k|{
   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.21k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  4.21k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 4.21k, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  4.21k|#endif
   68|  4.21k|    return 1;
   69|  4.21k|}
ssl_cert.c:CRYPTO_FREE_REF:
  286|  4.21k|{
  287|  4.21k|}
ssl_lib.c:CRYPTO_NEW_REF:
  280|  4.21k|{
  281|  4.21k|    refcnt->val = n;
  282|  4.21k|    return 1;
  283|  4.21k|}
ssl_lib.c:CRYPTO_FREE_REF:
  286|  4.21k|{
  287|  4.21k|}
ssl_lib.c:CRYPTO_UP_REF:
   40|  3.53k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  3.53k|    return 1;
   43|  3.53k|}
ssl_lib.c:CRYPTO_DOWN_REF:
   56|  7.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|  7.74k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  7.74k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 4.21k, False: 3.53k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  7.74k|#endif
   68|  7.74k|    return 1;
   69|  7.74k|}
ssl_sess.c:CRYPTO_NEW_REF:
  280|  1.75k|{
  281|  1.75k|    refcnt->val = n;
  282|  1.75k|    return 1;
  283|  1.75k|}
ssl_sess.c:CRYPTO_FREE_REF:
  286|  1.75k|{
  287|  1.75k|}
ssl_sess.c:CRYPTO_DOWN_REF:
   56|  1.75k|{
   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.75k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  1.75k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 1.75k, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  1.75k|#endif
   68|  1.75k|    return 1;
   69|  1.75k|}
tasn_utl.c:CRYPTO_NEW_REF:
  280|   347k|{
  281|   347k|    refcnt->val = n;
  282|   347k|    return 1;
  283|   347k|}
tasn_utl.c:CRYPTO_FREE_REF:
  286|   347k|{
  287|   347k|}
tasn_utl.c:CRYPTO_DOWN_REF:
   56|   695k|{
   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|   695k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   695k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 347k, False: 347k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   695k|#endif
   68|   695k|    return 1;
   69|   695k|}
bio_lib.c:CRYPTO_NEW_REF:
  280|  2.11M|{
  281|  2.11M|    refcnt->val = n;
  282|  2.11M|    return 1;
  283|  2.11M|}
bio_lib.c:CRYPTO_FREE_REF:
  286|  2.11M|{
  287|  2.11M|}
bio_lib.c:CRYPTO_DOWN_REF:
   56|  2.82M|{
   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.82M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  2.82M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 2.11M, False: 713k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  2.82M|#endif
   68|  2.82M|    return 1;
   69|  2.82M|}
bio_lib.c:CRYPTO_UP_REF:
   40|   713k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   713k|    return 1;
   43|   713k|}
bio_lib.c:CRYPTO_GET_REF:
   72|  14.0k|{
   73|       |    *ret = atomic_load_explicit(&refcnt->val, memory_order_acquire);
   74|  14.0k|    return 1;
   75|  14.0k|}
dso_lib.c:CRYPTO_NEW_REF:
  280|     83|{
  281|     83|    refcnt->val = n;
  282|     83|    return 1;
  283|     83|}
dso_lib.c:CRYPTO_DOWN_REF:
   56|     83|{
   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|     83|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|     83|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 83, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|     83|#endif
   68|     83|    return 1;
   69|     83|}
dso_lib.c:CRYPTO_FREE_REF:
  286|     83|{
  287|     83|}
ec_key.c:CRYPTO_DOWN_REF:
   56|   224k|{
   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|   224k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   224k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 112k, False: 112k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   224k|#endif
   68|   224k|    return 1;
   69|   224k|}
ec_key.c:CRYPTO_FREE_REF:
  286|   112k|{
  287|   112k|}
ec_key.c:CRYPTO_UP_REF:
   40|   112k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   112k|    return 1;
   43|   112k|}
ec_kmeth.c:CRYPTO_NEW_REF:
  280|   112k|{
  281|   112k|    refcnt->val = n;
  282|   112k|    return 1;
  283|   112k|}
decoder_meth.c:CRYPTO_UP_REF:
   40|  1.97M|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  1.97M|    return 1;
   43|  1.97M|}
decoder_meth.c:CRYPTO_DOWN_REF:
   56|  1.97M|{
   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.97M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  1.97M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 0, False: 1.97M]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  1.97M|#endif
   68|  1.97M|    return 1;
   69|  1.97M|}
decoder_meth.c:CRYPTO_NEW_REF:
  280|     76|{
  281|     76|    refcnt->val = n;
  282|     76|    return 1;
  283|     76|}
digest.c:CRYPTO_NEW_REF:
  280|  18.5k|{
  281|  18.5k|    refcnt->val = n;
  282|  18.5k|    return 1;
  283|  18.5k|}
digest.c:CRYPTO_UP_REF:
   40|   645k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   645k|    return 1;
   43|   645k|}
digest.c:CRYPTO_DOWN_REF:
   56|   664k|{
   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|   664k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   664k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 18.5k, False: 645k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   664k|#endif
   68|   664k|    return 1;
   69|   664k|}
digest.c:CRYPTO_FREE_REF:
  286|  18.5k|{
  287|  18.5k|}
evp_enc.c:CRYPTO_NEW_REF:
  280|  80.3k|{
  281|  80.3k|    refcnt->val = n;
  282|  80.3k|    return 1;
  283|  80.3k|}
evp_enc.c:CRYPTO_UP_REF:
   40|   134k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   134k|    return 1;
   43|   134k|}
evp_enc.c:CRYPTO_FREE_REF:
  286|  80.2k|{
  287|  80.2k|}
evp_enc.c:CRYPTO_DOWN_REF:
   56|   214k|{
   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|   214k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   214k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 80.2k, False: 134k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   214k|#endif
   68|   214k|    return 1;
   69|   214k|}
exchange.c:CRYPTO_DOWN_REF:
   56|  14.4k|{
   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|  14.4k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  14.4k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 4.31k, False: 10.0k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  14.4k|#endif
   68|  14.4k|    return 1;
   69|  14.4k|}
exchange.c:CRYPTO_FREE_REF:
  286|  4.31k|{
  287|  4.31k|}
exchange.c:CRYPTO_UP_REF:
   40|  10.0k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  10.0k|    return 1;
   43|  10.0k|}
exchange.c:CRYPTO_NEW_REF:
  280|  4.32k|{
  281|  4.32k|    refcnt->val = n;
  282|  4.32k|    return 1;
  283|  4.32k|}
keymgmt_meth.c:CRYPTO_NEW_REF:
  280|  25.9k|{
  281|  25.9k|    refcnt->val = n;
  282|  25.9k|    return 1;
  283|  25.9k|}
keymgmt_meth.c:CRYPTO_UP_REF:
   40|  1.33M|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  1.33M|    return 1;
   43|  1.33M|}
keymgmt_meth.c:CRYPTO_DOWN_REF:
   56|  1.36M|{
   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.36M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  1.36M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 25.9k, False: 1.33M]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  1.36M|#endif
   68|  1.36M|    return 1;
   69|  1.36M|}
keymgmt_meth.c:CRYPTO_FREE_REF:
  286|  25.9k|{
  287|  25.9k|}
p_lib.c:CRYPTO_NEW_REF:
  280|   704k|{
  281|   704k|    refcnt->val = n;
  282|   704k|    return 1;
  283|   704k|}
p_lib.c:CRYPTO_FREE_REF:
  286|   704k|{
  287|   704k|}
p_lib.c:CRYPTO_UP_REF:
   40|   409k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   409k|    return 1;
   43|   409k|}
p_lib.c:CRYPTO_DOWN_REF:
   56|  1.11M|{
   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.11M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  1.11M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 704k, False: 409k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  1.11M|#endif
   68|  1.11M|    return 1;
   69|  1.11M|}
signature.c:CRYPTO_DOWN_REF:
   56|  78.6k|{
   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|  78.6k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  78.6k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 36.4k, False: 42.2k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  78.6k|#endif
   68|  78.6k|    return 1;
   69|  78.6k|}
signature.c:CRYPTO_FREE_REF:
  286|  36.4k|{
  287|  36.4k|}
signature.c:CRYPTO_UP_REF:
   40|  42.2k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  42.2k|    return 1;
   43|  42.2k|}
signature.c:CRYPTO_NEW_REF:
  280|  36.4k|{
  281|  36.4k|    refcnt->val = n;
  282|  36.4k|    return 1;
  283|  36.4k|}
provider_core.c:CRYPTO_UP_REF:
   40|   306k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   306k|    return 1;
   43|   306k|}
provider_core.c:CRYPTO_NEW_REF:
  280|  1.56k|{
  281|  1.56k|    refcnt->val = n;
  282|  1.56k|    return 1;
  283|  1.56k|}
provider_core.c:CRYPTO_DOWN_REF:
   56|   307k|{
   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|   307k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   307k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 1.56k, False: 305k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   307k|#endif
   68|   307k|    return 1;
   69|   307k|}
provider_core.c:CRYPTO_FREE_REF:
  286|  1.56k|{
  287|  1.56k|}
rsa_lib.c:CRYPTO_NEW_REF:
  280|   235k|{
  281|   235k|    refcnt->val = n;
  282|   235k|    return 1;
  283|   235k|}
rsa_lib.c:CRYPTO_DOWN_REF:
   56|   471k|{
   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|   471k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   471k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 235k, False: 235k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   471k|#endif
   68|   471k|    return 1;
   69|   471k|}
rsa_lib.c:CRYPTO_FREE_REF:
  286|   235k|{
  287|   235k|}
rsa_lib.c:CRYPTO_UP_REF:
   40|   235k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   235k|    return 1;
   43|   235k|}
x509_lu.c:CRYPTO_NEW_REF:
  280|  2.44k|{
  281|  2.44k|    refcnt->val = n;
  282|  2.44k|    return 1;
  283|  2.44k|}
x509_lu.c:CRYPTO_DOWN_REF:
   56|  2.44k|{
   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.44k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  2.44k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 2.44k, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  2.44k|#endif
   68|  2.44k|    return 1;
   69|  2.44k|}
x509_lu.c:CRYPTO_FREE_REF:
  286|  2.44k|{
  287|  2.44k|}
x509_set.c:CRYPTO_UP_REF:
   40|   347k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   347k|    return 1;
   43|   347k|}
ossl_core_bio.c:CRYPTO_UP_REF:
   40|   695k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   695k|    return 1;
   43|   695k|}
ossl_core_bio.c:CRYPTO_DOWN_REF:
   56|  1.39M|{
   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.39M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  1.39M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 695k, False: 695k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  1.39M|#endif
   68|  1.39M|    return 1;
   69|  1.39M|}
ossl_core_bio.c:CRYPTO_FREE_REF:
  286|   695k|{
  287|   695k|}
ossl_core_bio.c:CRYPTO_NEW_REF:
  280|   695k|{
  281|   695k|    refcnt->val = n;
  282|   695k|    return 1;
  283|   695k|}
ecx_key.c:CRYPTO_NEW_REF:
  280|  2.87k|{
  281|  2.87k|    refcnt->val = n;
  282|  2.87k|    return 1;
  283|  2.87k|}
ecx_key.c:CRYPTO_FREE_REF:
  286|  2.87k|{
  287|  2.87k|}
ecx_key.c:CRYPTO_DOWN_REF:
   56|  2.87k|{
   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.87k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  2.87k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 2.87k, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  2.87k|#endif
   68|  2.87k|    return 1;
   69|  2.87k|}
evp_rand.c:CRYPTO_UP_REF:
   40|  10.0k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  10.0k|    return 1;
   43|  10.0k|}
evp_rand.c:CRYPTO_NEW_REF:
  280|  5.26k|{
  281|  5.26k|    refcnt->val = n;
  282|  5.26k|    return 1;
  283|  5.26k|}
evp_rand.c:CRYPTO_FREE_REF:
  286|  5.25k|{
  287|  5.25k|}
evp_rand.c:CRYPTO_DOWN_REF:
   56|  15.2k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  15.2k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  15.2k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 5.25k, False: 10.0k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  15.2k|#endif
   68|  15.2k|    return 1;
   69|  15.2k|}

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

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

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

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

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

ASN1_TYPE_new:
  800|  1.51M|    {                                                               \
  801|  1.51M|        return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));     \
  ------------------
  |  |  399|  1.51M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  802|  1.51M|    }                                                               \
X509_ALGOR_new:
  800|   695k|    {                                                               \
  801|   695k|        return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));     \
  ------------------
  |  |  399|   695k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  802|   695k|    }                                                               \
X509_ALGOR_free:
  804|   695k|    {                                                               \
  805|   695k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   695k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   695k|    }
GENERAL_NAMES_free:
  804|   695k|    {                                                               \
  805|   695k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   695k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   695k|    }
NAME_CONSTRAINTS_free:
  804|   983k|    {                                                               \
  805|   983k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   983k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   983k|    }
X509_CRL_it:
  241|   350k|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|   350k|    {                                  \
  |  |   98|   350k|        static const ASN1_ITEM local_it = {
  ------------------
  242|   350k|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|   350k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|   350k|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|   350k|#define V_ASN1_SEQUENCE 16
  ------------------
  244|   350k|        tname##_seq_tt,                                 \
  245|   350k|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|   350k|        &tname##_aux,                                   \
  247|   350k|        sizeof(stname),                                 \
  248|   350k|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|   350k|    }                         \
  |  |  105|   350k|    ;                         \
  |  |  106|   350k|    return &local_it;         \
  |  |  107|   350k|    }
  ------------------
X509_CRL_free:
  804|   350k|    {                                                               \
  805|   350k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   350k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   350k|    }
X509_NAME_ENTRY_new:
  800|  2.46M|    {                                                               \
  801|  2.46M|        return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));     \
  ------------------
  |  |  399|  2.46M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  802|  2.46M|    }                                                               \
X509_NAME_ENTRY_free:
  804|  5.62M|    {                                                               \
  805|  5.62M|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  5.62M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  5.62M|    }
X509_NAME_free:
  804|  30.9k|    {                                                               \
  805|  30.9k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  30.9k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  30.9k|    }
d2i_X509_PUBKEY:
  814|   347k|    {                                                                                      \
  815|   347k|        return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname)); \
  ------------------
  |  |  399|   347k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  816|   347k|    }                                                                                      \
X509_PUBKEY_free:
  804|   695k|    {                                                               \
  805|   695k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   695k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   695k|    }
X509_CINF_it:
  241|  1.90M|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|  1.90M|    {                                  \
  |  |   98|  1.90M|        static const ASN1_ITEM local_it = {
  ------------------
  242|  1.90M|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|  1.90M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|  1.90M|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|  1.90M|#define V_ASN1_SEQUENCE 16
  ------------------
  244|  1.90M|        tname##_seq_tt,                                 \
  245|  1.90M|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|  1.90M|        &tname##_aux,                                   \
  247|  1.90M|        sizeof(stname),                                 \
  248|  1.90M|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|  1.90M|    }                         \
  |  |  105|  1.90M|    ;                         \
  |  |  106|  1.90M|    return &local_it;         \
  |  |  107|  1.90M|    }
  ------------------
X509_it:
  241|  1.74M|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|  1.74M|    {                                  \
  |  |   98|  1.74M|        static const ASN1_ITEM local_it = {
  ------------------
  242|  1.74M|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|  1.74M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|  1.74M|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|  1.74M|#define V_ASN1_SEQUENCE 16
  ------------------
  244|  1.74M|        tname##_seq_tt,                                 \
  245|  1.74M|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|  1.74M|        &tname##_aux,                                   \
  247|  1.74M|        sizeof(stname),                                 \
  248|  1.74M|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|  1.74M|    }                         \
  |  |  105|  1.74M|    ;                         \
  |  |  106|  1.74M|    return &local_it;         \
  |  |  107|  1.74M|    }
  ------------------
d2i_X509:
  814|   347k|    {                                                                                      \
  815|   347k|        return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname)); \
  ------------------
  |  |  399|   347k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  816|   347k|    }                                                                                      \
X509_free:
  804|   757k|    {                                                               \
  805|   757k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   757k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   757k|    }
X509_CERT_AUX_free:
  804|   695k|    {                                                               \
  805|   695k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   695k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   695k|    }
RSAPublicKey_it:
  241|   235k|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|   235k|    {                                  \
  |  |   98|   235k|        static const ASN1_ITEM local_it = {
  ------------------
  242|   235k|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|   235k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|   235k|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|   235k|#define V_ASN1_SEQUENCE 16
  ------------------
  244|   235k|        tname##_seq_tt,                                 \
  245|   235k|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|   235k|        &tname##_aux,                                   \
  247|   235k|        sizeof(stname),                                 \
  248|   235k|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|   235k|    }                         \
  |  |  105|   235k|    ;                         \
  |  |  106|   235k|    return &local_it;         \
  |  |  107|   235k|    }
  ------------------
RSA_PSS_PARAMS_it:
  241|   235k|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|   235k|    {                                  \
  |  |   98|   235k|        static const ASN1_ITEM local_it = {
  ------------------
  242|   235k|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|   235k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|   235k|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|   235k|#define V_ASN1_SEQUENCE 16
  ------------------
  244|   235k|        tname##_seq_tt,                                 \
  245|   235k|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|   235k|        &tname##_aux,                                   \
  247|   235k|        sizeof(stname),                                 \
  248|   235k|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|   235k|    }                         \
  |  |  105|   235k|    ;                         \
  |  |  106|   235k|    return &local_it;         \
  |  |  107|   235k|    }
  ------------------
RSA_PSS_PARAMS_free:
  804|   235k|    {                                                               \
  805|   235k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   235k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   235k|    }
d2i_RSAPublicKey:
  814|   235k|    {                                                                                      \
  815|   235k|        return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname)); \
  ------------------
  |  |  399|   235k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  816|   235k|    }                                                                                      \
AUTHORITY_KEYID_free:
  804|   983k|    {                                                               \
  805|   983k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   983k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   983k|    }
ASIdentifiers_free:
  804|   983k|    {                                                               \
  805|   983k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   983k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   983k|    }
BASIC_CONSTRAINTS_free:
  804|   287k|    {                                                               \
  805|   287k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   287k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   287k|    }
CRL_DIST_POINTS_free:
  804|   695k|    {                                                               \
  805|   695k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   695k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   695k|    }

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

tls_common.c:OSSL_FUNC_rlayer_skip_early_data:
   60|  10.5k|    {                                                  \
   61|  10.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  10.5k|    }
tls_common.c:OSSL_FUNC_rlayer_security:
   60|  10.5k|    {                                                  \
   61|  10.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  10.5k|    }
decoder_meth.c:OSSL_FUNC_decoder_newctx:
   60|     76|    {                                                  \
   61|     76|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     76|    }
decoder_meth.c:OSSL_FUNC_decoder_freectx:
   60|     76|    {                                                  \
   61|     76|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     76|    }
decoder_meth.c:OSSL_FUNC_decoder_set_ctx_params:
   60|     74|    {                                                  \
   61|     74|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     74|    }
decoder_meth.c:OSSL_FUNC_decoder_settable_ctx_params:
   60|     74|    {                                                  \
   61|     74|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     74|    }
decoder_meth.c:OSSL_FUNC_decoder_does_selection:
   60|     73|    {                                                  \
   61|     73|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     73|    }
decoder_meth.c:OSSL_FUNC_decoder_decode:
   60|     76|    {                                                  \
   61|     76|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     76|    }
decoder_meth.c:OSSL_FUNC_decoder_export_object:
   60|     73|    {                                                  \
   61|     73|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     73|    }
digest.c:OSSL_FUNC_digest_newctx:
   60|  18.5k|    {                                                  \
   61|  18.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  18.5k|    }
digest.c:OSSL_FUNC_digest_init:
   60|  18.5k|    {                                                  \
   61|  18.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  18.5k|    }
digest.c:OSSL_FUNC_digest_update:
   60|  18.5k|    {                                                  \
   61|  18.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  18.5k|    }
digest.c:OSSL_FUNC_digest_final:
   60|  18.5k|    {                                                  \
   61|  18.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  18.5k|    }
digest.c:OSSL_FUNC_digest_squeeze:
   60|  3.70k|    {                                                  \
   61|  3.70k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.70k|    }
digest.c:OSSL_FUNC_digest_freectx:
   60|  18.5k|    {                                                  \
   61|  18.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  18.5k|    }
digest.c:OSSL_FUNC_digest_dupctx:
   60|  18.5k|    {                                                  \
   61|  18.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  18.5k|    }
digest.c:OSSL_FUNC_digest_get_params:
   60|  18.5k|    {                                                  \
   61|  18.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  18.5k|    }
digest.c:OSSL_FUNC_digest_set_ctx_params:
   60|  6.79k|    {                                                  \
   61|  6.79k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  6.79k|    }
digest.c:OSSL_FUNC_digest_get_ctx_params:
   60|  5.56k|    {                                                  \
   61|  5.56k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  5.56k|    }
digest.c:OSSL_FUNC_digest_gettable_params:
   60|  18.5k|    {                                                  \
   61|  18.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  18.5k|    }
digest.c:OSSL_FUNC_digest_settable_ctx_params:
   60|  6.79k|    {                                                  \
   61|  6.79k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  6.79k|    }
digest.c:OSSL_FUNC_digest_gettable_ctx_params:
   60|  5.56k|    {                                                  \
   61|  5.56k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  5.56k|    }
digest.c:OSSL_FUNC_digest_copyctx:
   60|  16.6k|    {                                                  \
   61|  16.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  16.6k|    }
digest.c:OSSL_FUNC_digest_serialize:
   60|  11.7k|    {                                                  \
   61|  11.7k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  11.7k|    }
digest.c:OSSL_FUNC_digest_deserialize:
   60|  11.7k|    {                                                  \
   61|  11.7k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  11.7k|    }
evp_enc.c:OSSL_FUNC_cipher_newctx:
   60|  80.3k|    {                                                  \
   61|  80.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  80.3k|    }
evp_enc.c:OSSL_FUNC_cipher_encrypt_init:
   60|  80.3k|    {                                                  \
   61|  80.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  80.3k|    }
evp_enc.c:OSSL_FUNC_cipher_decrypt_init:
   60|  80.3k|    {                                                  \
   61|  80.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  80.3k|    }
evp_enc.c:OSSL_FUNC_cipher_encrypt_skey_init:
   60|  42.0k|    {                                                  \
   61|  42.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  42.0k|    }
evp_enc.c:OSSL_FUNC_cipher_decrypt_skey_init:
   60|  42.0k|    {                                                  \
   61|  42.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  42.0k|    }
evp_enc.c:OSSL_FUNC_cipher_update:
   60|  80.3k|    {                                                  \
   61|  80.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  80.3k|    }
evp_enc.c:OSSL_FUNC_cipher_final:
   60|  80.3k|    {                                                  \
   61|  80.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  80.3k|    }
evp_enc.c:OSSL_FUNC_cipher_cipher:
   60|  72.9k|    {                                                  \
   61|  72.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  72.9k|    }
evp_enc.c:OSSL_FUNC_cipher_freectx:
   60|  80.3k|    {                                                  \
   61|  80.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  80.3k|    }
evp_enc.c:OSSL_FUNC_cipher_dupctx:
   60|  79.7k|    {                                                  \
   61|  79.7k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  79.7k|    }
evp_enc.c:OSSL_FUNC_cipher_get_params:
   60|  80.3k|    {                                                  \
   61|  80.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  80.3k|    }
evp_enc.c:OSSL_FUNC_cipher_get_ctx_params:
   60|  80.3k|    {                                                  \
   61|  80.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  80.3k|    }
evp_enc.c:OSSL_FUNC_cipher_set_ctx_params:
   60|  80.3k|    {                                                  \
   61|  80.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  80.3k|    }
evp_enc.c:OSSL_FUNC_cipher_gettable_params:
   60|  80.3k|    {                                                  \
   61|  80.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  80.3k|    }
evp_enc.c:OSSL_FUNC_cipher_gettable_ctx_params:
   60|  80.3k|    {                                                  \
   61|  80.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  80.3k|    }
evp_enc.c:OSSL_FUNC_cipher_settable_ctx_params:
   60|  80.3k|    {                                                  \
   61|  80.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  80.3k|    }
exchange.c:OSSL_FUNC_keyexch_newctx:
   60|  4.32k|    {                                                  \
   61|  4.32k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.32k|    }
exchange.c:OSSL_FUNC_keyexch_init:
   60|  4.32k|    {                                                  \
   61|  4.32k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.32k|    }
exchange.c:OSSL_FUNC_keyexch_set_peer:
   60|  2.47k|    {                                                  \
   61|  2.47k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.47k|    }
exchange.c:OSSL_FUNC_keyexch_derive:
   60|  4.32k|    {                                                  \
   61|  4.32k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.32k|    }
exchange.c:OSSL_FUNC_keyexch_freectx:
   60|  4.32k|    {                                                  \
   61|  4.32k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.32k|    }
exchange.c:OSSL_FUNC_keyexch_dupctx:
   60|  4.32k|    {                                                  \
   61|  4.32k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.32k|    }
exchange.c:OSSL_FUNC_keyexch_get_ctx_params:
   60|  4.32k|    {                                                  \
   61|  4.32k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.32k|    }
exchange.c:OSSL_FUNC_keyexch_gettable_ctx_params:
   60|  4.32k|    {                                                  \
   61|  4.32k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.32k|    }
exchange.c:OSSL_FUNC_keyexch_set_ctx_params:
   60|  3.09k|    {                                                  \
   61|  3.09k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.09k|    }
exchange.c:OSSL_FUNC_keyexch_settable_ctx_params:
   60|  3.09k|    {                                                  \
   61|  3.09k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.09k|    }
exchange.c:OSSL_FUNC_keyexch_derive_skey:
   60|    618|    {                                                  \
   61|    618|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    618|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_new:
   60|  25.9k|    {                                                  \
   61|  25.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  25.9k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_new_ex:
   60|  3.70k|    {                                                  \
   61|  3.70k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.70k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_init:
   60|  24.1k|    {                                                  \
   61|  24.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  24.1k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_set_template:
   60|  3.70k|    {                                                  \
   61|  3.70k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.70k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_set_params:
   60|  24.1k|    {                                                  \
   61|  24.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  24.1k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_settable_params:
   60|  24.1k|    {                                                  \
   61|  24.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  24.1k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_get_params:
   60|  1.23k|    {                                                  \
   61|  1.23k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.23k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_gettable_params:
   60|  1.23k|    {                                                  \
   61|  1.23k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.23k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen:
   60|  24.1k|    {                                                  \
   61|  24.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  24.1k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_cleanup:
   60|  24.1k|    {                                                  \
   61|  24.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  24.1k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_free:
   60|  25.9k|    {                                                  \
   61|  25.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  25.9k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_load:
   60|  18.5k|    {                                                  \
   61|  18.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  18.5k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_get_params:
   60|  24.1k|    {                                                  \
   61|  24.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  24.1k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gettable_params:
   60|  24.1k|    {                                                  \
   61|  24.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  24.1k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_set_params:
   60|  12.9k|    {                                                  \
   61|  12.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  12.9k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_settable_params:
   60|  12.9k|    {                                                  \
   61|  12.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  12.9k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_query_operation_name:
   60|  3.09k|    {                                                  \
   61|  3.09k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.09k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_has:
   60|  25.9k|    {                                                  \
   61|  25.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  25.9k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_dup:
   60|  21.6k|    {                                                  \
   61|  21.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.6k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_validate:
   60|  18.5k|    {                                                  \
   61|  18.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  18.5k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_match:
   60|  24.1k|    {                                                  \
   61|  24.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  24.1k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_import:
   60|  24.1k|    {                                                  \
   61|  24.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  24.1k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_import_types:
   60|  24.1k|    {                                                  \
   61|  24.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  24.1k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_export:
   60|  24.1k|    {                                                  \
   61|  24.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  24.1k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_export_types:
   60|  24.1k|    {                                                  \
   61|  24.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  24.1k|    }
signature.c:OSSL_FUNC_signature_newctx:
   60|  36.4k|    {                                                  \
   61|  36.4k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  36.4k|    }
signature.c:OSSL_FUNC_signature_sign_init:
   60|  24.7k|    {                                                  \
   61|  24.7k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  24.7k|    }
signature.c:OSSL_FUNC_signature_sign:
   60|  33.9k|    {                                                  \
   61|  33.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  33.9k|    }
signature.c:OSSL_FUNC_signature_sign_message_init:
   60|  31.5k|    {                                                  \
   61|  31.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  31.5k|    }
signature.c:OSSL_FUNC_signature_sign_message_update:
   60|  21.0k|    {                                                  \
   61|  21.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.0k|    }
signature.c:OSSL_FUNC_signature_sign_message_final:
   60|  21.0k|    {                                                  \
   61|  21.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.0k|    }
signature.c:OSSL_FUNC_signature_verify_init:
   60|  24.7k|    {                                                  \
   61|  24.7k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  24.7k|    }
signature.c:OSSL_FUNC_signature_verify:
   60|  33.9k|    {                                                  \
   61|  33.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  33.9k|    }
signature.c:OSSL_FUNC_signature_verify_message_init:
   60|  31.5k|    {                                                  \
   61|  31.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  31.5k|    }
signature.c:OSSL_FUNC_signature_verify_message_update:
   60|  21.0k|    {                                                  \
   61|  21.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.0k|    }
signature.c:OSSL_FUNC_signature_verify_message_final:
   60|  21.0k|    {                                                  \
   61|  21.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.0k|    }
signature.c:OSSL_FUNC_signature_verify_recover_init:
   60|  8.65k|    {                                                  \
   61|  8.65k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  8.65k|    }
signature.c:OSSL_FUNC_signature_verify_recover:
   60|  8.65k|    {                                                  \
   61|  8.65k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  8.65k|    }
signature.c:OSSL_FUNC_signature_digest_sign_init:
   60|  15.4k|    {                                                  \
   61|  15.4k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  15.4k|    }
signature.c:OSSL_FUNC_signature_digest_sign_update:
   60|  4.94k|    {                                                  \
   61|  4.94k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.94k|    }
signature.c:OSSL_FUNC_signature_digest_sign_final:
   60|  4.94k|    {                                                  \
   61|  4.94k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.94k|    }
signature.c:OSSL_FUNC_signature_digest_sign:
   60|  10.5k|    {                                                  \
   61|  10.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  10.5k|    }
signature.c:OSSL_FUNC_signature_digest_verify_init:
   60|  12.9k|    {                                                  \
   61|  12.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  12.9k|    }
signature.c:OSSL_FUNC_signature_digest_verify_update:
   60|  2.47k|    {                                                  \
   61|  2.47k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.47k|    }
signature.c:OSSL_FUNC_signature_digest_verify_final:
   60|  2.47k|    {                                                  \
   61|  2.47k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.47k|    }
signature.c:OSSL_FUNC_signature_digest_verify:
   60|  10.5k|    {                                                  \
   61|  10.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  10.5k|    }
signature.c:OSSL_FUNC_signature_freectx:
   60|  36.4k|    {                                                  \
   61|  36.4k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  36.4k|    }
signature.c:OSSL_FUNC_signature_dupctx:
   60|  36.4k|    {                                                  \
   61|  36.4k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  36.4k|    }
signature.c:OSSL_FUNC_signature_get_ctx_params:
   60|  33.9k|    {                                                  \
   61|  33.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  33.9k|    }
signature.c:OSSL_FUNC_signature_gettable_ctx_params:
   60|  33.9k|    {                                                  \
   61|  33.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  33.9k|    }
signature.c:OSSL_FUNC_signature_set_ctx_params:
   60|  36.4k|    {                                                  \
   61|  36.4k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  36.4k|    }
signature.c:OSSL_FUNC_signature_settable_ctx_params:
   60|  36.4k|    {                                                  \
   61|  36.4k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  36.4k|    }
signature.c:OSSL_FUNC_signature_get_ctx_md_params:
   60|  2.47k|    {                                                  \
   61|  2.47k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.47k|    }
signature.c:OSSL_FUNC_signature_gettable_ctx_md_params:
   60|  2.47k|    {                                                  \
   61|  2.47k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.47k|    }
signature.c:OSSL_FUNC_signature_set_ctx_md_params:
   60|  2.47k|    {                                                  \
   61|  2.47k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.47k|    }
signature.c:OSSL_FUNC_signature_settable_ctx_md_params:
   60|  2.47k|    {                                                  \
   61|  2.47k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.47k|    }
signature.c:OSSL_FUNC_signature_query_key_types:
   60|  22.2k|    {                                                  \
   61|  22.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  22.2k|    }
provider_core.c:OSSL_FUNC_provider_teardown:
   60|  1.31k|    {                                                  \
   61|  1.31k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.31k|    }
provider_core.c:OSSL_FUNC_provider_gettable_params:
   60|  1.48k|    {                                                  \
   61|  1.48k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.48k|    }
provider_core.c:OSSL_FUNC_provider_get_params:
   60|  1.48k|    {                                                  \
   61|  1.48k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.48k|    }
provider_core.c:OSSL_FUNC_provider_get_capabilities:
   60|    709|    {                                                  \
   61|    709|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    709|    }
provider_core.c:OSSL_FUNC_provider_query_operation:
   60|  1.48k|    {                                                  \
   61|  1.48k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.48k|    }
baseprov.c:OSSL_FUNC_core_gettable_params:
   60|    608|    {                                                  \
   61|    608|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    608|    }
baseprov.c:OSSL_FUNC_core_get_params:
   60|    608|    {                                                  \
   61|    608|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    608|    }
baseprov.c:OSSL_FUNC_core_get_libctx:
   60|    608|    {                                                  \
   61|    608|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    608|    }
defltprov.c:OSSL_FUNC_core_gettable_params:
   60|    709|    {                                                  \
   61|    709|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    709|    }
defltprov.c:OSSL_FUNC_core_get_params:
   60|    709|    {                                                  \
   61|    709|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    709|    }
defltprov.c:OSSL_FUNC_core_get_libctx:
   60|    709|    {                                                  \
   61|    709|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    709|    }
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|    709|    {                                                  \
   61|    709|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    709|    }
provider_seeding.c:OSSL_FUNC_get_user_entropy:
   60|    709|    {                                                  \
   61|    709|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    709|    }
provider_seeding.c:OSSL_FUNC_cleanup_entropy:
   60|    709|    {                                                  \
   61|    709|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    709|    }
provider_seeding.c:OSSL_FUNC_cleanup_user_entropy:
   60|    709|    {                                                  \
   61|    709|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    709|    }
provider_seeding.c:OSSL_FUNC_get_nonce:
   60|    709|    {                                                  \
   61|    709|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    709|    }
provider_seeding.c:OSSL_FUNC_get_user_nonce:
   60|    709|    {                                                  \
   61|    709|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    709|    }
provider_seeding.c:OSSL_FUNC_cleanup_nonce:
   60|    709|    {                                                  \
   61|    709|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    709|    }
provider_seeding.c:OSSL_FUNC_cleanup_user_nonce:
   60|    709|    {                                                  \
   61|    709|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    709|    }
drbg.c:OSSL_FUNC_rand_enable_locking:
   60|  1.58k|    {                                                  \
   61|  1.58k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.58k|    }
drbg.c:OSSL_FUNC_rand_lock:
   60|  1.58k|    {                                                  \
   61|  1.58k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.58k|    }
drbg.c:OSSL_FUNC_rand_unlock:
   60|  1.58k|    {                                                  \
   61|  1.58k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.58k|    }
drbg.c:OSSL_FUNC_rand_get_ctx_params:
   60|  1.58k|    {                                                  \
   61|  1.58k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.58k|    }
drbg.c:OSSL_FUNC_rand_get_seed:
   60|  1.58k|    {                                                  \
   61|  1.58k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.58k|    }
drbg.c:OSSL_FUNC_rand_clear_seed:
   60|  1.58k|    {                                                  \
   61|  1.58k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.58k|    }
evp_rand.c:OSSL_FUNC_rand_newctx:
   60|  3.15k|    {                                                  \
   61|  3.15k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.15k|    }
evp_rand.c:OSSL_FUNC_rand_freectx:
   60|  3.15k|    {                                                  \
   61|  3.15k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.15k|    }
evp_rand.c:OSSL_FUNC_rand_instantiate:
   60|  3.15k|    {                                                  \
   61|  3.15k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.15k|    }
evp_rand.c:OSSL_FUNC_rand_uninstantiate:
   60|  3.15k|    {                                                  \
   61|  3.15k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.15k|    }
evp_rand.c:OSSL_FUNC_rand_generate:
   60|  3.15k|    {                                                  \
   61|  3.15k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.15k|    }
evp_rand.c:OSSL_FUNC_rand_reseed:
   60|  3.15k|    {                                                  \
   61|  3.15k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.15k|    }
evp_rand.c:OSSL_FUNC_rand_nonce:
   60|    528|    {                                                  \
   61|    528|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    528|    }
evp_rand.c:OSSL_FUNC_rand_enable_locking:
   60|  3.15k|    {                                                  \
   61|  3.15k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.15k|    }
evp_rand.c:OSSL_FUNC_rand_lock:
   60|  3.15k|    {                                                  \
   61|  3.15k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.15k|    }
evp_rand.c:OSSL_FUNC_rand_unlock:
   60|  3.15k|    {                                                  \
   61|  3.15k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.15k|    }
evp_rand.c:OSSL_FUNC_rand_gettable_ctx_params:
   60|  3.15k|    {                                                  \
   61|  3.15k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.15k|    }
evp_rand.c:OSSL_FUNC_rand_settable_ctx_params:
   60|  2.11k|    {                                                  \
   61|  2.11k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.11k|    }
evp_rand.c:OSSL_FUNC_rand_get_ctx_params:
   60|  3.15k|    {                                                  \
   61|  3.15k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.15k|    }
evp_rand.c:OSSL_FUNC_rand_set_ctx_params:
   60|  2.11k|    {                                                  \
   61|  2.11k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.11k|    }
evp_rand.c:OSSL_FUNC_rand_verify_zeroization:
   60|  3.15k|    {                                                  \
   61|  3.15k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.15k|    }
evp_rand.c:OSSL_FUNC_rand_get_seed:
   60|  3.15k|    {                                                  \
   61|  3.15k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.15k|    }
evp_rand.c:OSSL_FUNC_rand_clear_seed:
   60|  2.62k|    {                                                  \
   61|  2.62k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.62k|    }

ssl_lib.c:ERR_GET_LIB:
  225|  1.74k|{
  226|  1.74k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|  1.74k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|  1.74k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 1.74k]
  |  |  ------------------
  ------------------
  227|      0|        return ERR_LIB_SYS;
  ------------------
  |  |   55|      0|#define ERR_LIB_SYS 2
  ------------------
  228|  1.74k|    return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  209|  1.74k|#define ERR_LIB_OFFSET 23L
  ------------------
                  return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  210|  1.74k|#define ERR_LIB_MASK 0xFF
  ------------------
  229|  1.74k|}
conf_mod.c:ERR_GET_REASON:
  239|      1|{
  240|      1|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|      1|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|      1|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  241|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|      1|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|      1|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|      1|}
err.c:ERR_GET_LIB:
  225|  7.92k|{
  226|  7.92k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|  7.92k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|  7.92k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 64, False: 7.86k]
  |  |  ------------------
  ------------------
  227|     64|        return ERR_LIB_SYS;
  ------------------
  |  |   55|     64|#define ERR_LIB_SYS 2
  ------------------
  228|  7.86k|    return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  209|  7.86k|#define ERR_LIB_OFFSET 23L
  ------------------
                  return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  210|  7.86k|#define ERR_LIB_MASK 0xFF
  ------------------
  229|  7.92k|}
err.c:ERR_GET_REASON:
  239|  1.25k|{
  240|  1.25k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|  1.25k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|  1.25k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 32, False: 1.22k]
  |  |  ------------------
  ------------------
  241|     32|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|     32|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|  1.22k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|  1.22k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|  1.25k|}
pem_info.c:ERR_GET_REASON:
  239|  2.88k|{
  240|  2.88k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|  2.88k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|  2.88k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 2.88k]
  |  |  ------------------
  ------------------
  241|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|  2.88k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|  2.88k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|  2.88k|}
pem_lib.c:ERR_GET_REASON:
  239|  2.44k|{
  240|  2.44k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|  2.44k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|  2.44k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 2.44k]
  |  |  ------------------
  ------------------
  241|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|  2.44k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|  2.44k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|  2.44k|}
by_file.c:ERR_GET_REASON:
  239|  2.44k|{
  240|  2.44k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|  2.44k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|  2.44k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 2.44k]
  |  |  ------------------
  ------------------
  241|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|  2.44k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|  2.44k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|  2.44k|}
a_d2i_fp.c:ERR_GET_REASON:
  239|   695k|{
  240|   695k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|   695k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|   695k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 695k]
  |  |  ------------------
  ------------------
  241|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|   695k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|   695k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|   695k|}
conf_def.c:ERR_GET_REASON:
  239|    709|{
  240|    709|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|    709|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|    709|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 709]
  |  |  ------------------
  ------------------
  241|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|    709|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|    709|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|    709|}

ssl_lib.c:lh_SSL_SESSION_new:
  334|  2.44k|    {                                                                                                                      \
  335|  2.44k|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|  2.44k|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|  2.44k|            lh_##type##_doall_thunk,                                                                                       \
  338|  2.44k|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|  2.44k|    }                                                                                                                      \
ssl_lib.c:lh_SSL_SESSION_hfn_thunk:
  260|      5|    {                                                                                                                      \
  261|      5|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|      5|        return hfn_conv((const type *)data);                                                                               \
  263|      5|    }                                                                                                                      \
ssl_lib.c:lh_SSL_SESSION_free:
  271|  2.44k|    {                                                                                                                      \
  272|  2.44k|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|  2.44k|    }                                                                                                                      \
ssl_sess.c:lh_SSL_SESSION_retrieve:
  291|      5|    {                                                                                                                      \
  292|      5|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|      5|    }                                                                                                                      \
ssl_sess.c:lh_SSL_SESSION_get_down_load:
  306|  2.44k|    {                                                                                                                      \
  307|  2.44k|        return OPENSSL_LH_get_down_load((OPENSSL_LHASH *)lh);                                                              \
  308|  2.44k|    }                                                                                                                      \
ssl_sess.c:lh_SSL_SESSION_set_down_load:
  311|  4.89k|    {                                                                                                                      \
  312|  4.89k|        OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl);                                                                 \
  313|  4.89k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_new:
  334|    709|    {                                                                                                                      \
  335|    709|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|    709|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|    709|            lh_##type##_doall_thunk,                                                                                       \
  338|    709|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|    709|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_hfn_thunk:
  260|   347k|    {                                                                                                                      \
  261|   347k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   347k|        return hfn_conv((const type *)data);                                                                               \
  263|   347k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_cfn_thunk:
  265|   347k|    {                                                                                                                      \
  266|   347k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|   347k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|   347k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_doall:
  328|  2.25k|    {                                                                                                                      \
  329|  2.25k|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|  2.25k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_free:
  271|    708|    {                                                                                                                      \
  272|    708|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|    708|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_flush:
  276|  1.54k|    {                                                                                                                      \
  277|  1.54k|        OPENSSL_LH_flush((OPENSSL_LHASH *)lh);                                                                             \
  278|  1.54k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_retrieve:
  291|   347k|    {                                                                                                                      \
  292|   347k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   347k|    }                                                                                                                      \
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.04k|    {                                                                                                          \
  209|  6.04k|        return (OPENSSL_LHASH *)lh;                                                                            \
  210|  6.04k|    }                                                                                                          \
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.04k|    {                                                                                                          \
  173|  6.04k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                        \
  174|  6.04k|        return hfn_conv((const type *)data);                                                                   \
  175|  6.04k|    }                                                                                                          \
err.c:lh_ERR_STRING_DATA_comp_thunk:
  177|  4.52k|    {                                                                                                          \
  178|  4.52k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                \
  179|  4.52k|        return cfn_conv((const type *)da, (const type *)db);                                                   \
  180|  4.52k|    }                                                                                                          \
err.c:ossl_check_ERR_STRING_DATA_lh_plain_type:
  193|  4.74k|    {                                                                                                          \
  194|  4.74k|        return ptr;                                                                                            \
  195|  4.74k|    }                                                                                                          \
err.c:ossl_check_const_ERR_STRING_DATA_lh_plain_type:
  198|  1.29k|    {                                                                                                          \
  199|  1.29k|        return ptr;                                                                                            \
  200|  1.29k|    }                                                                                                          \
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|   683k|    {                                                                                                                      \
  261|   683k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   683k|        return hfn_conv((const type *)data);                                                                               \
  263|   683k|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_cfn_thunk:
  265|   581k|    {                                                                                                                      \
  266|   581k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|   581k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|   581k|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_retrieve:
  291|   682k|    {                                                                                                                      \
  292|   682k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   682k|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_insert:
  281|    424|    {                                                                                                                      \
  282|    424|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|    424|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_error:
  296|    242|    {                                                                                                                      \
  297|    242|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|    242|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_doall_OBJ_DOALL:
  371|  1.23k|    {                                                                                       \
  372|  1.23k|        OPENSSL_LH_doall_arg_thunk((OPENSSL_LHASH *)lh,                                     \
  373|  1.23k|            lh_##type##_doall_##argtype##_thunk,                                            \
  374|  1.23k|            (OPENSSL_LH_DOALL_FUNCARG)fn,                                                   \
  375|  1.23k|            (void *)arg);                                                                   \
  376|  1.23k|    }                                                                                       \
o_names.c:lh_OBJ_NAME_doall_OBJ_DOALL_thunk:
  363|   299k|    {                                                                                       \
  364|   299k|        void (*fn_conv)(cbargtype *, argtype *) = (void (*)(cbargtype *, argtype *))fn;     \
  365|   299k|        fn_conv((cbargtype *)node, (argtype *)arg);                                         \
  366|   299k|    }                                                                                       \
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|   297k|    {                                                                                                                      \
  261|   297k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   297k|        return hfn_conv((const type *)data);                                                                               \
  263|   297k|    }                                                                                                                      \
obj_dat.c:lh_ADDED_OBJ_retrieve:
  291|   297k|    {                                                                                                                      \
  292|   297k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   297k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_doall:
  328|    708|    {                                                                                                                      \
  329|    708|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|    708|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_free:
  271|    708|    {                                                                                                                      \
  272|    708|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|    708|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_new:
  334|    709|    {                                                                                                                      \
  335|    709|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|    709|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|    709|            lh_##type##_doall_thunk,                                                                                       \
  338|    709|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|    709|    }                                                                                                                      \
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.13k|    {                                                                                                                      \
  317|  1.13k|        void (*doall_conv)(type *) = (void (*)(type *))doall;                                                              \
  318|  1.13k|        doall_conv((type *)node);                                                                                          \
  319|  1.13k|    }                                                                                                                      \
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.14k|    {                                                                                                                      \
  282|  1.14k|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|  1.14k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_error:
  296|  1.14k|    {                                                                                                                      \
  297|  1.14k|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|  1.14k|    }                                                                                                                      \
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|   552k|    {                                                                                                                      \
  261|   552k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   552k|        return hfn_conv((const type *)data);                                                                               \
  263|   552k|    }                                                                                                                      \
property.c:lh_QUERY_cfn_thunk:
  265|   490k|    {                                                                                                                      \
  266|   490k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|   490k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|   490k|    }                                                                                                                      \
property.c:lh_QUERY_doall_thunk:
  316|  29.8k|    {                                                                                                                      \
  317|  29.8k|        void (*doall_conv)(type *) = (void (*)(type *))doall;                                                              \
  318|  29.8k|        doall_conv((type *)node);                                                                                          \
  319|  29.8k|    }                                                                                                                      \
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|   167k|    {                                                                                                                      \
  272|   167k|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|   167k|    }                                                                                                                      \
property.c:lh_QUERY_num_items:
  301|  1.07k|    {                                                                                                                      \
  302|  1.07k|        return OPENSSL_LH_num_items((OPENSSL_LHASH *)lh);                                                                  \
  303|  1.07k|    }                                                                                                                      \
property.c:lh_QUERY_flush:
  276|  1.07k|    {                                                                                                                      \
  277|  1.07k|        OPENSSL_LH_flush((OPENSSL_LHASH *)lh);                                                                             \
  278|  1.07k|    }                                                                                                                      \
property.c:lh_QUERY_retrieve:
  291|   522k|    {                                                                                                                      \
  292|   522k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   522k|    }                                                                                                                      \
property.c:lh_QUERY_insert:
  281|  29.8k|    {                                                                                                                      \
  282|  29.8k|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|  29.8k|    }                                                                                                                      \
property.c:lh_QUERY_error:
  296|  29.8k|    {                                                                                                                      \
  297|  29.8k|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|  29.8k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_doall:
  328|  1.41k|    {                                                                                                                      \
  329|  1.41k|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|  1.41k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_free:
  271|  1.41k|    {                                                                                                                      \
  272|  1.41k|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|  1.41k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_new:
  334|  1.41k|    {                                                                                                                      \
  335|  1.41k|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|  1.41k|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|  1.41k|            lh_##type##_doall_thunk,                                                                                       \
  338|  1.41k|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|  1.41k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_hfn_thunk:
  260|   140k|    {                                                                                                                      \
  261|   140k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   140k|        return hfn_conv((const type *)data);                                                                               \
  263|   140k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_cfn_thunk:
  265|  28.4k|    {                                                                                                                      \
  266|  28.4k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|  28.4k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|  28.4k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_doall_thunk:
  316|  7.28k|    {                                                                                                                      \
  317|  7.28k|        void (*doall_conv)(type *) = (void (*)(type *))doall;                                                              \
  318|  7.28k|        doall_conv((type *)node);                                                                                          \
  319|  7.28k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_retrieve:
  291|   133k|    {                                                                                                                      \
  292|   133k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   133k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_insert:
  281|  7.30k|    {                                                                                                                      \
  282|  7.30k|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|  7.30k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_error:
  296|  7.30k|    {                                                                                                                      \
  297|  7.30k|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|  7.30k|    }                                                                                                                      \

OBJ_bsearch_ssl_cipher_id:
  142|    142|    {                                                                  \
  143|    142|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),    \
  144|    142|            nm##_cmp_BSEARCH_CMP_FN);                                  \
  145|    142|    }                                                                  \
ssl_lib.c:ssl_cipher_id_cmp_BSEARCH_CMP_FN:
  136|    651|    {                                                                  \
  137|    651|        type1 const *a = a_;                                           \
  138|    651|        type2 const *b = b_;                                           \
  139|    651|        return nm##_cmp(a, b);                                         \
  140|    651|    }                                                                  \
obj_dat.c:OBJ_bsearch_ln:
  128|  98.8k|    {                                                                      \
  129|  98.8k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|  98.8k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|  98.8k|    }                                                                      \
obj_dat.c:ln_cmp_BSEARCH_CMP_FN:
  122|   988k|    {                                                                      \
  123|   988k|        type1 const *a = a_;                                               \
  124|   988k|        type2 const *b = b_;                                               \
  125|   988k|        return nm##_cmp(a, b);                                             \
  126|   988k|    }                                                                      \
obj_dat.c:OBJ_bsearch_sn:
  128|   127k|    {                                                                      \
  129|   127k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|   127k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|   127k|    }                                                                      \
obj_dat.c:sn_cmp_BSEARCH_CMP_FN:
  122|  1.33M|    {                                                                      \
  123|  1.33M|        type1 const *a = a_;                                               \
  124|  1.33M|        type2 const *b = b_;                                               \
  125|  1.33M|        return nm##_cmp(a, b);                                             \
  126|  1.33M|    }                                                                      \
obj_dat.c:OBJ_bsearch_obj:
  128|  5.88M|    {                                                                      \
  129|  5.88M|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|  5.88M|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|  5.88M|    }                                                                      \
obj_dat.c:obj_cmp_BSEARCH_CMP_FN:
  122|  57.0M|    {                                                                      \
  123|  57.0M|        type1 const *a = a_;                                               \
  124|  57.0M|        type2 const *b = b_;                                               \
  125|  57.0M|        return nm##_cmp(a, b);                                             \
  126|  57.0M|    }                                                                      \
obj_xref.c:OBJ_bsearch_sig:
  128|   585k|    {                                                                      \
  129|   585k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|   585k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|   585k|    }                                                                      \
obj_xref.c:sig_cmp_BSEARCH_CMP_FN:
  122|  2.93M|    {                                                                      \
  123|  2.93M|        type1 const *a = a_;                                               \
  124|  2.93M|        type2 const *b = b_;                                               \
  125|  2.93M|        return nm##_cmp(a, b);                                             \
  126|  2.93M|    }                                                                      \
v3_lib.c:OBJ_bsearch_ext:
  128|   949k|    {                                                                      \
  129|   949k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|   949k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|   949k|    }                                                                      \
v3_lib.c:ext_cmp_BSEARCH_CMP_FN:
  122|  4.77M|    {                                                                      \
  123|  4.77M|        type1 const *a = a_;                                               \
  124|  4.77M|        type2 const *b = b_;                                               \
  125|  4.77M|        return nm##_cmp(a, b);                                             \
  126|  4.77M|    }                                                                      \
v3_purp.c:OBJ_bsearch_nid:
  128|   568k|    {                                                                      \
  129|   568k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|   568k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|   568k|    }                                                                      \
v3_purp.c:nid_cmp_BSEARCH_CMP_FN:
  122|  1.42M|    {                                                                      \
  123|  1.42M|        type1 const *a = a_;                                               \
  124|  1.42M|        type2 const *b = b_;                                               \
  125|  1.42M|        return nm##_cmp(a, b);                                             \
  126|  1.42M|    }                                                                      \
ameth_lib.c:OBJ_bsearch_ameth:
  128|   925k|    {                                                                      \
  129|   925k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|   925k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|   925k|    }                                                                      \
ameth_lib.c:ameth_cmp_BSEARCH_CMP_FN:
  122|  2.67M|    {                                                                      \
  123|  2.67M|        type1 const *a = a_;                                               \
  124|  2.67M|        type2 const *b = b_;                                               \
  125|  2.67M|        return nm##_cmp(a, b);                                             \
  126|  2.67M|    }                                                                      \

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

s3_lib.c:ossl_check_X509_NAME_sk_type:
   63|  8.83k|    {                                                                                                                    \
   64|  8.83k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  8.83k|    }                                                                                                                    \
s3_lib.c:ossl_check_X509_NAME_freefunc_type:
   75|  8.83k|    {                                                                                                                    \
   76|  8.83k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  8.83k|    }
ssl_ciph.c:ossl_check_const_SSL_CIPHER_sk_type:
   59|   253k|    {                                                                                                                    \
   60|   253k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|   253k|    }                                                                                                                    \
ssl_ciph.c:ossl_check_SSL_CIPHER_sk_type:
   63|   178k|    {                                                                                                                    \
   64|   178k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   178k|    }                                                                                                                    \
ssl_ciph.c:ossl_check_SSL_CIPHER_type:
   55|   163k|    {                                                                                                                    \
   56|   163k|        return ptr;                                                                                                      \
   57|   163k|    }                                                                                                                    \
ssl_ciph.c:ossl_check_SSL_CIPHER_compfunc_type:
   67|  2.96k|    {                                                                                                                    \
   68|  2.96k|        return (OPENSSL_sk_compfunc)cmp;                                                                                 \
   69|  2.96k|    }                                                                                                                    \
ssl_lib.c:ossl_check_const_SSL_CIPHER_sk_type:
   59|   636k|    {                                                                                                                    \
   60|   636k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|   636k|    }                                                                                                                    \
ssl_lib.c:sk_danetls_record_pop_free:
  170|  1.76k|    {                                                                                                                      \
  171|  1.76k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  1.76k|                                                                                                                           \
  173|  1.76k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  1.76k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  1.76k|                                                                                                                           \
  176|  1.76k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  1.76k|    }                                                                                                                      \
ssl_lib.c:ossl_check_SSL_CIPHER_sk_type:
   63|   162k|    {                                                                                                                    \
   64|   162k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   162k|    }                                                                                                                    \
ssl_lib.c:ossl_check_X509_EXTENSION_sk_type:
   63|  1.76k|    {                                                                                                                    \
   64|  1.76k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  1.76k|    }                                                                                                                    \
ssl_lib.c:ossl_check_X509_EXTENSION_freefunc_type:
   75|  1.76k|    {                                                                                                                    \
   76|  1.76k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  1.76k|    }
ssl_lib.c:ossl_check_OCSP_RESPID_sk_type:
   63|  1.76k|    {                                                                                                                    \
   64|  1.76k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  1.76k|    }                                                                                                                    \
ssl_lib.c:ossl_check_OCSP_RESPID_freefunc_type:
   75|  1.76k|    {                                                                                                                    \
   76|  1.76k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  1.76k|    }
ssl_lib.c:sk_OCSP_RESPONSE_pop_free:
  170|  1.76k|    {                                                                                                                      \
  171|  1.76k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  1.76k|                                                                                                                           \
  173|  1.76k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  1.76k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  1.76k|                                                                                                                           \
  176|  1.76k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  1.76k|    }                                                                                                                      \
ssl_lib.c:ossl_check_X509_NAME_sk_type:
   63|  8.42k|    {                                                                                                                    \
   64|  8.42k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  8.42k|    }                                                                                                                    \
ssl_lib.c:ossl_check_X509_NAME_freefunc_type:
   75|  8.42k|    {                                                                                                                    \
   76|  8.42k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  8.42k|    }
ssl_lib.c:ossl_check_SRTP_PROTECTION_PROFILE_sk_type:
   63|  4.21k|    {                                                                                                                    \
   64|  4.21k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  4.21k|    }                                                                                                                    \
ssl_lib.c:ossl_check_SSL_CIPHER_type:
   55|   147k|    {                                                                                                                    \
   56|   147k|        return ptr;                                                                                                      \
   57|   147k|    }                                                                                                                    \
ssl_sess.c:sk_SSL_SESSION_new_null:
  115|  2.44k|    {                                                                                                                      \
  116|  2.44k|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|  2.44k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|  2.44k|                                                                                                                           \
  119|  2.44k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|  2.44k|                                                                                                                           \
  121|  2.44k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|  2.44k|    }                                                                                                                      \
ssl_sess.c:sk_SSL_SESSION_pop_free:
  170|  2.44k|    {                                                                                                                      \
  171|  2.44k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  2.44k|                                                                                                                           \
  173|  2.44k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  2.44k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  2.44k|                                                                                                                           \
  176|  2.44k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  2.44k|    }                                                                                                                      \
extensions.c:sk_OCSP_RESPONSE_pop_free:
  170|     97|    {                                                                                                                      \
  171|     97|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|     97|                                                                                                                           \
  173|     97|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|     97|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|     97|                                                                                                                           \
  176|     97|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|     97|    }                                                                                                                      \
extensions.c:ossl_check_const_X509_NAME_sk_type:
   59|  1.66k|    {                                                                                                                    \
   60|  1.66k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  1.66k|    }                                                                                                                    \
extensions_clnt.c:ossl_check_const_SSL_CIPHER_sk_type:
   59|  16.7k|    {                                                                                                                    \
   60|  16.7k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  16.7k|    }                                                                                                                    \
extensions_clnt.c:ossl_check_SSL_CIPHER_sk_type:
   63|  5.13k|    {                                                                                                                    \
   64|  5.13k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  5.13k|    }                                                                                                                    \
extensions_clnt.c:ossl_check_const_OCSP_RESPID_sk_type:
   59|      2|    {                                                                                                                    \
   60|      2|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|      2|    }                                                                                                                    \
statem_clnt.c:ossl_check_SSL_CIPHER_sk_type:
   63|     38|    {                                                                                                                    \
   64|     38|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|     38|    }                                                                                                                    \
statem_clnt.c:ossl_check_SSL_CIPHER_type:
   55|     38|    {                                                                                                                    \
   56|     38|        return ptr;                                                                                                      \
   57|     38|    }                                                                                                                    \
tasn_dec.c:ossl_check_ASN1_VALUE_sk_type:
   63|  6.18M|    {                                                                                                                    \
   64|  6.18M|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  6.18M|    }                                                                                                                    \
tasn_dec.c:ossl_check_ASN1_VALUE_type:
   55|  6.18M|    {                                                                                                                    \
   56|  6.18M|        return ptr;                                                                                                      \
   57|  6.18M|    }                                                                                                                    \
tasn_enc.c:sk_const_ASN1_VALUE_num:
   98|  17.2M|    {                                                                                                                      \
   99|  17.2M|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  17.2M|    }                                                                                                                      \
tasn_enc.c:sk_const_ASN1_VALUE_value:
  102|  7.39M|    {                                                                                                                      \
  103|  7.39M|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  7.39M|    }                                                                                                                      \
tasn_fre.c:ossl_check_const_ASN1_VALUE_sk_type:
   59|  4.47M|    {                                                                                                                    \
   60|  4.47M|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  4.47M|    }                                                                                                                    \
tasn_fre.c:ossl_check_ASN1_VALUE_sk_type:
   63|  1.96M|    {                                                                                                                    \
   64|  1.96M|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  1.96M|    }                                                                                                                    \
ct_log.c:ossl_check_CTLOG_sk_type:
   63|  2.44k|    {                                                                                                                    \
   64|  2.44k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  2.44k|    }                                                                                                                    \
ct_log.c:ossl_check_CTLOG_freefunc_type:
   75|  2.44k|    {                                                                                                                    \
   76|  2.44k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  2.44k|    }
ct_sct.c:ossl_check_SCT_sk_type:
   63|  1.76k|    {                                                                                                                    \
   64|  1.76k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  1.76k|    }                                                                                                                    \
ct_sct.c:ossl_check_SCT_freefunc_type:
   75|  1.76k|    {                                                                                                                    \
   76|  1.76k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  1.76k|    }
dso_lib.c:ossl_check_void_sk_type:
   63|     83|    {                                                                                                                    \
   64|     83|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|     83|    }                                                                                                                    \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_new_null:
  115|      2|    {                                                                                                                      \
  116|      2|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|      2|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|      2|                                                                                                                           \
  119|      2|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|      2|                                                                                                                           \
  121|      2|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|      2|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_push:
  154|     11|    {                                                                                                                      \
  155|     11|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|     11|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_new_null:
  115|      2|    {                                                                                                                      \
  116|      2|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|      2|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|      2|                                                                                                                           \
  119|      2|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|      2|                                                                                                                           \
  121|      2|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|      2|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_freefunc_thunk:
   85|    152|    {                                                                                                                      \
   86|    152|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|    152|        freefunc((t3 *)ptr);                                                                                               \
   88|    152|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_push:
  154|    152|    {                                                                                                                      \
  155|    152|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|    152|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_num:
   98|      2|    {                                                                                                                      \
   99|      2|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|      2|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_num:
   98|   695k|    {                                                                                                                      \
   99|   695k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   695k|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_set_cmp_func:
  220|      4|    {                                                                                                                      \
  221|      4|        return (sk_##t1##_compfunc)OPENSSL_sk_set_cmp_func((OPENSSL_STACK *)sk, (OPENSSL_sk_compfunc)compare);             \
  222|      4|    }
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_value:
  102|  2.67M|    {                                                                                                                      \
  103|  2.67M|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  2.67M|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_sort:
  200|      2|    {                                                                                                                      \
  201|      2|        OPENSSL_sk_sort((OPENSSL_STACK *)sk);                                                                              \
  202|      2|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_value:
  102|  1.67k|    {                                                                                                                      \
  103|  1.67k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  1.67k|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_pop_free:
  170|      2|    {                                                                                                                      \
  171|      2|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|      2|                                                                                                                           \
  173|      2|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|      2|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|      2|                                                                                                                           \
  176|      2|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|      2|    }                                                                                                                      \
decoder_meth.c:sk_OSSL_DECODER_INSTANCE_pop_free:
  170|   347k|    {                                                                                                                      \
  171|   347k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|   347k|                                                                                                                           \
  173|   347k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|   347k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|   347k|                                                                                                                           \
  176|   347k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|   347k|    }                                                                                                                      \
decoder_meth.c:sk_OSSL_DECODER_INSTANCE_freefunc_thunk:
   85|  1.97M|    {                                                                                                                      \
   86|  1.97M|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|  1.97M|        freefunc((t3 *)ptr);                                                                                               \
   88|  1.97M|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_new_null:
  115|      2|    {                                                                                                                      \
  116|      2|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|      2|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|      2|                                                                                                                           \
  119|      2|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|      2|                                                                                                                           \
  121|      2|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|      2|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_freefunc_thunk:
   85|   460k|    {                                                                                                                      \
   86|   460k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|   460k|        freefunc((t3 *)ptr);                                                                                               \
   88|   460k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_push:
  154|      3|    {                                                                                                                      \
  155|      3|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|      3|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_num:
   98|   347k|    {                                                                                                                      \
   99|   347k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   347k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_value:
  102|   347k|    {                                                                                                                      \
  103|   347k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|   347k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_pop_free:
  170|   347k|    {                                                                                                                      \
  171|   347k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|   347k|                                                                                                                           \
  173|   347k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|   347k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|   347k|                                                                                                                           \
  176|   347k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|   347k|    }                                                                                                                      \
decoder_pkey.c:sk_OSSL_DECODER_INSTANCE_deep_copy:
  214|   347k|    {                                                                                                                      \
  215|   347k|        return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk,                                             \
  216|   347k|            (OPENSSL_sk_copyfunc)copyfunc,                                                                                 \
  217|   347k|            (OPENSSL_sk_freefunc)freefunc);                                                                                \
  218|   347k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_deep_copy:
  214|   347k|    {                                                                                                                      \
  215|   347k|        return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk,                                             \
  216|   347k|            (OPENSSL_sk_copyfunc)copyfunc,                                                                                 \
  217|   347k|            (OPENSSL_sk_freefunc)freefunc);                                                                                \
  218|   347k|    }                                                                                                                      \
keymgmt_lib.c:sk_OP_CACHE_ELEM_pop_free:
  170|   704k|    {                                                                                                                      \
  171|   704k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|   704k|                                                                                                                           \
  173|   704k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|   704k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|   704k|                                                                                                                           \
  176|   704k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|   704k|    }                                                                                                                      \
p_lib.c:ossl_check_X509_ATTRIBUTE_sk_type:
   63|   704k|    {                                                                                                                    \
   64|   704k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   704k|    }                                                                                                                    \
p_lib.c:ossl_check_X509_ATTRIBUTE_freefunc_type:
   75|   704k|    {                                                                                                                    \
   76|   704k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|   704k|    }
core_namemap.c:sk_NAMES_value:
  102|   688k|    {                                                                                                                      \
  103|   688k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|   688k|    }                                                                                                                      \
core_namemap.c:ossl_check_const_OPENSSL_STRING_sk_type:
   59|  4.07M|    {                                                                                                                    \
   60|  4.07M|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  4.07M|    }                                                                                                                    \
core_namemap.c:ossl_check_OPENSSL_STRING_sk_type:
   63|  1.00M|    {                                                                                                                    \
   64|  1.00M|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  1.00M|    }                                                                                                                    \
core_namemap.c:sk_OPENSSL_STRING_freefunc_thunk:
   42|   368k|    {                                                                                                                    \
   43|   368k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                  \
   44|   368k|        freefunc((t3 *)ptr);                                                                                             \
   45|   368k|    }                                                                                                                    \
core_namemap.c:ossl_check_OPENSSL_STRING_type:
   55|   369k|    {                                                                                                                    \
   56|   369k|        return ptr;                                                                                                      \
   57|   369k|    }                                                                                                                    \
core_namemap.c:sk_NAMES_push:
  154|   159k|    {                                                                                                                      \
  155|   159k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|   159k|    }                                                                                                                      \
core_namemap.c:sk_NAMES_num:
   98|   159k|    {                                                                                                                      \
   99|   159k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   159k|    }                                                                                                                      \
core_namemap.c:ossl_check_OPENSSL_STRING_freefunc_type:
   75|   159k|    {                                                                                                                    \
   76|   159k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|   159k|    }
core_namemap.c:sk_NAMES_new_null:
  115|    709|    {                                                                                                                      \
  116|    709|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|    709|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|    709|                                                                                                                           \
  119|    709|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|    709|                                                                                                                           \
  121|    709|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|    709|    }                                                                                                                      \
core_namemap.c:sk_NAMES_freefunc_thunk:
   85|   159k|    {                                                                                                                      \
   86|   159k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|   159k|        freefunc((t3 *)ptr);                                                                                               \
   88|   159k|    }                                                                                                                      \
core_namemap.c:sk_NAMES_pop_free:
  170|    708|    {                                                                                                                      \
  171|    708|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|    708|                                                                                                                           \
  173|    708|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|    708|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|    708|                                                                                                                           \
  176|    708|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|    708|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_pop_free:
  170|  12.7k|    {                                                                                                                      \
  171|  12.7k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  12.7k|                                                                                                                           \
  173|  12.7k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  12.7k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  12.7k|                                                                                                                           \
  176|  12.7k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  12.7k|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_num:
   98|  7.74M|    {                                                                                                                      \
   99|  7.74M|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  7.74M|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_new_null:
  115|      1|    {                                                                                                                      \
  116|      1|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|      1|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|      1|                                                                                                                           \
  119|      1|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|      1|                                                                                                                           \
  121|      1|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|      1|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_push:
  154|      2|    {                                                                                                                      \
  155|      2|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|      2|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_set:
  183|      1|    {                                                                                                                      \
  184|      1|        return (t2 *)OPENSSL_sk_set((OPENSSL_STACK *)sk, idx, (const void *)ptr);                                          \
  185|      1|    }                                                                                                                      \
ex_data.c:ossl_check_const_void_sk_type:
   59|  1.76k|    {                                                                                                                    \
   60|  1.76k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  1.76k|    }                                                                                                                    \
ex_data.c:ossl_check_void_sk_type:
   63|  3.87M|    {                                                                                                                    \
   64|  3.87M|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  3.87M|    }                                                                                                                    \
ex_data.c:ossl_check_void_type:
   55|  3.53k|    {                                                                                                                    \
   56|  3.53k|        return ptr;                                                                                                      \
   57|  3.53k|    }                                                                                                                    \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_new_null:
  115|      1|    {                                                                                                                      \
  116|      1|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|      1|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|      1|                                                                                                                           \
  119|      1|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|      1|                                                                                                                           \
  121|      1|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|      1|    }                                                                                                                      \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_push:
  154|      1|    {                                                                                                                      \
  155|      1|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|      1|    }                                                                                                                      \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_num:
   98|  3.13k|    {                                                                                                                      \
   99|  3.13k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  3.13k|    }                                                                                                                      \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_value:
  102|  1.56k|    {                                                                                                                      \
  103|  1.56k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  1.56k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_new_null:
  115|  3.09k|    {                                                                                                                      \
  116|  3.09k|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|  3.09k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|  3.09k|                                                                                                                           \
  119|  3.09k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|  3.09k|                                                                                                                           \
  121|  3.09k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|  3.09k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_pop:
  162|  3.09k|    {                                                                                                                      \
  163|  3.09k|        return (t2 *)OPENSSL_sk_pop((OPENSSL_STACK *)sk);                                                                  \
  164|  3.09k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_free:
  137|  3.09k|    {                                                                                                                      \
  138|  3.09k|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  139|  3.09k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_push:
  154|  3.09k|    {                                                                                                                      \
  155|  3.09k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|  3.09k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_num:
   98|  12.3k|    {                                                                                                                      \
   99|  12.3k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  12.3k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_value:
  102|  3.09k|    {                                                                                                                      \
  103|  3.09k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  3.09k|    }                                                                                                                      \
provider_conf.c:sk_OSSL_PROVIDER_pop_free:
  170|    708|    {                                                                                                                      \
  171|    708|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|    708|                                                                                                                           \
  173|    708|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|    708|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|    708|                                                                                                                           \
  176|    708|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|    708|    }                                                                                                                      \
provider_core.c:sk_INFOPAIR_pop_free:
  170|  1.56k|    {                                                                                                                      \
  171|  1.56k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  1.56k|                                                                                                                           \
  173|  1.56k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  1.56k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  1.56k|                                                                                                                           \
  176|  1.56k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  1.56k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_pop_free:
  170|    708|    {                                                                                                                      \
  171|    708|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|    708|                                                                                                                           \
  173|    708|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|    708|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|    708|                                                                                                                           \
  176|    708|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|    708|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_freefunc_thunk:
   85|  1.48k|    {                                                                                                                      \
   86|  1.48k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|  1.48k|        freefunc((t3 *)ptr);                                                                                               \
   88|  1.48k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_CHILD_CB_pop_free:
  170|    708|    {                                                                                                                      \
  171|    708|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|    708|                                                                                                                           \
  173|    708|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|    708|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|    708|                                                                                                                           \
  176|    708|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|    708|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_new:
  106|    709|    {                                                                                                                      \
  107|    709|        OPENSSL_STACK *ret = OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);                                                 \
  108|    709|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  109|    709|                                                                                                                           \
  110|    709|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  111|    709|        OPENSSL_sk_set_cmp_thunks(ret, sk_##t1##_cmpfunc_thunk);                                                           \
  112|    709|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  113|    709|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_cmpfunc_thunk:
   90|  7.45k|    {                                                                                                                      \
   91|  7.45k|        int (*realcmp)(const t3 *const *a, const t3 *const *b) = (int (*)(const t3 *const *a, const t3 *const *b))(cmp);   \
   92|  7.45k|        const t3 *const *at = (const t3 *const *)a;                                                                        \
   93|  7.45k|        const t3 *const *bt = (const t3 *const *)b;                                                                        \
   94|  7.45k|                                                                                                                           \
   95|  7.45k|        return realcmp(at, bt);                                                                                            \
   96|  7.45k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_CHILD_CB_new_null:
  115|    709|    {                                                                                                                      \
  116|    709|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|    709|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|    709|                                                                                                                           \
  119|    709|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|    709|                                                                                                                           \
  121|    709|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|    709|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_is_sorted:
  204|  4.18k|    {                                                                                                                      \
  205|  4.18k|        return OPENSSL_sk_is_sorted((const OPENSSL_STACK *)sk);                                                            \
  206|  4.18k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_sort:
  200|    589|    {                                                                                                                      \
  201|    589|        OPENSSL_sk_sort((OPENSSL_STACK *)sk);                                                                              \
  202|    589|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_find:
  187|  4.36k|    {                                                                                                                      \
  188|  4.36k|        return OPENSSL_sk_find((const OPENSSL_STACK *)sk, (const void *)ptr);                                              \
  189|  4.36k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_value:
  102|   405k|    {                                                                                                                      \
  103|   405k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|   405k|    }                                                                                                                      \
provider_core.c:sk_INFOPAIR_deep_copy:
  214|  1.56k|    {                                                                                                                      \
  215|  1.56k|        return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk,                                             \
  216|  1.56k|            (OPENSSL_sk_copyfunc)copyfunc,                                                                                 \
  217|  1.56k|            (OPENSSL_sk_freefunc)freefunc);                                                                                \
  218|  1.56k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_push:
  154|  1.48k|    {                                                                                                                      \
  155|  1.48k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|  1.48k|    }                                                                                                                      \
provider_core.c:sk_INFOPAIR_num:
   98|  4.31k|    {                                                                                                                      \
   99|  4.31k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  4.31k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_dup:
  208|  78.3k|    {                                                                                                                      \
  209|  78.3k|        return (STACK_OF(t1) *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk);                                                  \
  210|  78.3k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_num:
   98|  78.3k|    {                                                                                                                      \
   99|  78.3k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  78.3k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_free:
  137|  78.3k|    {                                                                                                                      \
  138|  78.3k|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  139|  78.3k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_CHILD_CB_num:
   98|  2.25k|    {                                                                                                                      \
   99|  2.25k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  2.25k|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_find:
  187|  2.35k|    {                                                                                                                      \
  188|  2.35k|        return OPENSSL_sk_find((const OPENSSL_STACK *)sk, (const void *)ptr);                                              \
  189|  2.35k|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_value:
  102|  2.35k|    {                                                                                                                      \
  103|  2.35k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  2.35k|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_new:
  106|      2|    {                                                                                                                      \
  107|      2|        OPENSSL_STACK *ret = OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);                                                 \
  108|      2|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  109|      2|                                                                                                                           \
  110|      2|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  111|      2|        OPENSSL_sk_set_cmp_thunks(ret, sk_##t1##_cmpfunc_thunk);                                                           \
  112|      2|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  113|      2|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_cmpfunc_thunk:
   90|  2.35k|    {                                                                                                                      \
   91|  2.35k|        int (*realcmp)(const t3 *const *a, const t3 *const *b) = (int (*)(const t3 *const *a, const t3 *const *b))(cmp);   \
   92|  2.35k|        const t3 *const *at = (const t3 *const *)a;                                                                        \
   93|  2.35k|        const t3 *const *bt = (const t3 *const *)b;                                                                        \
   94|  2.35k|                                                                                                                           \
   95|  2.35k|        return realcmp(at, bt);                                                                                            \
   96|  2.35k|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_push:
  154|      2|    {                                                                                                                      \
  155|      2|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|      2|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_sort:
  200|      2|    {                                                                                                                      \
  201|      2|        OPENSSL_sk_sort((OPENSSL_STACK *)sk);                                                                              \
  202|      2|    }                                                                                                                      \
pem_info.c:sk_X509_INFO_freefunc_thunk:
   42|   347k|    {                                                                                                                    \
   43|   347k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                  \
   44|   347k|        freefunc((t3 *)ptr);                                                                                             \
   45|   347k|    }                                                                                                                    \
pem_info.c:ossl_check_X509_INFO_sk_type:
   63|   347k|    {                                                                                                                    \
   64|   347k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   347k|    }                                                                                                                    \
pem_info.c:ossl_check_X509_INFO_type:
   55|   347k|    {                                                                                                                    \
   56|   347k|        return ptr;                                                                                                      \
   57|   347k|    }                                                                                                                    \
property.c:sk_IMPLEMENTATION_new_null:
  115|   168k|    {                                                                                                                      \
  116|   168k|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|   168k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|   168k|                                                                                                                           \
  119|   168k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|   168k|                                                                                                                           \
  121|   168k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|   168k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_freefunc_thunk:
   85|   167k|    {                                                                                                                      \
   86|   167k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|   167k|        freefunc((t3 *)ptr);                                                                                               \
   88|   167k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_num:
   98|   588k|    {                                                                                                                      \
   99|   588k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   588k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_value:
  102|   245k|    {                                                                                                                      \
  103|   245k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|   245k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_push:
  154|   168k|    {                                                                                                                      \
  155|   168k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|   168k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_pop_free:
  170|   167k|    {                                                                                                                      \
  171|   167k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|   167k|                                                                                                                           \
  173|   167k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|   167k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|   167k|                                                                                                                           \
  176|   167k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|   167k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_delete:
  145|    514|    {                                                                                                                      \
  146|    514|        return (t2 *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i);                                                            \
  147|    514|    }                                                                                                                      \
property.c:sk_ALGORITHM_new_reserve:
  124|     24|    {                                                                                                                      \
  125|     24|        OPENSSL_STACK *ret = OPENSSL_sk_new_reserve((OPENSSL_sk_compfunc)compare, n);                                      \
  126|     24|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  127|     24|                                                                                                                           \
  128|     24|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  129|     24|        OPENSSL_sk_set_cmp_thunks(ret, sk_##t1##_cmpfunc_thunk);                                                           \
  130|     24|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  131|     24|    }                                                                                                                      \
property.c:sk_ALGORITHM_freefunc_thunk:
   85|    666|    {                                                                                                                      \
   86|    666|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|    666|        freefunc((t3 *)ptr);                                                                                               \
   88|    666|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_dup:
  208|    666|    {                                                                                                                      \
  209|    666|        return (STACK_OF(t1) *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk);                                                  \
  210|    666|    }                                                                                                                      \
property.c:sk_ALGORITHM_push:
  154|    666|    {                                                                                                                      \
  155|    666|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|    666|    }                                                                                                                      \
property.c:sk_ALGORITHM_num:
   98|     24|    {                                                                                                                      \
   99|     24|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|     24|    }                                                                                                                      \
property.c:sk_ALGORITHM_value:
  102|    666|    {                                                                                                                      \
  103|    666|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|    666|    }                                                                                                                      \
property.c:sk_ALGORITHM_pop_free:
  170|     24|    {                                                                                                                      \
  171|     24|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|     24|                                                                                                                           \
  173|     24|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|     24|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|     24|                                                                                                                           \
  176|     24|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|     24|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_free:
  137|    666|    {                                                                                                                      \
  138|    666|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  139|    666|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_new:
  106|  36.5k|    {                                                                                                                      \
  107|  36.5k|        OPENSSL_STACK *ret = OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);                                                 \
  108|  36.5k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  109|  36.5k|                                                                                                                           \
  110|  36.5k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  111|  36.5k|        OPENSSL_sk_set_cmp_thunks(ret, sk_##t1##_cmpfunc_thunk);                                                           \
  112|  36.5k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  113|  36.5k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_freefunc_thunk:
   85|   110k|    {                                                                                                                      \
   86|   110k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|   110k|        freefunc((t3 *)ptr);                                                                                               \
   88|   110k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_cmpfunc_thunk:
   90|  41.9k|    {                                                                                                                      \
   91|  41.9k|        int (*realcmp)(const t3 *const *a, const t3 *const *b) = (int (*)(const t3 *const *a, const t3 *const *b))(cmp);   \
   92|  41.9k|        const t3 *const *at = (const t3 *const *)a;                                                                        \
   93|  41.9k|        const t3 *const *bt = (const t3 *const *)b;                                                                        \
   94|  41.9k|                                                                                                                           \
   95|  41.9k|        return realcmp(at, bt);                                                                                            \
   96|  41.9k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_push:
  154|   110k|    {                                                                                                                      \
  155|   110k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|   110k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_num:
   98|  15.9k|    {                                                                                                                      \
   99|  15.9k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  15.9k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_sort:
  200|  15.9k|    {                                                                                                                      \
  201|  15.9k|        OPENSSL_sk_sort((OPENSSL_STACK *)sk);                                                                              \
  202|  15.9k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_value:
  102|  23.6k|    {                                                                                                                      \
  103|  23.6k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  23.6k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_pop_free:
  170|  36.5k|    {                                                                                                                      \
  171|  36.5k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  36.5k|                                                                                                                           \
  173|  36.5k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  36.5k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  36.5k|                                                                                                                           \
  176|  36.5k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  36.5k|    }                                                                                                                      \
property_string.c:ossl_check_OPENSSL_CSTRING_sk_type:
   63|  8.72k|    {                                                                                                                    \
   64|  8.72k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  8.72k|    }                                                                                                                    \
property_string.c:ossl_check_OPENSSL_CSTRING_type:
   55|  7.30k|    {                                                                                                                    \
   56|  7.30k|        return ptr;                                                                                                      \
   57|  7.30k|    }                                                                                                                    \
property_string.c:ossl_check_const_OPENSSL_CSTRING_sk_type:
   59|  2.47k|    {                                                                                                                    \
   60|  2.47k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  2.47k|    }                                                                                                                    \
rsa_backend.c:sk_BIGNUM_const_new_null:
  115|   707k|    {                                                                                                                      \
  116|   707k|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|   707k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|   707k|                                                                                                                           \
  119|   707k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|   707k|                                                                                                                           \
  121|   707k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|   707k|    }                                                                                                                      \
rsa_backend.c:sk_BIGNUM_const_free:
  137|   707k|    {                                                                                                                      \
  138|   707k|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  139|   707k|    }                                                                                                                      \
rsa_lib.c:sk_RSA_PRIME_INFO_pop_free:
  170|   235k|    {                                                                                                                      \
  171|   235k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|   235k|                                                                                                                           \
  173|   235k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|   235k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|   235k|                                                                                                                           \
  176|   235k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|   235k|    }                                                                                                                      \
rsa_lib.c:sk_BIGNUM_const_new_null:
  115|   707k|    {                                                                                                                      \
  116|   707k|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|   707k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|   707k|                                                                                                                           \
  119|   707k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|   707k|                                                                                                                           \
  121|   707k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|   707k|    }                                                                                                                      \
rsa_lib.c:sk_BIGNUM_const_num:
   98|   707k|    {                                                                                                                      \
   99|   707k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   707k|    }                                                                                                                      \
rsa_lib.c:sk_BIGNUM_const_free:
  137|   707k|    {                                                                                                                      \
  138|   707k|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  139|   707k|    }                                                                                                                      \
rsa_ossl.c:sk_RSA_PRIME_INFO_num:
   98|   235k|    {                                                                                                                      \
   99|   235k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   235k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_pop_free:
  170|  1.68k|    {                                                                                                                      \
  171|  1.68k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  1.68k|                                                                                                                           \
  173|  1.68k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  1.68k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  1.68k|                                                                                                                           \
  176|  1.68k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  1.68k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_freefunc_thunk:
   85|  4.29k|    {                                                                                                                      \
   86|  4.29k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|  4.29k|        freefunc((t3 *)ptr);                                                                                               \
   88|  4.29k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_HASH_pop_free:
  170|  4.29k|    {                                                                                                                      \
  171|  4.29k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  4.29k|                                                                                                                           \
  173|  4.29k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  4.29k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  4.29k|                                                                                                                           \
  176|  4.29k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  4.29k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_num:
   98|   306k|    {                                                                                                                      \
   99|   306k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   306k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_value:
  102|   289k|    {                                                                                                                      \
  103|   289k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|   289k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_new_null:
  115|  1.67k|    {                                                                                                                      \
  116|  1.67k|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|  1.67k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|  1.67k|                                                                                                                           \
  119|  1.67k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|  1.67k|                                                                                                                           \
  121|  1.67k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|  1.67k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_HASH_new:
  106|  4.29k|    {                                                                                                                      \
  107|  4.29k|        OPENSSL_STACK *ret = OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);                                                 \
  108|  4.29k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  109|  4.29k|                                                                                                                           \
  110|  4.29k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  111|  4.29k|        OPENSSL_sk_set_cmp_thunks(ret, sk_##t1##_cmpfunc_thunk);                                                           \
  112|  4.29k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  113|  4.29k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_push:
  154|  4.29k|    {                                                                                                                      \
  155|  4.29k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|  4.29k|    }                                                                                                                      \
by_file.c:ossl_check_const_X509_INFO_sk_type:
   59|   698k|    {                                                                                                                    \
   60|   698k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|   698k|    }                                                                                                                    \
by_file.c:ossl_check_X509_INFO_sk_type:
   63|  2.88k|    {                                                                                                                    \
   64|  2.88k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  2.88k|    }                                                                                                                    \
by_file.c:ossl_check_X509_INFO_freefunc_type:
   75|  2.88k|    {                                                                                                                    \
   76|  2.88k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  2.88k|    }
t_x509.c:ossl_check_X509_sk_type:
   63|  62.1k|    {                                                                                                                    \
   64|  62.1k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  62.1k|    }                                                                                                                    \
t_x509.c:ossl_check_X509_freefunc_type:
   75|  62.1k|    {                                                                                                                    \
   76|  62.1k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  62.1k|    }
v3_lib.c:ossl_check_const_X509_EXTENSION_sk_type:
   59|  26.9M|    {                                                                                                                    \
   60|  26.9M|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  26.9M|    }                                                                                                                    \
v3_purp.c:ossl_check_const_DIST_POINT_sk_type:
   59|   349k|    {                                                                                                                    \
   60|   349k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|   349k|    }                                                                                                                    \
v3_purp.c:ossl_check_GENERAL_NAME_sk_type:
   63|   287k|    {                                                                                                                    \
   64|   287k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   287k|    }                                                                                                                    \
v3_purp.c:ossl_check_GENERAL_NAME_freefunc_type:
   75|   287k|    {                                                                                                                    \
   76|   287k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|   287k|    }
v3_purp.c:ossl_check_DIST_POINT_sk_type:
   63|   287k|    {                                                                                                                    \
   64|   287k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   287k|    }                                                                                                                    \
v3_purp.c:ossl_check_DIST_POINT_freefunc_type:
   75|   287k|    {                                                                                                                    \
   76|   287k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|   287k|    }
v3_purp.c:ossl_check_IPAddressFamily_sk_type:
   63|   287k|    {                                                                                                                    \
   64|   287k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   287k|    }                                                                                                                    \
v3_purp.c:ossl_check_IPAddressFamily_freefunc_type:
   75|   287k|    {                                                                                                                    \
   76|   287k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|   287k|    }
x509_lu.c:ossl_check_X509_OBJECT_compfunc_type:
   67|   206k|    {                                                                                                                    \
   68|   206k|        return (OPENSSL_sk_compfunc)cmp;                                                                                 \
   69|   206k|    }                                                                                                                    \
x509_lu.c:sk_X509_OBJECT_cmpfunc_thunk:
   47|   143k|    {                                                                                                                    \
   48|   143k|        int (*realcmp)(const t3 *const *a, const t3 *const *b) = (int (*)(const t3 *const *a, const t3 *const *b))(cmp); \
   49|   143k|        const t3 *const *at = (const t3 *const *)a;                                                                      \
   50|   143k|        const t3 *const *bt = (const t3 *const *)b;                                                                      \
   51|   143k|                                                                                                                         \
   52|   143k|        return realcmp(at, bt);                                                                                          \
   53|   143k|    }                                                                                                                    \
x509_lu.c:ossl_check_X509_OBJECT_sk_type:
   63|   554k|    {                                                                                                                    \
   64|   554k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   554k|    }                                                                                                                    \
x509_lu.c:ossl_check_X509_LOOKUP_sk_type:
   63|  5.88k|    {                                                                                                                    \
   64|  5.88k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  5.88k|    }                                                                                                                    \
x509_lu.c:ossl_check_const_X509_LOOKUP_sk_type:
   59|  28.2k|    {                                                                                                                    \
   60|  28.2k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  28.2k|    }                                                                                                                    \
x509_lu.c:ossl_check_X509_OBJECT_freefunc_type:
   75|   206k|    {                                                                                                                    \
   76|   206k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|   206k|    }
x509_lu.c:ossl_check_X509_LOOKUP_type:
   55|  3.43k|    {                                                                                                                    \
   56|  3.43k|        return ptr;                                                                                                      \
   57|  3.43k|    }                                                                                                                    \
x509_lu.c:ossl_check_const_X509_OBJECT_sk_type:
   59|   287k|    {                                                                                                                    \
   60|   287k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|   287k|    }                                                                                                                    \
x509_lu.c:ossl_check_X509_OBJECT_type:
   55|   347k|    {                                                                                                                    \
   56|   347k|        return ptr;                                                                                                      \
   57|   347k|    }                                                                                                                    \
x509_v3.c:ossl_check_const_X509_EXTENSION_sk_type:
   59|  3.22M|    {                                                                                                                    \
   60|  3.22M|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  3.22M|    }                                                                                                                    \
x509_vpm.c:ossl_check_ASN1_OBJECT_sk_type:
   63|  6.56k|    {                                                                                                                    \
   64|  6.56k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  6.56k|    }                                                                                                                    \
x509_vpm.c:ossl_check_ASN1_OBJECT_freefunc_type:
   75|  6.56k|    {                                                                                                                    \
   76|  6.56k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  6.56k|    }
x509_vpm.c:sk_X509_BUFFER_pop_free:
  170|  26.2k|    {                                                                                                                      \
  171|  26.2k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  26.2k|                                                                                                                           \
  173|  26.2k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  26.2k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  26.2k|                                                                                                                           \
  176|  26.2k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  26.2k|    }                                                                                                                      \
x_name.c:sk_X509_NAME_ENTRY_freefunc_thunk:
   42|  4.93M|    {                                                                                                                    \
   43|  4.93M|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                  \
   44|  4.93M|        freefunc((t3 *)ptr);                                                                                             \
   45|  4.93M|    }                                                                                                                    \
x_name.c:ossl_check_X509_NAME_ENTRY_sk_type:
   63|  13.7M|    {                                                                                                                    \
   64|  13.7M|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  13.7M|    }                                                                                                                    \
x_name.c:ossl_check_X509_NAME_ENTRY_freefunc_type:
   75|  3.85M|    {                                                                                                                    \
   76|  3.85M|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  3.85M|    }
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_num:
   98|  3.16M|    {                                                                                                                      \
   99|  3.16M|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  3.16M|    }                                                                                                                      \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_value:
  102|  2.46M|    {                                                                                                                      \
  103|  2.46M|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  2.46M|    }                                                                                                                      \
x_name.c:ossl_check_const_X509_NAME_ENTRY_sk_type:
   59|  13.7M|    {                                                                                                                    \
   60|  13.7M|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  13.7M|    }                                                                                                                    \
x_name.c:ossl_check_X509_NAME_ENTRY_type:
   55|  7.39M|    {                                                                                                                    \
   56|  7.39M|        return ptr;                                                                                                      \
   57|  7.39M|    }                                                                                                                    \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_new_null:
  115|   698k|    {                                                                                                                      \
  116|   698k|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|   698k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|   698k|                                                                                                                           \
  119|   698k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|   698k|                                                                                                                           \
  121|   698k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|   698k|    }                                                                                                                      \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_freefunc_thunk:
   85|  4.93M|    {                                                                                                                      \
   86|  4.93M|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|  4.93M|        freefunc((t3 *)ptr);                                                                                               \
   88|  4.93M|    }                                                                                                                      \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_push:
  154|  2.46M|    {                                                                                                                      \
  155|  2.46M|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|  2.46M|    }                                                                                                                      \
x_name.c:ossl_check_const_ASN1_VALUE_sk_type:
   59|  11.2M|    {                                                                                                                    \
   60|  11.2M|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  11.2M|    }                                                                                                                    \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_pop_free:
  170|  1.39M|    {                                                                                                                      \
  171|  1.39M|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  1.39M|                                                                                                                           \
  173|  1.39M|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  1.39M|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  1.39M|                                                                                                                           \
  176|  1.39M|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  1.39M|    }                                                                                                                      \
x_x509.c:ossl_check_IPAddressFamily_sk_type:
   63|   695k|    {                                                                                                                    \
   64|   695k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   695k|    }                                                                                                                    \
x_x509.c:ossl_check_IPAddressFamily_freefunc_type:
   75|   695k|    {                                                                                                                    \
   76|   695k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|   695k|    }
dso_dlfcn.c:ossl_check_const_void_sk_type:
   59|     83|    {                                                                                                                    \
   60|     83|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|     83|    }                                                                                                                    \
comp_methods.c:ossl_check_SSL_COMP_compfunc_type:
   67|    709|    {                                                                                                                    \
   68|    709|        return (OPENSSL_sk_compfunc)cmp;                                                                                 \
   69|    709|    }                                                                                                                    \
comp_methods.c:ossl_check_SSL_COMP_sk_type:
   63|    708|    {                                                                                                                    \
   64|    708|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|    708|    }                                                                                                                    \
comp_methods.c:ossl_check_SSL_COMP_freefunc_type:
   75|    708|    {                                                                                                                    \
   76|    708|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|    708|    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

ossl_ech_2bcompressed:
  551|   104k|{
  552|   104k|    const size_t nexts = OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|   104k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  553|       |
  554|       |#ifdef DUPEMALL
  555|       |    return 0;
  556|       |#endif
  557|   104k|    if (ind >= nexts)
  ------------------
  |  Branch (557:9): [True: 0, False: 104k]
  ------------------
  558|      0|        return -1;
  559|   104k|    return ext_defs[ind].ech_handling == OSSL_ECH_HANDLING_COMPRESS;
  ------------------
  |  |   30|   104k|#define OSSL_ECH_HANDLING_COMPRESS 2 /* compress outer value into inner */
  ------------------
  560|   104k|}
tls_validate_all_contexts:
  646|     66|{
  647|     66|    size_t i, num_exts, builtin_num = OSSL_NELEM(ext_defs), offset;
  ------------------
  |  |   14|     66|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  648|     66|    RAW_EXTENSION *thisext;
  649|     66|    unsigned int context;
  650|     66|    ENDPOINT role = ENDPOINT_BOTH;
  651|       |
  652|     66|    if ((thisctx & SSL_EXT_CLIENT_HELLO) != 0)
  ------------------
  |  |  300|     66|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (652:9): [True: 0, False: 66]
  ------------------
  653|      0|        role = ENDPOINT_SERVER;
  654|     66|    else if ((thisctx & SSL_EXT_TLS1_2_SERVER_HELLO) != 0)
  ------------------
  |  |  302|     66|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
  |  Branch (654:14): [True: 66, False: 0]
  ------------------
  655|     66|        role = ENDPOINT_CLIENT;
  656|       |
  657|       |    /* Calculate the number of extensions in the extensions list */
  658|     66|    num_exts = builtin_num + s->cert->custext.meths_count;
  659|       |
  660|  2.10k|    for (thisext = exts, i = 0; i < num_exts; i++, thisext++) {
  ------------------
  |  Branch (660:33): [True: 2.03k, False: 65]
  ------------------
  661|  2.03k|        if (!thisext->present)
  ------------------
  |  Branch (661:13): [True: 2.00k, False: 33]
  ------------------
  662|  2.00k|            continue;
  663|       |
  664|     33|        if (i < builtin_num) {
  ------------------
  |  Branch (664:13): [True: 33, False: 0]
  ------------------
  665|     33|            context = ext_defs[i].context;
  666|     33|        } else {
  667|      0|            custom_ext_method *meth = NULL;
  668|       |
  669|      0|            meth = custom_ext_find(&s->cert->custext, role, thisext->type,
  670|      0|                &offset);
  671|      0|            if (!ossl_assert(meth != NULL))
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (671:17): [True: 0, False: 0]
  ------------------
  672|      0|                return 0;
  673|      0|            context = meth->context;
  674|      0|        }
  675|       |
  676|     33|        if (!validate_context(s, context, thisctx))
  ------------------
  |  Branch (676:13): [True: 1, False: 32]
  ------------------
  677|      1|            return 0;
  678|     33|    }
  679|       |
  680|     65|    return 1;
  681|     66|}
extension_is_relevant:
  746|  53.6k|{
  747|  53.6k|    int is_tls13;
  748|       |
  749|       |    /*
  750|       |     * For HRR we haven't selected the version yet but we know it will be
  751|       |     * TLSv1.3
  752|       |     */
  753|  53.6k|    if ((thisctx & SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST) != 0)
  ------------------
  |  |  305|  53.6k|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
  |  Branch (753:9): [True: 1, False: 53.6k]
  ------------------
  754|      1|        is_tls13 = 1;
  755|  53.6k|    else
  756|  53.6k|        is_tls13 = SSL_CONNECTION_IS_TLS13(s);
  ------------------
  |  |  273|  53.6k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|   107k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  53.6k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  53.6k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 53.6k, False: 0]
  |  |  ------------------
  |  |  274|  53.6k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  53.6k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|   107k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 53.5k, False: 29]
  |  |  ------------------
  |  |  275|  53.6k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  53.5k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  53.5k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 53.5k]
  |  |  ------------------
  ------------------
  757|       |
  758|  53.6k|    if ((SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|   107k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  53.6k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  53.6k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 53.6k]
  |  |  ------------------
  ------------------
  759|      0|            && (extctx & SSL_EXT_TLS_IMPLEMENTATION_ONLY) != 0)
  ------------------
  |  |  291|      0|#define SSL_EXT_TLS_IMPLEMENTATION_ONLY 0x00004
  ------------------
  |  Branch (759:16): [True: 0, False: 0]
  ------------------
  760|       |        /*
  761|       |         * Note that SSL_IS_TLS13() means "TLS 1.3 has been negotiated",
  762|       |         * which is never true when generating the ClientHello.
  763|       |         * However, version negotiation *has* occurred by the time the
  764|       |         * ClientHello extensions are being parsed.
  765|       |         * Be careful to allow TLS 1.3-only extensions when generating
  766|       |         * the ClientHello.
  767|       |         */
  768|  53.6k|        || (is_tls13 && (extctx & SSL_EXT_TLS1_2_AND_BELOW_ONLY) != 0)
  ------------------
  |  |  295|      1|#define SSL_EXT_TLS1_2_AND_BELOW_ONLY 0x00010
  ------------------
  |  Branch (768:13): [True: 1, False: 53.6k]
  |  Branch (768:25): [True: 0, False: 1]
  ------------------
  769|  53.6k|        || (!is_tls13 && (extctx & SSL_EXT_TLS1_3_ONLY) != 0
  ------------------
  |  |  297|  53.6k|#define SSL_EXT_TLS1_3_ONLY 0x00020
  ------------------
  |  Branch (769:13): [True: 53.6k, False: 1]
  |  Branch (769:26): [True: 16.9k, False: 36.7k]
  ------------------
  770|  16.9k|            && (thisctx & SSL_EXT_CLIENT_HELLO) == 0)
  ------------------
  |  |  300|  16.9k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (770:16): [True: 0, False: 16.9k]
  ------------------
  771|  53.6k|        || (s->server && !is_tls13 && (extctx & SSL_EXT_TLS1_3_ONLY) != 0)
  ------------------
  |  |  297|      0|#define SSL_EXT_TLS1_3_ONLY 0x00020
  ------------------
  |  Branch (771:13): [True: 0, False: 53.6k]
  |  Branch (771:26): [True: 0, False: 0]
  |  Branch (771:39): [True: 0, False: 0]
  ------------------
  772|  53.6k|        || (s->hit && (extctx & SSL_EXT_IGNORE_ON_RESUMPTION) != 0))
  ------------------
  |  |  299|      0|#define SSL_EXT_IGNORE_ON_RESUMPTION 0x00040
  ------------------
  |  Branch (772:13): [True: 0, False: 53.6k]
  |  Branch (772:23): [True: 0, False: 0]
  ------------------
  773|      0|        return 0;
  774|  53.6k|    return 1;
  775|  53.6k|}
tls_collect_extensions:
  796|    127|{
  797|    127|    PACKET extensions = *packet;
  798|    127|    size_t i = 0;
  799|    127|    size_t num_exts;
  800|    127|    custom_ext_methods *exts = &s->cert->custext;
  801|    127|    RAW_EXTENSION *raw_extensions = NULL;
  802|    127|    const EXTENSION_DEFINITION *thisexd;
  803|       |
  804|    127|    *res = NULL;
  805|       |
  806|       |    /*
  807|       |     * Initialise server side custom extensions. Client side is done during
  808|       |     * construction of extensions for the ClientHello.
  809|       |     */
  810|    127|#ifndef OPENSSL_NO_ECH
  811|    127|    if ((context & SSL_EXT_CLIENT_HELLO) != 0 && s->ext.ech.attempted == 0)
  ------------------
  |  |  300|    127|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (811:9): [True: 0, False: 127]
  |  Branch (811:50): [True: 0, False: 0]
  ------------------
  812|      0|        custom_ext_init(&s->cert->custext);
  813|       |#else
  814|       |    if ((context & SSL_EXT_CLIENT_HELLO) != 0)
  815|       |        custom_ext_init(&s->cert->custext);
  816|       |#endif
  817|       |
  818|    127|    num_exts = OSSL_NELEM(ext_defs) + (exts != NULL ? exts->meths_count : 0);
  ------------------
  |  |   14|    127|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (818:40): [True: 127, False: 0]
  ------------------
  819|    127|    raw_extensions = OPENSSL_calloc(num_exts, sizeof(*raw_extensions));
  ------------------
  |  |  113|    127|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  820|    127|    if (raw_extensions == NULL) {
  ------------------
  |  Branch (820:9): [True: 0, False: 127]
  ------------------
  821|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  822|      0|        return 0;
  823|      0|    }
  824|       |
  825|    127|    i = 0;
  826|    224|    while (PACKET_remaining(&extensions) > 0) {
  ------------------
  |  Branch (826:12): [True: 126, False: 98]
  ------------------
  827|    126|        unsigned int type, idx;
  828|    126|        PACKET extension;
  829|    126|        RAW_EXTENSION *thisex;
  830|       |
  831|    126|        if (!PACKET_get_net_2(&extensions, &type) || !PACKET_get_length_prefixed_2(&extensions, &extension)) {
  ------------------
  |  Branch (831:13): [True: 9, False: 117]
  |  Branch (831:54): [True: 10, False: 107]
  ------------------
  832|     19|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|     19|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|     19|    (ERR_new(),                                                  \
  |  |  |  |  158|     19|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|     19|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|     19|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  833|     19|            goto err;
  834|     19|        }
  835|       |        /*
  836|       |         * Verify this extension is allowed. We only check duplicates for
  837|       |         * extensions that we recognise. We also have a special case for the
  838|       |         * PSK extension, which must be the last one in the ClientHello.
  839|       |         */
  840|    107|        if (!verify_extension(s, context, type, exts, raw_extensions, &thisex)
  ------------------
  |  Branch (840:13): [True: 4, False: 103]
  ------------------
  841|    103|            || (thisex != NULL && thisex->present == 1)
  ------------------
  |  Branch (841:17): [True: 45, False: 58]
  |  Branch (841:35): [True: 0, False: 45]
  ------------------
  842|    103|            || (type == TLSEXT_TYPE_psk
  ------------------
  |  |  154|    206|#define TLSEXT_TYPE_psk 41
  ------------------
  |  Branch (842:17): [True: 1, False: 102]
  ------------------
  843|      1|                && (context & SSL_EXT_CLIENT_HELLO) != 0
  ------------------
  |  |  300|      1|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (843:20): [True: 0, False: 1]
  ------------------
  844|      4|                && PACKET_remaining(&extensions) != 0)) {
  ------------------
  |  Branch (844:20): [True: 0, False: 0]
  ------------------
  845|      4|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      4|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      4|    (ERR_new(),                                                  \
  |  |  |  |  158|      4|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      4|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      4|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  846|      4|            goto err;
  847|      4|        }
  848|    103|        idx = (unsigned int)(thisex - raw_extensions);
  849|       |        /*-
  850|       |         * Check that we requested this extension (if appropriate). Requests can
  851|       |         * be sent in the ClientHello and CertificateRequest. Unsolicited
  852|       |         * extensions can be sent in the NewSessionTicket. We only do this for
  853|       |         * the built-in extensions. Custom extensions have a different but
  854|       |         * similar check elsewhere.
  855|       |         * Special cases:
  856|       |         * - The HRR cookie extension is unsolicited
  857|       |         * - The renegotiate extension is unsolicited (the client signals
  858|       |         *   support via an SCSV)
  859|       |         * - The signed_certificate_timestamp extension can be provided by a
  860|       |         * custom extension or by the built-in version. We let the extension
  861|       |         * itself handle unsolicited response checks.
  862|       |         */
  863|    103|        if (idx < OSSL_NELEM(ext_defs)
  ------------------
  |  |   14|    206|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (863:13): [True: 45, False: 58]
  ------------------
  864|     45|            && (context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_CERTIFICATE_REQUEST | SSL_EXT_TLS1_3_NEW_SESSION_TICKET)) == 0
  ------------------
  |  |  300|     45|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
                          && (context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_CERTIFICATE_REQUEST | SSL_EXT_TLS1_3_NEW_SESSION_TICKET)) == 0
  ------------------
  |  |  308|     45|#define SSL_EXT_TLS1_3_CERTIFICATE_REQUEST 0x04000
  ------------------
                          && (context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_CERTIFICATE_REQUEST | SSL_EXT_TLS1_3_NEW_SESSION_TICKET)) == 0
  ------------------
  |  |  307|     45|#define SSL_EXT_TLS1_3_NEW_SESSION_TICKET 0x02000
  ------------------
  |  Branch (864:16): [True: 45, False: 0]
  ------------------
  865|     45|            && type != TLSEXT_TYPE_cookie
  ------------------
  |  |  157|    148|#define TLSEXT_TYPE_cookie 44
  ------------------
  |  Branch (865:16): [True: 45, False: 0]
  ------------------
  866|     45|            && type != TLSEXT_TYPE_renegotiate
  ------------------
  |  |  166|    148|#define TLSEXT_TYPE_renegotiate 0xff01
  ------------------
  |  Branch (866:16): [True: 24, False: 21]
  ------------------
  867|     24|            && type != TLSEXT_TYPE_signed_certificate_timestamp
  ------------------
  |  |  125|    127|#define TLSEXT_TYPE_signed_certificate_timestamp 18
  ------------------
  |  Branch (867:16): [True: 21, False: 3]
  ------------------
  868|     21|            && (s->ext.extflags[idx] & SSL_EXT_FLAG_SENT) == 0
  ------------------
  |  | 2074|     21|#define SSL_EXT_FLAG_SENT 0x2
  ------------------
  |  Branch (868:16): [True: 7, False: 14]
  ------------------
  869|      7|#ifndef OPENSSL_NO_GOST
  870|      7|            && !((context & SSL_EXT_TLS1_2_SERVER_HELLO) != 0
  ------------------
  |  |  302|      7|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
  |  Branch (870:18): [True: 7, False: 0]
  ------------------
  871|      7|                && type == TLSEXT_TYPE_cryptopro_bug)
  ------------------
  |  |  401|      7|#define TLSEXT_TYPE_cryptopro_bug 0xfde8
  ------------------
  |  Branch (871:20): [True: 1, False: 6]
  ------------------
  872|    103|#endif
  873|    103|        ) {
  874|      6|            SSLfatal(s, SSL_AD_UNSUPPORTED_EXTENSION,
  ------------------
  |  |  155|      6|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      6|    (ERR_new(),                                                  \
  |  |  |  |  158|      6|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      6|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      6|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  875|      6|                SSL_R_UNSOLICITED_EXTENSION);
  876|      6|            goto err;
  877|      6|        }
  878|     97|        if (thisex != NULL) {
  ------------------
  |  Branch (878:13): [True: 39, False: 58]
  ------------------
  879|     39|            thisex->data = extension;
  880|     39|            thisex->present = 1;
  881|     39|            thisex->type = type;
  882|     39|            thisex->received_order = i++;
  883|     39|            if (s->ext.debug_cb)
  ------------------
  |  Branch (883:17): [True: 0, False: 39]
  ------------------
  884|      0|                s->ext.debug_cb(SSL_CONNECTION_GET_USER_SSL(s), !s->server,
  ------------------
  |  |   28|      0|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  885|      0|                    thisex->type, PACKET_data(&thisex->data),
  886|      0|                    (int)PACKET_remaining(&thisex->data),
  887|      0|                    s->ext.debug_arg);
  888|     39|        }
  889|     97|    }
  890|       |
  891|     98|    if (init) {
  ------------------
  |  Branch (891:9): [True: 98, False: 0]
  ------------------
  892|       |        /*
  893|       |         * Initialise all known extensions relevant to this context,
  894|       |         * whether we have found them or not
  895|       |         */
  896|  3.13k|        for (thisexd = ext_defs, i = 0; i < OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|  3.13k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (896:41): [True: 3.03k, False: 98]
  ------------------
  897|  3.03k|            i++, thisexd++) {
  898|  3.03k|            if (thisexd->init != NULL && (thisexd->context & context) != 0
  ------------------
  |  Branch (898:17): [True: 1.86k, False: 1.17k]
  |  Branch (898:42): [True: 1.06k, False: 794]
  ------------------
  899|  1.06k|                && extension_is_relevant(s, thisexd->context, context)
  ------------------
  |  Branch (899:20): [True: 1.06k, False: 0]
  ------------------
  900|  1.06k|                && !thisexd->init(s, context)) {
  ------------------
  |  Branch (900:20): [True: 0, False: 1.06k]
  ------------------
  901|       |                /* SSLfatal() already called */
  902|      0|                goto err;
  903|      0|            }
  904|  3.03k|        }
  905|     98|    }
  906|       |
  907|     98|    *res = raw_extensions;
  908|     98|    if (len != NULL)
  ------------------
  |  Branch (908:9): [True: 0, False: 98]
  ------------------
  909|      0|        *len = num_exts;
  910|     98|    return 1;
  911|       |
  912|     29|err:
  913|     29|    OPENSSL_free(raw_extensions);
  ------------------
  |  |  132|     29|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  914|     29|    return 0;
  915|     98|}
tls_parse_extension:
  929|    907|{
  930|    907|    RAW_EXTENSION *currext = &exts[idx];
  931|    907|    int (*parser)(SSL_CONNECTION *s, PACKET *pkt, unsigned int context, X509 *x,
  932|    907|        size_t chainidx)
  933|    907|        = NULL;
  934|       |
  935|       |    /* Skip if the extension is not present */
  936|    907|    if (!currext->present)
  ------------------
  |  Branch (936:9): [True: 876, False: 31]
  ------------------
  937|    876|        return 1;
  938|       |
  939|       |    /* Skip if we've already parsed this extension */
  940|     31|    if (currext->parsed)
  ------------------
  |  Branch (940:9): [True: 0, False: 31]
  ------------------
  941|      0|        return 1;
  942|       |
  943|     31|    currext->parsed = 1;
  944|       |
  945|     31|    if (idx < OSSL_NELEM(ext_defs)) {
  ------------------
  |  |   14|     31|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (945:9): [True: 31, False: 0]
  ------------------
  946|       |        /* We are handling a built-in extension */
  947|     31|        const EXTENSION_DEFINITION *extdef = &ext_defs[idx];
  948|       |
  949|       |        /* Check if extension is defined for our protocol. If not, skip */
  950|     31|        if (!extension_is_relevant(s, extdef->context, context))
  ------------------
  |  Branch (950:13): [True: 0, False: 31]
  ------------------
  951|      0|            return 1;
  952|       |
  953|     31|        parser = s->server ? extdef->parse_ctos : extdef->parse_stoc;
  ------------------
  |  Branch (953:18): [True: 0, False: 31]
  ------------------
  954|       |
  955|     31|        if (parser != NULL)
  ------------------
  |  Branch (955:13): [True: 30, False: 1]
  ------------------
  956|     30|            return parser(s, &currext->data, context, x, chainidx);
  957|       |
  958|       |        /*
  959|       |         * If the parser is NULL we fall through to the custom extension
  960|       |         * processing
  961|       |         */
  962|     31|    }
  963|       |
  964|       |    /* Parse custom extensions */
  965|      1|    return custom_ext_parse(s, context, currext->type,
  966|      1|        PACKET_data(&currext->data),
  967|      1|        PACKET_remaining(&currext->data),
  968|      1|        x, chainidx);
  969|     31|}
tls_parse_all_extensions:
  981|     30|{
  982|     30|    size_t i, numexts = OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|     30|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  983|     30|    const EXTENSION_DEFINITION *thisexd;
  984|       |
  985|       |    /* Calculate the number of extensions in the extensions list */
  986|     30|    numexts += s->cert->custext.meths_count;
  987|       |
  988|       |    /* Parse each extension in turn */
  989|    834|    for (i = 0; i < numexts; i++) {
  ------------------
  |  Branch (989:17): [True: 809, False: 25]
  ------------------
  990|    809|        if (!tls_parse_extension(s, i, context, exts, x, chainidx)) {
  ------------------
  |  Branch (990:13): [True: 5, False: 804]
  ------------------
  991|       |            /* SSLfatal() already called */
  992|      5|            return 0;
  993|      5|        }
  994|    809|    }
  995|       |
  996|     25|    if (fin) {
  ------------------
  |  Branch (996:9): [True: 25, False: 0]
  ------------------
  997|       |        /*
  998|       |         * Finalise all known extensions relevant to this context,
  999|       |         * whether we have found them or not
 1000|       |         */
 1001|    645|        for (i = 0, thisexd = ext_defs; i < OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|    645|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1001:41): [True: 625, False: 20]
  ------------------
 1002|    625|            i++, thisexd++) {
 1003|    625|            if (thisexd->final != NULL && (thisexd->context & context) != 0
  ------------------
  |  Branch (1003:17): [True: 245, False: 380]
  |  Branch (1003:43): [True: 125, False: 120]
  ------------------
 1004|    125|                && !thisexd->final(s, context, exts[i].present)) {
  ------------------
  |  Branch (1004:20): [True: 5, False: 120]
  ------------------
 1005|       |                /* SSLfatal() already called */
 1006|      5|                return 0;
 1007|      5|            }
 1008|    625|        }
 1009|     25|    }
 1010|       |
 1011|     20|    return 1;
 1012|     25|}
should_add_extension:
 1016|  52.5k|{
 1017|       |    /* Skip if not relevant for our context */
 1018|  52.5k|    if ((extctx & thisctx) == 0)
  ------------------
  |  Branch (1018:9): [True: 0, False: 52.5k]
  ------------------
 1019|      0|        return 0;
 1020|       |
 1021|       |    /* Check if this extension is defined for our protocol. If not, skip */
 1022|  52.5k|    if (!extension_is_relevant(s, extctx, thisctx)
  ------------------
  |  Branch (1022:9): [True: 0, False: 52.5k]
  ------------------
 1023|  52.5k|        || ((extctx & SSL_EXT_TLS1_3_ONLY) != 0
  ------------------
  |  |  297|  52.5k|#define SSL_EXT_TLS1_3_ONLY 0x00020
  ------------------
  |  Branch (1023:13): [True: 16.9k, False: 35.6k]
  ------------------
 1024|  16.9k|            && (thisctx & SSL_EXT_CLIENT_HELLO) != 0
  ------------------
  |  |  300|  16.9k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (1024:16): [True: 16.9k, False: 0]
  ------------------
 1025|  16.9k|            && (SSL_CONNECTION_IS_DTLS(s) || max_version < TLS1_3_VERSION)))
  ------------------
  |  |  266|  33.8k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  16.9k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  16.9k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 16.9k]
  |  |  ------------------
  ------------------
                          && (SSL_CONNECTION_IS_DTLS(s) || max_version < TLS1_3_VERSION)))
  ------------------
  |  |   27|  16.9k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1025:46): [True: 280, False: 16.6k]
  ------------------
 1026|    280|        return 0;
 1027|       |
 1028|  52.2k|    return 1;
 1029|  52.5k|}
tls_construct_extensions:
 1042|  1.71k|{
 1043|  1.71k|    size_t i;
 1044|  1.71k|    int min_version, max_version = 0, reason;
 1045|  1.71k|    const EXTENSION_DEFINITION *thisexd;
 1046|  1.71k|    int for_comp = (context & SSL_EXT_TLS1_3_CERTIFICATE_COMPRESSION) != 0;
  ------------------
  |  |  309|  1.71k|#define SSL_EXT_TLS1_3_CERTIFICATE_COMPRESSION 0x08000
  ------------------
 1047|  1.71k|#ifndef OPENSSL_NO_ECH
 1048|  1.71k|    int pass;
 1049|  1.71k|#endif
 1050|       |
 1051|  1.71k|    if (!WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  3.42k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1051:9): [True: 0, False: 1.71k]
  ------------------
 1052|       |        /*
 1053|       |         * If extensions are of zero length then we don't even add the
 1054|       |         * extensions length bytes to a ClientHello/ServerHello
 1055|       |         * (for non-TLSv1.3).
 1056|       |         */
 1057|  1.71k|        || ((context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_2_SERVER_HELLO)) != 0
  ------------------
  |  |  300|  1.71k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
                      || ((context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_2_SERVER_HELLO)) != 0
  ------------------
  |  |  302|  1.71k|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
  |  Branch (1057:13): [True: 1.71k, False: 0]
  ------------------
 1058|  1.71k|            && !WPACKET_set_flags(pkt,
  ------------------
  |  Branch (1058:16): [True: 0, False: 1.71k]
  ------------------
 1059|  1.71k|                WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH))) {
  ------------------
  |  |  723|  1.71k|#define WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH 2
  ------------------
 1060|      0|        if (!for_comp)
  ------------------
  |  Branch (1060:13): [True: 0, False: 0]
  ------------------
 1061|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1062|      0|        return 0;
 1063|      0|    }
 1064|       |
 1065|  1.71k|    if ((context & SSL_EXT_CLIENT_HELLO) != 0) {
  ------------------
  |  |  300|  1.71k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (1065:9): [True: 1.71k, False: 0]
  ------------------
 1066|  1.71k|        reason = ssl_get_min_max_version(s, &min_version, &max_version, NULL);
 1067|  1.71k|        if (reason != 0) {
  ------------------
  |  Branch (1067:13): [True: 0, False: 1.71k]
  ------------------
 1068|      0|            if (!for_comp)
  ------------------
  |  Branch (1068:17): [True: 0, False: 0]
  ------------------
 1069|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, reason);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1070|      0|            return 0;
 1071|      0|        }
 1072|  1.71k|    }
 1073|       |
 1074|       |    /* Add custom extensions first */
 1075|  1.71k|#ifndef OPENSSL_NO_ECH
 1076|  1.71k|    if ((context & SSL_EXT_CLIENT_HELLO) != 0 && s->ext.ech.attempted == 0)
  ------------------
  |  |  300|  1.71k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (1076:9): [True: 1.71k, False: 0]
  |  Branch (1076:50): [True: 1.71k, False: 0]
  ------------------
 1077|       |        /* On the server side with initialise during ClientHello parsing */
 1078|  1.71k|        custom_ext_init(&s->cert->custext);
 1079|       |#else
 1080|       |    if ((context & SSL_EXT_CLIENT_HELLO) != 0)
 1081|       |        /* On the server side with initialise during ClientHello parsing */
 1082|       |        custom_ext_init(&s->cert->custext);
 1083|       |#endif
 1084|  1.71k|    if (!custom_ext_add(s, context, pkt, x, chainidx, max_version)) {
  ------------------
  |  Branch (1084:9): [True: 0, False: 1.71k]
  ------------------
 1085|       |        /* SSLfatal() already called */
 1086|      0|        return 0;
 1087|      0|    }
 1088|       |
 1089|  1.71k|#ifndef OPENSSL_NO_ECH
 1090|       |    /*
 1091|       |     * Two passes if doing real ECH - we first construct the
 1092|       |     * to-be-ECH-compressed extensions, and then go around again
 1093|       |     * constructing those that aren't to be ECH-compressed. We
 1094|       |     * need to ensure this ordering so that all the ECH-compressed
 1095|       |     * extensions are contiguous in the encoding. The actual
 1096|       |     * compression happens later in ech_encode_inner().
 1097|       |     */
 1098|  5.08k|    for (pass = 0; pass <= 1; pass++)
  ------------------
  |  Branch (1098:20): [True: 3.39k, False: 1.68k]
  ------------------
 1099|  3.39k|#endif
 1100|       |
 1101|   108k|        for (i = 0, thisexd = ext_defs; i < OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|   108k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1101:41): [True: 104k, False: 3.37k]
  ------------------
 1102|   104k|            i++, thisexd++) {
 1103|   104k|            EXT_RETURN (*construct)(SSL_CONNECTION *s, WPACKET *pkt,
 1104|   104k|                unsigned int context,
 1105|   104k|                X509 *x, size_t chainidx);
 1106|   104k|            EXT_RETURN ret;
 1107|       |
 1108|   104k|#ifndef OPENSSL_NO_ECH
 1109|       |            /* do compressed in pass 0, non-compressed in pass 1 */
 1110|   104k|            if (ossl_ech_2bcompressed((int)i) == pass)
  ------------------
  |  Branch (1110:17): [True: 52.3k, False: 52.5k]
  ------------------
 1111|  52.3k|                continue;
 1112|       |            /* stash index - needed for COMPRESS ECH handling */
 1113|  52.5k|            s->ext.ech.ext_ind = (int)i;
 1114|  52.5k|#endif
 1115|       |            /* Skip if not relevant for our context */
 1116|  52.5k|            if (!should_add_extension(s, thisexd->context, context, max_version))
  ------------------
  |  Branch (1116:17): [True: 280, False: 52.2k]
  ------------------
 1117|    280|                continue;
 1118|       |
 1119|  52.2k|            construct = s->server ? thisexd->construct_stoc
  ------------------
  |  Branch (1119:25): [True: 0, False: 52.2k]
  ------------------
 1120|  52.2k|                                  : thisexd->construct_ctos;
 1121|       |
 1122|  52.2k|            if (construct == NULL)
  ------------------
  |  Branch (1122:17): [True: 5.04k, False: 47.1k]
  ------------------
 1123|  5.04k|                continue;
 1124|       |
 1125|  47.1k|            ret = construct(s, pkt, context, x, chainidx);
 1126|  47.1k|            if (ret == EXT_RETURN_FAIL) {
  ------------------
  |  Branch (1126:17): [True: 21, False: 47.1k]
  ------------------
 1127|       |                /* SSLfatal() already called */
 1128|     21|                return 0;
 1129|     21|            }
 1130|  47.1k|            if (ret == EXT_RETURN_SENT
  ------------------
  |  Branch (1130:17): [True: 19.7k, False: 27.3k]
  ------------------
 1131|  19.7k|                && (context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_CERTIFICATE_REQUEST | SSL_EXT_TLS1_3_NEW_SESSION_TICKET)) != 0)
  ------------------
  |  |  300|  19.7k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
                              && (context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_CERTIFICATE_REQUEST | SSL_EXT_TLS1_3_NEW_SESSION_TICKET)) != 0)
  ------------------
  |  |  308|  19.7k|#define SSL_EXT_TLS1_3_CERTIFICATE_REQUEST 0x04000
  ------------------
                              && (context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_CERTIFICATE_REQUEST | SSL_EXT_TLS1_3_NEW_SESSION_TICKET)) != 0)
  ------------------
  |  |  307|  19.7k|#define SSL_EXT_TLS1_3_NEW_SESSION_TICKET 0x02000
  ------------------
  |  Branch (1131:20): [True: 19.7k, False: 0]
  ------------------
 1132|  19.7k|                s->ext.extflags[i] |= SSL_EXT_FLAG_SENT;
  ------------------
  |  | 2074|  19.7k|#define SSL_EXT_FLAG_SENT 0x2
  ------------------
 1133|  47.1k|        }
 1134|       |
 1135|  1.68k|#ifndef OPENSSL_NO_ECH
 1136|       |    /*
 1137|       |     * don't close yet if client in the middle of doing ECH, we'll
 1138|       |     * eventually close this in ech_aad_and_encrypt() after we add
 1139|       |     * the real ECH extension value
 1140|       |     */
 1141|  1.68k|    if (s->server
  ------------------
  |  Branch (1141:9): [True: 0, False: 1.68k]
  ------------------
 1142|  1.68k|        || context != SSL_EXT_CLIENT_HELLO
  ------------------
  |  |  300|  3.37k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (1142:12): [True: 0, False: 1.68k]
  ------------------
 1143|  1.68k|        || s->ext.ech.attempted == 0
  ------------------
  |  Branch (1143:12): [True: 1.68k, False: 0]
  ------------------
 1144|      0|        || s->ext.ech.ch_depth == 1
  ------------------
  |  Branch (1144:12): [True: 0, False: 0]
  ------------------
 1145|  1.68k|        || s->ext.ech.grease == OSSL_ECH_IS_GREASE) {
  ------------------
  |  |   37|      0|#define OSSL_ECH_IS_GREASE 1 /* when decryption failed or GREASE wanted */
  ------------------
  |  Branch (1145:12): [True: 0, False: 0]
  ------------------
 1146|  1.68k|        if (!WPACKET_close(pkt)) {
  ------------------
  |  Branch (1146:13): [True: 0, False: 1.68k]
  ------------------
 1147|      0|            if (!for_comp)
  ------------------
  |  Branch (1147:17): [True: 0, False: 0]
  ------------------
 1148|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1149|      0|            return 0;
 1150|      0|        }
 1151|  1.68k|    }
 1152|       |#else
 1153|       |    if (!WPACKET_close(pkt)) {
 1154|       |        if (!for_comp)
 1155|       |            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
 1156|       |        return 0;
 1157|       |    }
 1158|       |#endif
 1159|  1.68k|    return 1;
 1160|  1.68k|}
extensions.c:final_renegotiate:
 1170|     25|{
 1171|     25|    if (!s->server) {
  ------------------
  |  Branch (1171:9): [True: 25, False: 0]
  ------------------
 1172|       |        /*
 1173|       |         * Check if we can connect to a server that doesn't support safe
 1174|       |         * renegotiation
 1175|       |         */
 1176|     25|        if (!(s->options & SSL_OP_LEGACY_SERVER_CONNECT)
  ------------------
  |  |  361|     25|#define SSL_OP_LEGACY_SERVER_CONNECT SSL_OP_BIT(2)
  |  |  ------------------
  |  |  |  |  351|     25|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1176:13): [True: 25, False: 0]
  ------------------
 1177|     25|            && !(s->options & SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION)
  ------------------
  |  |  397|     25|#define SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION SSL_OP_BIT(18)
  |  |  ------------------
  |  |  |  |  351|     25|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1177:16): [True: 25, False: 0]
  ------------------
 1178|     25|            && !sent) {
  ------------------
  |  Branch (1178:16): [True: 5, False: 20]
  ------------------
 1179|      5|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  155|      5|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      5|    (ERR_new(),                                                  \
  |  |  |  |  158|      5|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      5|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      5|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1180|      5|                SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED);
 1181|      5|            return 0;
 1182|      5|        }
 1183|       |
 1184|     20|        return 1;
 1185|     25|    }
 1186|       |
 1187|       |    /* Need RI if renegotiating */
 1188|      0|    if (s->renegotiate
  ------------------
  |  Branch (1188:9): [True: 0, False: 0]
  ------------------
 1189|      0|        && !(s->options & SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION)
  ------------------
  |  |  397|      0|#define SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION SSL_OP_BIT(18)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1189:12): [True: 0, False: 0]
  ------------------
 1190|      0|        && !sent) {
  ------------------
  |  Branch (1190:12): [True: 0, False: 0]
  ------------------
 1191|      0|        SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1192|      0|            SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED);
 1193|      0|        return 0;
 1194|      0|    }
 1195|       |
 1196|      0|    return 1;
 1197|      0|}
extensions.c:init_server_name:
 1209|     97|{
 1210|     97|    if (s->server) {
  ------------------
  |  Branch (1210:9): [True: 0, False: 97]
  ------------------
 1211|      0|        s->servername_done = 0;
 1212|       |
 1213|      0|        OPENSSL_free(s->ext.hostname);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1214|      0|        s->ext.hostname = NULL;
 1215|      0|    }
 1216|       |
 1217|     97|    return 1;
 1218|     97|}
extensions.c:final_server_name:
 1251|     20|{
 1252|     20|    int ret = SSL_TLSEXT_ERR_NOACK;
  ------------------
  |  |  353|     20|#define SSL_TLSEXT_ERR_NOACK 3
  ------------------
 1253|     20|    int altmp = SSL_AD_UNRECOGNIZED_NAME;
  ------------------
  |  | 1276|     20|#define SSL_AD_UNRECOGNIZED_NAME TLS1_AD_UNRECOGNIZED_NAME
  |  |  ------------------
  |  |  |  |   76|     20|#define TLS1_AD_UNRECOGNIZED_NAME 112
  |  |  ------------------
  ------------------
 1254|     20|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|     20|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1255|     20|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|     20|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1256|     20|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|     20|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1257|     20|    int was_ticket = (SSL_get_options(ssl) & SSL_OP_NO_TICKET) == 0;
  ------------------
  |  |  384|     20|#define SSL_OP_NO_TICKET SSL_OP_BIT(14)
  |  |  ------------------
  |  |  |  |  351|     20|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
 1258|       |
 1259|     20|    if (!ossl_assert(sctx != NULL) || !ossl_assert(s->session_ctx != NULL)) {
  ------------------
  |  |   52|     40|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|     40|    __FILE__, __LINE__)
  ------------------
                  if (!ossl_assert(sctx != NULL) || !ossl_assert(s->session_ctx != NULL)) {
  ------------------
  |  |   52|     20|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|     20|    __FILE__, __LINE__)
  ------------------
  |  Branch (1259:9): [True: 0, False: 20]
  |  Branch (1259:39): [True: 0, False: 20]
  ------------------
 1260|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1261|      0|        return 0;
 1262|      0|    }
 1263|       |
 1264|     20|    if (sctx->ext.servername_cb != NULL)
  ------------------
  |  Branch (1264:9): [True: 0, False: 20]
  ------------------
 1265|      0|        ret = sctx->ext.servername_cb(ussl, &altmp,
 1266|      0|            sctx->ext.servername_arg);
 1267|     20|    else if (s->session_ctx->ext.servername_cb != NULL)
  ------------------
  |  Branch (1267:14): [True: 0, False: 20]
  ------------------
 1268|      0|        ret = s->session_ctx->ext.servername_cb(ussl, &altmp,
 1269|      0|            s->session_ctx->ext.servername_arg);
 1270|       |
 1271|       |    /*
 1272|       |     * For servers, propagate the SNI hostname from the temporary
 1273|       |     * storage in the SSL to the persistent SSL_SESSION, now that we
 1274|       |     * know we accepted it.
 1275|       |     * Clients make this copy when parsing the server's response to
 1276|       |     * the extension, which is when they find out that the negotiation
 1277|       |     * was successful.
 1278|       |     */
 1279|     20|    if (s->server) {
  ------------------
  |  Branch (1279:9): [True: 0, False: 20]
  ------------------
 1280|      0|        if (sent && ret == SSL_TLSEXT_ERR_OK && !s->hit) {
  ------------------
  |  |  350|      0|#define SSL_TLSEXT_ERR_OK 0
  ------------------
  |  Branch (1280:13): [True: 0, False: 0]
  |  Branch (1280:21): [True: 0, False: 0]
  |  Branch (1280:49): [True: 0, False: 0]
  ------------------
 1281|       |            /* Only store the hostname in the session if we accepted it. */
 1282|      0|            OPENSSL_free(s->session->ext.hostname);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1283|      0|            s->session->ext.hostname = OPENSSL_strdup(s->ext.hostname);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1284|      0|            if (s->session->ext.hostname == NULL && s->ext.hostname != NULL) {
  ------------------
  |  Branch (1284:17): [True: 0, False: 0]
  |  Branch (1284:53): [True: 0, False: 0]
  ------------------
 1285|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1286|      0|            }
 1287|      0|        }
 1288|      0|    }
 1289|       |
 1290|       |    /*
 1291|       |     * If we switched contexts (whether here or in the client_hello callback),
 1292|       |     * move the sess_accept increment from the session_ctx to the new
 1293|       |     * context, to avoid the confusing situation of having sess_accept_good
 1294|       |     * exceed sess_accept (zero) for the new context.
 1295|       |     */
 1296|     20|    if (SSL_IS_FIRST_HANDSHAKE(s) && sctx != s->session_ctx
  ------------------
  |  |  285|     40|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 20, False: 0]
  |  |  ------------------
  |  |  286|     40|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1296:38): [True: 0, False: 20]
  ------------------
 1297|      0|        && s->hello_retry_request == SSL_HRR_NONE) {
  ------------------
  |  Branch (1297:12): [True: 0, False: 0]
  ------------------
 1298|      0|        ssl_tsan_counter(sctx, &sctx->stats.sess_accept);
 1299|      0|        ssl_tsan_decr(s->session_ctx, &s->session_ctx->stats.sess_accept);
 1300|      0|    }
 1301|       |
 1302|       |    /*
 1303|       |     * If we're expecting to send a ticket, and tickets were previously enabled,
 1304|       |     * and now tickets are disabled, then turn off expected ticket.
 1305|       |     * Also, if this is not a resumption, create a new session ID
 1306|       |     */
 1307|     20|    if (ret == SSL_TLSEXT_ERR_OK && s->ext.ticket_expected
  ------------------
  |  |  350|     40|#define SSL_TLSEXT_ERR_OK 0
  ------------------
  |  Branch (1307:9): [True: 0, False: 20]
  |  Branch (1307:37): [True: 0, False: 0]
  ------------------
 1308|      0|        && was_ticket && (SSL_get_options(ssl) & SSL_OP_NO_TICKET) != 0) {
  ------------------
  |  |  384|      0|#define SSL_OP_NO_TICKET SSL_OP_BIT(14)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1308:12): [True: 0, False: 0]
  |  Branch (1308:26): [True: 0, False: 0]
  ------------------
 1309|      0|        s->ext.ticket_expected = 0;
 1310|      0|        if (!s->hit) {
  ------------------
  |  Branch (1310:13): [True: 0, False: 0]
  ------------------
 1311|      0|            SSL_SESSION *ss = SSL_get_session(ssl);
 1312|       |
 1313|      0|            if (ss != NULL) {
  ------------------
  |  Branch (1313:17): [True: 0, False: 0]
  ------------------
 1314|      0|                OPENSSL_free(ss->ext.tick);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1315|      0|                ss->ext.tick = NULL;
 1316|      0|                ss->ext.ticklen = 0;
 1317|      0|                ss->ext.tick_lifetime_hint = 0;
 1318|      0|                ss->ext.tick_age_add = 0;
 1319|      0|                if (!ssl_generate_session_id(s, ss)) {
  ------------------
  |  Branch (1319:21): [True: 0, False: 0]
  ------------------
 1320|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1321|      0|                    return 0;
 1322|      0|                }
 1323|      0|            } else {
 1324|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1325|      0|                return 0;
 1326|      0|            }
 1327|      0|        }
 1328|      0|    }
 1329|       |
 1330|     20|    switch (ret) {
 1331|      0|    case SSL_TLSEXT_ERR_ALERT_FATAL:
  ------------------
  |  |  352|      0|#define SSL_TLSEXT_ERR_ALERT_FATAL 2
  ------------------
  |  Branch (1331:5): [True: 0, False: 20]
  ------------------
 1332|      0|        SSLfatal(s, altmp, SSL_R_CALLBACK_FAILED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1333|      0|        return 0;
 1334|       |
 1335|      0|    case SSL_TLSEXT_ERR_ALERT_WARNING:
  ------------------
  |  |  351|      0|#define SSL_TLSEXT_ERR_ALERT_WARNING 1
  ------------------
  |  Branch (1335:5): [True: 0, False: 20]
  ------------------
 1336|       |        /* TLSv1.3 doesn't have warning alerts so we suppress this */
 1337|      0|        if (!SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1338|      0|            ssl3_send_alert(s, SSL3_AL_WARNING, altmp);
  ------------------
  |  |  249|      0|#define SSL3_AL_WARNING 1
  ------------------
 1339|      0|        s->servername_done = 0;
 1340|      0|        return 1;
 1341|       |
 1342|     20|    case SSL_TLSEXT_ERR_NOACK:
  ------------------
  |  |  353|     20|#define SSL_TLSEXT_ERR_NOACK 3
  ------------------
  |  Branch (1342:5): [True: 20, False: 0]
  ------------------
 1343|     20|        s->servername_done = 0;
 1344|     20|        return 1;
 1345|       |
 1346|      0|    default:
  ------------------
  |  Branch (1346:5): [True: 0, False: 20]
  ------------------
 1347|      0|        return 1;
 1348|     20|    }
 1349|     20|}
extensions.c:final_maxfragmentlen:
 2014|     20|{
 2015|     20|    if (s->session == NULL)
  ------------------
  |  Branch (2015:9): [True: 0, False: 20]
  ------------------
 2016|      0|        return 1;
 2017|       |
 2018|       |    /* MaxFragmentLength defaults to disabled */
 2019|     20|    if (s->session->ext.max_fragment_len_mode == TLSEXT_max_fragment_length_UNSPECIFIED)
  ------------------
  |  |  242|     20|#define TLSEXT_max_fragment_length_UNSPECIFIED 255
  ------------------
  |  Branch (2019:9): [True: 20, False: 0]
  ------------------
 2020|     20|        s->session->ext.max_fragment_len_mode = TLSEXT_max_fragment_length_DISABLED;
  ------------------
  |  |  235|     20|#define TLSEXT_max_fragment_length_DISABLED 0
  ------------------
 2021|       |
 2022|     20|    if (USE_MAX_FRAGMENT_LENGTH_EXT(s->session)) {
  ------------------
  |  |  304|     20|    IS_MAX_FRAGMENT_LENGTH_EXT_VALID(session->ext.max_fragment_len_mode)
  |  |  ------------------
  |  |  |  |  302|     20|    (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|     20|#define TLSEXT_max_fragment_length_512 1
  |  |  |  |  ------------------
  |  |  |  |                   (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  240|      0|#define TLSEXT_max_fragment_length_4096 4
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (302:6): [True: 0, False: 20]
  |  |  |  |  |  Branch (302:53): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2023|      0|        s->rlayer.rrlmethod->set_max_frag_len(s->rlayer.rrl,
 2024|      0|            GET_MAX_FRAGMENT_LENGTH(s->session));
  ------------------
  |  |  306|      0|    (512U << (session->ext.max_fragment_len_mode - 1))
  ------------------
 2025|      0|        s->rlayer.wrlmethod->set_max_frag_len(s->rlayer.wrl,
 2026|      0|            ssl_get_max_send_fragment(s));
 2027|      0|    }
 2028|       |
 2029|     20|    return 1;
 2030|     20|}
extensions.c:init_ec_point_formats:
 1494|     97|{
 1495|     97|    OPENSSL_free(s->ext.peer_ecpointformats);
  ------------------
  |  |  132|     97|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1496|     97|    s->ext.peer_ecpointformats = NULL;
 1497|     97|    s->ext.peer_ecpointformats_len = 0;
 1498|       |
 1499|     97|    return 1;
 1500|     97|}
extensions.c:final_ec_pt_formats:
 1353|     20|{
 1354|     20|    unsigned long alg_k, alg_a;
 1355|       |
 1356|     20|    if (s->server)
  ------------------
  |  Branch (1356:9): [True: 0, False: 20]
  ------------------
 1357|      0|        return 1;
 1358|       |
 1359|     20|    alg_k = s->s3.tmp.new_cipher->algorithm_mkey;
 1360|     20|    alg_a = s->s3.tmp.new_cipher->algorithm_auth;
 1361|       |
 1362|       |    /*
 1363|       |     * If we are client and using an elliptic curve cryptography cipher
 1364|       |     * suite, then if server returns an EC point formats lists extension it
 1365|       |     * must contain uncompressed.
 1366|       |     */
 1367|     20|    if (s->ext.ecpointformats != NULL
  ------------------
  |  Branch (1367:9): [True: 0, False: 20]
  ------------------
 1368|      0|        && s->ext.ecpointformats_len > 0
  ------------------
  |  Branch (1368:12): [True: 0, False: 0]
  ------------------
 1369|      0|        && s->ext.peer_ecpointformats != NULL
  ------------------
  |  Branch (1369:12): [True: 0, False: 0]
  ------------------
 1370|      0|        && s->ext.peer_ecpointformats_len > 0
  ------------------
  |  Branch (1370:12): [True: 0, False: 0]
  ------------------
 1371|      0|        && ((alg_k & SSL_kECDHE) || (alg_a & SSL_aECDSA))) {
  ------------------
  |  |   89|      0|#define SSL_kECDHE 0x00000004U
  ------------------
                      && ((alg_k & SSL_kECDHE) || (alg_a & SSL_aECDSA))) {
  ------------------
  |  |  118|      0|#define SSL_aECDSA 0x00000008U
  ------------------
  |  Branch (1371:13): [True: 0, False: 0]
  |  Branch (1371:37): [True: 0, False: 0]
  ------------------
 1372|       |        /* we are using an ECC cipher */
 1373|      0|        size_t i;
 1374|      0|        unsigned char *list = s->ext.peer_ecpointformats;
 1375|       |
 1376|      0|        for (i = 0; i < s->ext.peer_ecpointformats_len; i++) {
  ------------------
  |  Branch (1376:21): [True: 0, False: 0]
  ------------------
 1377|      0|            if (*list++ == TLSEXT_ECPOINTFORMAT_uncompressed)
  ------------------
  |  |  185|      0|#define TLSEXT_ECPOINTFORMAT_uncompressed 0
  ------------------
  |  Branch (1377:17): [True: 0, False: 0]
  ------------------
 1378|      0|                break;
 1379|      0|        }
 1380|      0|        if (i == s->ext.peer_ecpointformats_len) {
  ------------------
  |  Branch (1380:13): [True: 0, False: 0]
  ------------------
 1381|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1382|      0|                SSL_R_TLS_INVALID_ECPOINTFORMAT_LIST);
 1383|      0|            return 0;
 1384|      0|        }
 1385|      0|    }
 1386|       |
 1387|     20|    return 1;
 1388|     20|}
extensions.c:init_session_ticket:
 1391|     97|{
 1392|     97|    if (!s->server)
  ------------------
  |  Branch (1392:9): [True: 97, False: 0]
  ------------------
 1393|     97|        s->ext.ticket_expected = 0;
 1394|       |
 1395|     97|    return 1;
 1396|     97|}
extensions.c:init_status_request:
 1400|     97|{
 1401|     97|    if (s->server) {
  ------------------
  |  Branch (1401:9): [True: 0, False: 97]
  ------------------
 1402|      0|        s->ext.status_type = TLSEXT_STATUSTYPE_nothing;
  ------------------
  |  | 2213|      0|#define TLSEXT_STATUSTYPE_nothing -1
  ------------------
 1403|     97|    } else {
 1404|       |        /*
 1405|       |         * Ensure we get sensible values passed to tlsext_status_cb in the event
 1406|       |         * that we don't receive a status message
 1407|       |         */
 1408|     97|        OPENSSL_free(s->ext.ocsp.resp);
  ------------------
  |  |  132|     97|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1409|     97|        s->ext.ocsp.resp = NULL;
 1410|     97|        s->ext.ocsp.resp_len = 0;
 1411|       |
 1412|     97|        sk_OCSP_RESPONSE_pop_free(s->ext.ocsp.resp_ex, OCSP_RESPONSE_free);
 1413|     97|        s->ext.ocsp.resp_ex = NULL;
 1414|     97|    }
 1415|       |
 1416|     97|    return 1;
 1417|     97|}
extensions.c:init_npn:
 1422|     97|{
 1423|     97|    s->s3.npn_seen = 0;
 1424|       |
 1425|     97|    return 1;
 1426|     97|}
extensions.c:init_alpn:
 1430|     97|{
 1431|     97|    OPENSSL_free(s->s3.alpn_selected);
  ------------------
  |  |  132|     97|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1432|     97|    s->s3.alpn_selected = NULL;
 1433|     97|    s->s3.alpn_selected_len = 0;
 1434|     97|    if (s->server) {
  ------------------
  |  Branch (1434:9): [True: 0, False: 97]
  ------------------
 1435|      0|        OPENSSL_free(s->s3.alpn_proposed);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1436|       |        s->s3.alpn_proposed = NULL;
 1437|      0|        s->s3.alpn_proposed_len = 0;
 1438|      0|    }
 1439|     97|    return 1;
 1440|     97|}
extensions.c:final_alpn:
 1443|     20|{
 1444|     20|    if (!s->server && !sent && s->session->ext.alpn_selected != NULL)
  ------------------
  |  Branch (1444:9): [True: 20, False: 0]
  |  Branch (1444:23): [True: 20, False: 0]
  |  Branch (1444:32): [True: 0, False: 20]
  ------------------
 1445|      0|        s->ext.early_data_ok = 0;
 1446|       |
 1447|     20|    if (!s->server || !SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1447:9): [True: 20, False: 0]
  ------------------
 1448|     20|        return 1;
 1449|       |
 1450|       |    /*
 1451|       |     * Call alpn_select callback if needed.  Has to be done after SNI and
 1452|       |     * cipher negotiation (HTTP/2 restricts permitted ciphers). In TLSv1.3
 1453|       |     * we also have to do this before we decide whether to accept early_data.
 1454|       |     * In TLSv1.3 we've already negotiated our cipher so we do this call now.
 1455|       |     * For < TLSv1.3 we defer it until after cipher negotiation.
 1456|       |     *
 1457|       |     * On failure SSLfatal() already called.
 1458|       |     */
 1459|      0|    return tls_handle_alpn(s);
 1460|     20|}
extensions.c:init_srtp:
 1596|     97|{
 1597|     97|    if (s->server)
  ------------------
  |  Branch (1597:9): [True: 0, False: 97]
  ------------------
 1598|      0|        s->srtp_profile = NULL;
 1599|       |
 1600|     97|    return 1;
 1601|     97|}
extensions.c:init_etm:
 1503|     97|{
 1504|     97|    s->ext.use_etm = 0;
 1505|       |
 1506|     97|    return 1;
 1507|     97|}
extensions.c:init_ems:
 1510|     97|{
 1511|     97|    if (s->s3.flags & TLS1_FLAGS_RECEIVED_EXTMS) {
  ------------------
  |  |  300|     97|#define TLS1_FLAGS_RECEIVED_EXTMS 0x0200
  ------------------
  |  Branch (1511:9): [True: 0, False: 97]
  ------------------
 1512|      0|        s->s3.flags &= ~TLS1_FLAGS_RECEIVED_EXTMS;
  ------------------
  |  |  300|      0|#define TLS1_FLAGS_RECEIVED_EXTMS 0x0200
  ------------------
 1513|      0|        s->s3.flags |= TLS1_FLAGS_REQUIRED_EXTMS;
  ------------------
  |  |  307|      0|#define TLS1_FLAGS_REQUIRED_EXTMS 0x1000
  ------------------
 1514|      0|    }
 1515|       |
 1516|     97|    return 1;
 1517|     97|}
extensions.c:final_ems:
 1520|     20|{
 1521|       |    /*
 1522|       |     * Check extended master secret extension is not dropped on
 1523|       |     * renegotiation.
 1524|       |     */
 1525|     20|    if (!(s->s3.flags & TLS1_FLAGS_RECEIVED_EXTMS)
  ------------------
  |  |  300|     20|#define TLS1_FLAGS_RECEIVED_EXTMS 0x0200
  ------------------
  |  Branch (1525:9): [True: 20, False: 0]
  ------------------
 1526|     20|        && (s->s3.flags & TLS1_FLAGS_REQUIRED_EXTMS)) {
  ------------------
  |  |  307|     20|#define TLS1_FLAGS_REQUIRED_EXTMS 0x1000
  ------------------
  |  Branch (1526:12): [True: 0, False: 20]
  ------------------
 1527|      0|        SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_INCONSISTENT_EXTMS);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1528|      0|        return 0;
 1529|      0|    }
 1530|     20|    if (!s->server && s->hit) {
  ------------------
  |  Branch (1530:9): [True: 20, False: 0]
  |  Branch (1530:23): [True: 0, False: 20]
  ------------------
 1531|       |        /*
 1532|       |         * Check extended master secret extension is consistent with
 1533|       |         * original session.
 1534|       |         */
 1535|      0|        if (!(s->s3.flags & TLS1_FLAGS_RECEIVED_EXTMS) != !(s->session->flags & SSL_SESS_FLAG_EXTMS)) {
  ------------------
  |  |  300|      0|#define TLS1_FLAGS_RECEIVED_EXTMS 0x0200
  ------------------
                      if (!(s->s3.flags & TLS1_FLAGS_RECEIVED_EXTMS) != !(s->session->flags & SSL_SESS_FLAG_EXTMS)) {
  ------------------
  |  |  577|      0|#define SSL_SESS_FLAG_EXTMS 0x1
  ------------------
  |  Branch (1535:13): [True: 0, False: 0]
  ------------------
 1536|      0|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_INCONSISTENT_EXTMS);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1537|      0|            return 0;
 1538|      0|        }
 1539|      0|    }
 1540|       |
 1541|     20|    return 1;
 1542|     20|}
extensions.c:init_client_cert_type:
 2201|     97|{
 2202|       |    /* Only reset when parsing client hello */
 2203|     97|    if (sc->server) {
  ------------------
  |  Branch (2203:9): [True: 0, False: 97]
  ------------------
 2204|      0|        sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE;
  ------------------
  |  |  375|      0|#define OSSL_CERT_TYPE_CTOS_NONE 0
  ------------------
 2205|      0|        sc->ext.client_cert_type = TLSEXT_cert_type_x509;
  ------------------
  |  |  248|      0|#define TLSEXT_cert_type_x509 0
  ------------------
 2206|      0|    }
 2207|     97|    return 1;
 2208|     97|}
extensions.c:init_server_cert_type:
 2191|     97|{
 2192|       |    /* Only reset when parsing client hello */
 2193|     97|    if (sc->server) {
  ------------------
  |  Branch (2193:9): [True: 0, False: 97]
  ------------------
 2194|      0|        sc->ext.server_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE;
  ------------------
  |  |  375|      0|#define OSSL_CERT_TYPE_CTOS_NONE 0
  ------------------
 2195|      0|        sc->ext.server_cert_type = TLSEXT_cert_type_x509;
  ------------------
  |  |  248|      0|#define TLSEXT_cert_type_x509 0
  ------------------
 2196|      0|    }
 2197|     97|    return 1;
 2198|     97|}
extensions.c:tls_construct_compress_certificate:
 2067|  1.66k|{
 2068|       |#ifndef OPENSSL_NO_COMP_ALG
 2069|       |    int i;
 2070|       |
 2071|       |    if (!ossl_comp_has_alg(0))
 2072|       |        return EXT_RETURN_NOT_SENT;
 2073|       |
 2074|       |    /* Server: Don't attempt to compress a non-X509 (i.e. an RPK) */
 2075|       |    if (sc->server && sc->ext.server_cert_type != TLSEXT_cert_type_x509) {
 2076|       |        sc->cert_comp_prefs[0] = TLSEXT_comp_cert_none;
 2077|       |        return EXT_RETURN_NOT_SENT;
 2078|       |    }
 2079|       |
 2080|       |    /* Client: If we sent a client cert-type extension, don't indicate compression */
 2081|       |    if (!sc->server && sc->ext.client_cert_type_ctos) {
 2082|       |        sc->cert_comp_prefs[0] = TLSEXT_comp_cert_none;
 2083|       |        return EXT_RETURN_NOT_SENT;
 2084|       |    }
 2085|       |
 2086|       |    /* Do not indicate we support receiving compressed certificates */
 2087|       |    if ((sc->options & SSL_OP_NO_RX_CERTIFICATE_COMPRESSION) != 0)
 2088|       |        return EXT_RETURN_NOT_SENT;
 2089|       |
 2090|       |    if (sc->cert_comp_prefs[0] == TLSEXT_comp_cert_none)
 2091|       |        return EXT_RETURN_NOT_SENT;
 2092|       |#ifndef OPENSSL_NO_ECH
 2093|       |    ECH_SAME_EXT(sc, context, pkt);
 2094|       |#endif
 2095|       |
 2096|       |    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_compress_certificate)
 2097|       |        || !WPACKET_start_sub_packet_u16(pkt)
 2098|       |        || !WPACKET_start_sub_packet_u8(pkt))
 2099|       |        goto err;
 2100|       |
 2101|       |    for (i = 0; sc->cert_comp_prefs[i] != TLSEXT_comp_cert_none; i++) {
 2102|       |        if (!WPACKET_put_bytes_u16(pkt, sc->cert_comp_prefs[i]))
 2103|       |            goto err;
 2104|       |    }
 2105|       |    if (!WPACKET_close(pkt) || !WPACKET_close(pkt))
 2106|       |        goto err;
 2107|       |
 2108|       |    sc->ext.compress_certificate_sent = 1;
 2109|       |    return EXT_RETURN_SENT;
 2110|       |err:
 2111|       |    SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
 2112|       |    return EXT_RETURN_FAIL;
 2113|       |#else
 2114|  1.66k|    return EXT_RETURN_NOT_SENT;
 2115|  1.66k|#endif
 2116|  1.66k|}
extensions.c:tls_construct_certificate_authorities:
 1556|  1.66k|{
 1557|  1.66k|    const STACK_OF(X509_NAME) *ca_sk = get_ca_names(s);
 1558|       |
 1559|  1.66k|    if (ca_sk == NULL || sk_X509_NAME_num(ca_sk) == 0)
  ------------------
  |  |   56|  1.66k|#define sk_X509_NAME_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_sk_type(sk))
  ------------------
  |  Branch (1559:9): [True: 0, False: 1.66k]
  |  Branch (1559:26): [True: 1.66k, False: 0]
  ------------------
 1560|  1.66k|        return EXT_RETURN_NOT_SENT;
 1561|       |
 1562|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_certificate_authorities)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1562:9): [True: 0, False: 0]
  ------------------
 1563|      0|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1563:12): [True: 0, False: 0]
  ------------------
 1564|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1565|      0|        return EXT_RETURN_FAIL;
 1566|      0|    }
 1567|       |
 1568|      0|    if (!construct_ca_names(s, ca_sk, pkt)) {
  ------------------
  |  Branch (1568:9): [True: 0, False: 0]
  ------------------
 1569|       |        /* SSLfatal() already called */
 1570|      0|        return EXT_RETURN_FAIL;
 1571|      0|    }
 1572|       |
 1573|      0|    if (!WPACKET_close(pkt)) {
  ------------------
  |  Branch (1573:9): [True: 0, False: 0]
  ------------------
 1574|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1575|      0|        return EXT_RETURN_FAIL;
 1576|      0|    }
 1577|       |
 1578|      0|    return EXT_RETURN_SENT;
 1579|      0|}
extensions.c:init_ech:
 1226|      1|{
 1227|      1|    const int nexts = OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|      1|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 1228|       |
 1229|       |    /* we don't need this assert everywhere - anywhere is fine */
 1230|      1|    if (!ossl_assert(TLSEXT_IDX_num_builtins == nexts)) {
  ------------------
  |  |   52|      1|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      1|    __FILE__, __LINE__)
  ------------------
  |  Branch (1230:9): [True: 0, False: 1]
  ------------------
 1231|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1232|      0|        return 0;
 1233|      0|    }
 1234|      1|    if ((context & SSL_EXT_CLIENT_HELLO) != 0)
  ------------------
  |  |  300|      1|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (1234:9): [True: 0, False: 1]
  ------------------
 1235|      0|        s->ext.ech.done = 0;
 1236|      1|    return 1;
 1237|      1|}
extensions.c:validate_context:
  629|     82|{
  630|       |    /* Check we're allowed to use this extension in this context */
  631|     82|    if ((thisctx & extctx) == 0)
  ------------------
  |  Branch (631:9): [True: 4, False: 78]
  ------------------
  632|      4|        return 0;
  633|       |
  634|     78|    if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|     78|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|     78|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|     78|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 78]
  |  |  ------------------
  ------------------
  635|      0|        if ((extctx & SSL_EXT_TLS_ONLY) != 0)
  ------------------
  |  |  287|      0|#define SSL_EXT_TLS_ONLY 0x00001
  ------------------
  |  Branch (635:13): [True: 0, False: 0]
  ------------------
  636|      0|            return 0;
  637|     78|    } else if ((extctx & SSL_EXT_DTLS_ONLY) != 0) {
  ------------------
  |  |  289|     78|#define SSL_EXT_DTLS_ONLY 0x00002
  ------------------
  |  Branch (637:16): [True: 1, False: 77]
  ------------------
  638|      1|        return 0;
  639|      1|    }
  640|       |
  641|     77|    return 1;
  642|     78|}
extensions.c:verify_extension:
  692|    107|{
  693|    107|    size_t i;
  694|    107|    size_t builtin_num = OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|    107|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  695|    107|    const EXTENSION_DEFINITION *thisext;
  696|       |
  697|  2.25k|    for (i = 0, thisext = ext_defs; i < builtin_num; i++, thisext++) {
  ------------------
  |  Branch (697:37): [True: 2.19k, False: 58]
  ------------------
  698|  2.19k|        if (type == thisext->type) {
  ------------------
  |  Branch (698:13): [True: 49, False: 2.15k]
  ------------------
  699|     49|            if (!validate_context(s, thisext->context, context))
  ------------------
  |  Branch (699:17): [True: 4, False: 45]
  ------------------
  700|      4|                return 0;
  701|       |
  702|     45|            *found = &rawexlist[i];
  703|     45|            return 1;
  704|     49|        }
  705|  2.19k|    }
  706|       |
  707|       |    /* Check the custom extensions */
  708|     58|    if (meths != NULL) {
  ------------------
  |  Branch (708:9): [True: 58, False: 0]
  ------------------
  709|     58|        size_t offset = 0;
  710|     58|        ENDPOINT role = ENDPOINT_BOTH;
  711|     58|        custom_ext_method *meth = NULL;
  712|       |
  713|     58|        if ((context & SSL_EXT_CLIENT_HELLO) != 0) {
  ------------------
  |  |  300|     58|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (713:13): [True: 0, False: 58]
  ------------------
  714|      0|#ifndef OPENSSL_NO_ECH
  715|      0|            if (s->ext.ech.attempted == 1 && s->ext.ech.ch_depth == 1)
  ------------------
  |  Branch (715:17): [True: 0, False: 0]
  |  Branch (715:46): [True: 0, False: 0]
  ------------------
  716|      0|                role = ENDPOINT_CLIENT;
  717|      0|            else
  718|      0|                role = ENDPOINT_SERVER;
  719|       |#else
  720|       |            role = ENDPOINT_SERVER;
  721|       |#endif
  722|     58|        } else if ((context & SSL_EXT_TLS1_2_SERVER_HELLO) != 0)
  ------------------
  |  |  302|     58|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
  |  Branch (722:20): [True: 57, False: 1]
  ------------------
  723|     57|            role = ENDPOINT_CLIENT;
  724|       |
  725|     58|        meth = custom_ext_find(meths, role, type, &offset);
  726|     58|        if (meth != NULL) {
  ------------------
  |  Branch (726:13): [True: 0, False: 58]
  ------------------
  727|      0|            if (!validate_context(s, meth->context, context))
  ------------------
  |  Branch (727:17): [True: 0, False: 0]
  ------------------
  728|      0|                return 0;
  729|      0|            *found = &rawexlist[offset + builtin_num];
  730|      0|            return 1;
  731|      0|        }
  732|     58|    }
  733|       |
  734|       |    /* Unknown extension. We allow it */
  735|     58|    *found = NULL;
  736|     58|    return 1;
  737|     58|}

tls_construct_ctos_renegotiate:
   31|  1.71k|{
   32|  1.71k|    if (!s->renegotiate) {
  ------------------
  |  Branch (32:9): [True: 1.71k, False: 0]
  ------------------
   33|       |        /* If not renegotiating, send an empty RI extension to indicate support */
   34|       |
   35|       |#if DTLS_MAX_VERSION_INTERNAL != DTLS1_2_VERSION
   36|       |#error Internal DTLS version error
   37|       |#endif
   38|       |
   39|  1.71k|        if (!SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|  3.42k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.71k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  1.71k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (39:13): [True: 1.71k, False: 0]
  ------------------
   40|  1.71k|            && (s->min_proto_version >= TLS1_3_VERSION
  ------------------
  |  |   27|  3.42k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (40:17): [True: 4, False: 1.70k]
  ------------------
   41|  1.70k|                || (ssl_security(s, SSL_SECOP_VERSION, 0, TLS1_VERSION, NULL)
  ------------------
  |  | 2757|  1.70k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2728|  1.70k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
                              || (ssl_security(s, SSL_SECOP_VERSION, 0, TLS1_VERSION, NULL)
  ------------------
  |  |   24|  1.70k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (41:21): [True: 17, False: 1.68k]
  ------------------
   42|     17|                    && s->min_proto_version <= TLS1_VERSION))) {
  ------------------
  |  |   24|     17|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (42:24): [True: 9, False: 8]
  ------------------
   43|       |            /*
   44|       |             * For TLS <= 1.0 SCSV is used instead, and for TLS 1.3 this
   45|       |             * extension isn't used at all.
   46|       |             */
   47|     13|            return EXT_RETURN_NOT_SENT;
   48|     13|        }
   49|       |
   50|  1.69k|#ifndef OPENSSL_NO_ECH
   51|  1.69k|        ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  1.69k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  3.39k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 1.69k, False: 0]
  |  |  |  Branch (317:44): [True: 1.69k, False: 0]
  |  |  ------------------
  |  |  318|  1.69k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 1.69k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
   52|  1.69k|#endif
   53|       |
   54|  1.69k|        if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_renegotiate)
  ------------------
  |  |  911|  3.39k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (54:13): [True: 0, False: 1.69k]
  ------------------
   55|  1.69k|            || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  3.39k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (55:16): [True: 0, False: 1.69k]
  ------------------
   56|  1.69k|            || !WPACKET_put_bytes_u8(pkt, 0)
  ------------------
  |  |  909|  3.39k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (56:16): [True: 0, False: 1.69k]
  ------------------
   57|  1.69k|            || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (57:16): [True: 0, False: 1.69k]
  ------------------
   58|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   59|      0|            return EXT_RETURN_FAIL;
   60|      0|        }
   61|       |
   62|  1.69k|        return EXT_RETURN_SENT;
   63|  1.69k|    }
   64|       |
   65|      0|#ifndef OPENSSL_NO_ECH
   66|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
   67|      0|#endif
   68|       |
   69|       |    /* Add a complete RI extension if renegotiating */
   70|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_renegotiate)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (70:9): [True: 0, False: 0]
  ------------------
   71|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (71:12): [True: 0, False: 0]
  ------------------
   72|      0|        || !WPACKET_sub_memcpy_u8(pkt, s->s3.previous_client_finished,
  ------------------
  |  |  938|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (72:12): [True: 0, False: 0]
  ------------------
   73|      0|            s->s3.previous_client_finished_len)
   74|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (74:12): [True: 0, False: 0]
  ------------------
   75|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   76|      0|        return EXT_RETURN_FAIL;
   77|      0|    }
   78|       |
   79|      0|    return EXT_RETURN_SENT;
   80|      0|}
tls_construct_ctos_server_name:
   85|  1.68k|{
   86|  1.68k|    char *chosen = s->ext.hostname;
   87|  1.68k|#ifndef OPENSSL_NO_ECH
   88|  1.68k|    OSSL_HPKE_SUITE suite;
   89|  1.68k|    OSSL_ECHSTORE_ENTRY *ee = NULL;
   90|       |
   91|  1.68k|    if (s->ext.ech.es != NULL) {
  ------------------
  |  Branch (91:9): [True: 0, False: 1.68k]
  ------------------
   92|      0|        if (ossl_ech_pick_matching_cfg(s, &ee, &suite) != 1) {
  ------------------
  |  Branch (92:13): [True: 0, False: 0]
  ------------------
   93|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   94|      0|            return EXT_RETURN_NOT_SENT;
   95|      0|        }
   96|       |        /* Don't send outer SNI if external API says so */
   97|      0|        if (s->ext.ech.ch_depth == 0 && s->ext.ech.no_outer == 1)
  ------------------
  |  Branch (97:13): [True: 0, False: 0]
  |  Branch (97:41): [True: 0, False: 0]
  ------------------
   98|      0|            return EXT_RETURN_NOT_SENT;
   99|      0|        if (s->ext.ech.ch_depth == 1) /* inner */
  ------------------
  |  Branch (99:13): [True: 0, False: 0]
  ------------------
  100|      0|            chosen = s->ext.hostname;
  101|      0|        if (s->ext.ech.ch_depth == 0) { /* outer */
  ------------------
  |  Branch (101:13): [True: 0, False: 0]
  ------------------
  102|      0|            if (s->ext.ech.outer_hostname != NULL) /* prefer API */
  ------------------
  |  Branch (102:17): [True: 0, False: 0]
  ------------------
  103|      0|                chosen = s->ext.ech.outer_hostname;
  104|      0|            else /* use name from ECHConfig */
  105|      0|                chosen = ee->public_name;
  106|      0|        }
  107|      0|    }
  108|  1.68k|#endif
  109|  1.68k|    if (chosen == NULL)
  ------------------
  |  Branch (109:9): [True: 756, False: 933]
  ------------------
  110|    756|        return EXT_RETURN_NOT_SENT;
  111|       |    /* Add TLS extension servername to the Client Hello message */
  112|    933|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_server_name)
  ------------------
  |  |  911|  1.86k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (112:9): [True: 0, False: 933]
  ------------------
  113|       |        /* Sub-packet for server_name extension */
  114|    933|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  1.86k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (114:12): [True: 0, False: 933]
  ------------------
  115|       |        /* Sub-packet for servername list (always 1 hostname)*/
  116|    933|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  1.86k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (116:12): [True: 0, False: 933]
  ------------------
  117|    933|        || !WPACKET_put_bytes_u8(pkt, TLSEXT_NAMETYPE_host_name)
  ------------------
  |  |  909|  1.86k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (117:12): [True: 0, False: 933]
  ------------------
  118|    933|        || !WPACKET_sub_memcpy_u16(pkt, chosen, strlen(chosen))
  ------------------
  |  |  940|  1.86k|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (118:12): [True: 0, False: 933]
  ------------------
  119|    933|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (119:12): [True: 0, False: 933]
  ------------------
  120|    933|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (120:12): [True: 0, False: 933]
  ------------------
  121|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  122|      0|        return EXT_RETURN_FAIL;
  123|      0|    }
  124|    933|    return EXT_RETURN_SENT;
  125|    933|}
tls_construct_ctos_maxfragmentlen:
  131|  1.71k|{
  132|  1.71k|    if (s->ext.max_fragment_len_mode == TLSEXT_max_fragment_length_DISABLED)
  ------------------
  |  |  235|  1.71k|#define TLSEXT_max_fragment_length_DISABLED 0
  ------------------
  |  Branch (132:9): [True: 1.71k, False: 0]
  ------------------
  133|  1.71k|        return EXT_RETURN_NOT_SENT;
  134|      0|#ifndef OPENSSL_NO_ECH
  135|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  136|      0|#endif
  137|       |
  138|       |    /* Add Max Fragment Length extension if client enabled it. */
  139|       |    /*-
  140|       |     * 4 bytes for this extension type and extension length
  141|       |     * 1 byte for the Max Fragment Length code value.
  142|       |     */
  143|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_max_fragment_length)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (143:9): [True: 0, False: 0]
  ------------------
  144|       |        /* Sub-packet for Max Fragment Length extension (1 byte) */
  145|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (145:12): [True: 0, False: 0]
  ------------------
  146|      0|        || !WPACKET_put_bytes_u8(pkt, s->ext.max_fragment_len_mode)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (146:12): [True: 0, False: 0]
  ------------------
  147|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (147:12): [True: 0, False: 0]
  ------------------
  148|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  149|      0|        return EXT_RETURN_FAIL;
  150|      0|    }
  151|       |
  152|      0|    return EXT_RETURN_SENT;
  153|      0|}
tls_construct_ctos_srp:
  159|  1.71k|{
  160|       |    /* Add SRP username if there is one */
  161|  1.71k|    if (s->srp_ctx.login == NULL)
  ------------------
  |  Branch (161:9): [True: 1.71k, False: 0]
  ------------------
  162|  1.71k|        return EXT_RETURN_NOT_SENT;
  163|      0|#ifndef OPENSSL_NO_ECH
  164|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  165|      0|#endif
  166|       |
  167|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_srp)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (167:9): [True: 0, False: 0]
  ------------------
  168|       |        /* Sub-packet for SRP extension */
  169|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (169:12): [True: 0, False: 0]
  ------------------
  170|      0|        || !WPACKET_start_sub_packet_u8(pkt)
  ------------------
  |  |  810|      0|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (170:12): [True: 0, False: 0]
  ------------------
  171|       |        /* login must not be zero...internal error if so */
  172|      0|        || !WPACKET_set_flags(pkt, WPACKET_FLAGS_NON_ZERO_LENGTH)
  ------------------
  |  |  717|      0|#define WPACKET_FLAGS_NON_ZERO_LENGTH 1
  ------------------
  |  Branch (172:12): [True: 0, False: 0]
  ------------------
  173|      0|        || !WPACKET_memcpy(pkt, s->srp_ctx.login,
  ------------------
  |  Branch (173:12): [True: 0, False: 0]
  ------------------
  174|      0|            strlen(s->srp_ctx.login))
  175|      0|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (175:12): [True: 0, False: 0]
  ------------------
  176|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (176:12): [True: 0, False: 0]
  ------------------
  177|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  178|      0|        return EXT_RETURN_FAIL;
  179|      0|    }
  180|       |
  181|      0|    return EXT_RETURN_SENT;
  182|      0|}
tls_construct_ctos_ec_pt_formats:
  263|  1.71k|{
  264|  1.71k|    const unsigned char *pformats;
  265|  1.71k|    size_t num_formats;
  266|  1.71k|    int reason, min_version, max_version;
  267|       |
  268|  1.71k|    reason = ssl_get_min_max_version(s, &min_version, &max_version, NULL);
  269|  1.71k|    if (reason != 0) {
  ------------------
  |  Branch (269:9): [True: 0, False: 1.71k]
  ------------------
  270|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, reason);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  271|      0|        return EXT_RETURN_FAIL;
  272|      0|    }
  273|  1.71k|    if (!negotiate_dhe(s, ptfmt_check, min_version, max_version))
  ------------------
  |  Branch (273:9): [True: 94, False: 1.61k]
  ------------------
  274|     94|        return EXT_RETURN_NOT_SENT;
  275|       |
  276|  1.61k|    tls1_get_formatlist(s, &pformats, &num_formats);
  277|  1.61k|    if (num_formats == 0)
  ------------------
  |  Branch (277:9): [True: 0, False: 1.61k]
  ------------------
  278|      0|        return EXT_RETURN_NOT_SENT;
  279|  1.61k|#ifndef OPENSSL_NO_ECH
  280|  1.61k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  1.61k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  3.23k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 1.61k, False: 0]
  |  |  |  Branch (317:44): [True: 1.61k, False: 0]
  |  |  ------------------
  |  |  318|  1.61k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 1.61k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  281|  1.61k|#endif
  282|       |
  283|       |    /* Add TLS extension ECPointFormats to the ClientHello message */
  284|  1.61k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_ec_point_formats)
  ------------------
  |  |  911|  3.23k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (284:9): [True: 0, False: 1.61k]
  ------------------
  285|       |        /* Sub-packet for formats extension */
  286|  1.61k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  3.23k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (286:12): [True: 0, False: 1.61k]
  ------------------
  287|  1.61k|        || !WPACKET_sub_memcpy_u8(pkt, pformats, num_formats)
  ------------------
  |  |  938|  3.23k|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (287:12): [True: 0, False: 1.61k]
  ------------------
  288|  1.61k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (288:12): [True: 0, False: 1.61k]
  ------------------
  289|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  290|      0|        return EXT_RETURN_FAIL;
  291|      0|    }
  292|       |
  293|  1.61k|    return EXT_RETURN_SENT;
  294|  1.61k|}
tls_construct_ctos_supported_groups:
  299|  1.71k|{
  300|  1.71k|    const uint16_t *pgroups = NULL;
  301|  1.71k|    size_t num_groups = 0, i, tls13added = 0, added = 0;
  302|  1.71k|    int min_version, max_version, reason;
  303|  1.71k|    int dtls = SSL_CONNECTION_IS_DTLS(s);
  ------------------
  |  |  266|  1.71k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.71k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  1.71k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  304|  1.71k|    int use_ecdhe, use_ffdhe;
  305|       |
  306|  1.71k|    reason = ssl_get_min_max_version(s, &min_version, &max_version, NULL);
  307|  1.71k|    if (reason != 0) {
  ------------------
  |  Branch (307:9): [True: 0, False: 1.71k]
  ------------------
  308|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, reason);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  309|      0|        return EXT_RETURN_FAIL;
  310|      0|    }
  311|       |
  312|       |    /*
  313|       |     * If we don't support suitable groups, don't send the extension
  314|       |     */
  315|  1.71k|    use_ecdhe = negotiate_dhe(s, ecdhe_check, min_version, max_version);
  316|  1.71k|    use_ffdhe = negotiate_dhe(s, ffdhe_check, min_version, max_version);
  317|  1.71k|    if (!use_ecdhe && !use_ffdhe
  ------------------
  |  Branch (317:9): [True: 26, False: 1.68k]
  |  Branch (317:23): [True: 22, False: 4]
  ------------------
  318|     22|        && (dtls ? DTLS_VERSION_LE(max_version, DTLS1_2_VERSION)
  ------------------
  |  |   65|      0|#define DTLS_VERSION_LE(v1, v2) (dtls_ver_ordinal(v1) >= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LE(v1, v2) (dtls_ver_ordinal(v1) >= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (318:12): [True: 5, False: 17]
  |  Branch (318:13): [True: 0, False: 22]
  ------------------
  319|     22|                 : (max_version <= TLS1_2_VERSION)))
  ------------------
  |  |   26|     22|#define TLS1_2_VERSION 0x0303
  ------------------
  320|      5|        return EXT_RETURN_NOT_SENT;
  321|  1.70k|#ifndef OPENSSL_NO_ECH
  322|  1.70k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  1.70k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  3.41k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 1.70k, False: 0]
  |  |  |  Branch (317:44): [True: 1.70k, False: 0]
  |  |  ------------------
  |  |  318|  1.70k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 1.70k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  323|  1.70k|#endif
  324|       |
  325|       |    /*
  326|       |     * Add TLS extension supported_groups to the ClientHello message
  327|       |     */
  328|  1.70k|    tls1_get_supported_groups(s, &pgroups, &num_groups);
  329|       |
  330|  1.70k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_supported_groups)
  ------------------
  |  |  911|  3.41k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (330:9): [True: 0, False: 1.70k]
  ------------------
  331|       |        /* Sub-packet for supported_groups extension */
  332|  1.70k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  3.41k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (332:12): [True: 0, False: 1.70k]
  ------------------
  333|  1.70k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  3.41k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (333:12): [True: 0, False: 1.70k]
  ------------------
  334|  1.70k|        || !WPACKET_set_flags(pkt, WPACKET_FLAGS_NON_ZERO_LENGTH)) {
  ------------------
  |  |  717|  1.70k|#define WPACKET_FLAGS_NON_ZERO_LENGTH 1
  ------------------
  |  Branch (334:12): [True: 0, False: 1.70k]
  ------------------
  335|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  336|      0|        return EXT_RETURN_FAIL;
  337|      0|    }
  338|       |    /* Copy group ID if supported */
  339|  18.0k|    for (i = 0; i < num_groups; i++) {
  ------------------
  |  Branch (339:17): [True: 16.3k, False: 1.70k]
  ------------------
  340|  16.3k|        const TLS_GROUP_INFO *ginfo = NULL;
  341|  16.3k|        uint16_t ctmp = pgroups[i];
  342|  16.3k|        int okfortls13;
  343|       |
  344|  16.3k|        if (!tls_valid_group(s, ctmp, min_version, max_version, &okfortls13,
  ------------------
  |  Branch (344:13): [True: 84, False: 16.2k]
  ------------------
  345|  16.3k|                &ginfo)
  346|  16.2k|            || (!use_ecdhe && is_ecdhe_group(ginfo->group_id))
  ------------------
  |  Branch (346:17): [True: 28, False: 16.2k]
  |  Branch (346:31): [True: 20, False: 8]
  ------------------
  347|  16.2k|            || (!use_ffdhe && is_ffdhe_group(ginfo->group_id))
  ------------------
  |  Branch (347:17): [True: 497, False: 15.7k]
  |  Branch (347:31): [True: 40, False: 457]
  ------------------
  348|       |            /* Note: SSL_SECOP_CURVE_SUPPORTED covers all key exchange groups */
  349|  16.1k|            || !tls_group_allowed(s, ctmp, SSL_SECOP_CURVE_SUPPORTED))
  ------------------
  |  | 2749|  16.1k|#define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2730|  16.1k|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  |  Branch (349:16): [True: 74, False: 16.1k]
  ------------------
  350|    218|            continue;
  351|       |
  352|  16.1k|        if (!WPACKET_put_bytes_u16(pkt, ctmp)) {
  ------------------
  |  |  911|  16.1k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (352:13): [True: 0, False: 16.1k]
  ------------------
  353|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  354|      0|            return EXT_RETURN_FAIL;
  355|      0|        }
  356|  16.1k|        if (okfortls13 && max_version == TLS1_3_VERSION)
  ------------------
  |  |   27|  15.9k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (356:13): [True: 15.9k, False: 116]
  |  Branch (356:27): [True: 15.9k, False: 0]
  ------------------
  357|  15.9k|            tls13added++;
  358|  16.1k|        added++;
  359|  16.1k|    }
  360|  1.70k|    if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (360:9): [True: 17, False: 1.68k]
  |  Branch (360:32): [True: 0, False: 1.68k]
  ------------------
  361|     17|        if (added == 0)
  ------------------
  |  Branch (361:13): [True: 17, False: 0]
  ------------------
  362|     17|            SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  |  157|     17|    (ERR_new(),                                                  \
  |  |  158|     17|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|     17|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  159|     17|        ossl_statem_fatal)
  ------------------
                          SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  | 1266|     17|#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR
  |  |  ------------------
  |  |  |  |   66|     17|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  |  |  ------------------
  ------------------
                          SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  |  217|     17|#define SSL_R_NO_SUITABLE_GROUPS 295
  ------------------
  363|     17|                "No groups enabled for max supported SSL/TLS version");
  364|      0|        else
  365|     17|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  366|     17|        return EXT_RETURN_FAIL;
  367|     17|    }
  368|       |
  369|  1.68k|    if (tls13added == 0 && max_version == TLS1_3_VERSION) {
  ------------------
  |  |   27|     23|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (369:9): [True: 23, False: 1.66k]
  |  Branch (369:28): [True: 0, False: 23]
  ------------------
  370|      0|        SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  159|      0|        ossl_statem_fatal)
  ------------------
                      SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  | 1266|      0|#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR
  |  |  ------------------
  |  |  |  |   66|      0|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  |  |  ------------------
  ------------------
                      SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  |  217|      0|#define SSL_R_NO_SUITABLE_GROUPS 295
  ------------------
  371|      0|            "No groups enabled for max supported SSL/TLS version");
  372|      0|        return EXT_RETURN_FAIL;
  373|      0|    }
  374|       |
  375|  1.68k|    return EXT_RETURN_SENT;
  376|  1.68k|}
tls_construct_ctos_session_ticket:
  381|  1.69k|{
  382|  1.69k|    size_t ticklen;
  383|       |
  384|  1.69k|    if (!tls_use_ticket(s))
  ------------------
  |  Branch (384:9): [True: 1.69k, False: 0]
  ------------------
  385|  1.69k|        return EXT_RETURN_NOT_SENT;
  386|      0|#ifndef OPENSSL_NO_ECH
  387|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  388|      0|#endif
  389|       |
  390|      0|    if (!s->new_session && s->session != NULL
  ------------------
  |  Branch (390:9): [True: 0, False: 0]
  |  Branch (390:28): [True: 0, False: 0]
  ------------------
  391|      0|        && s->session->ext.tick != NULL
  ------------------
  |  Branch (391:12): [True: 0, False: 0]
  ------------------
  392|      0|        && s->session->ssl_version != TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (392:12): [True: 0, False: 0]
  ------------------
  393|      0|        ticklen = s->session->ext.ticklen;
  394|      0|    } else if (s->session && s->ext.session_ticket != NULL
  ------------------
  |  Branch (394:16): [True: 0, False: 0]
  |  Branch (394:30): [True: 0, False: 0]
  ------------------
  395|      0|        && s->ext.session_ticket->data != NULL) {
  ------------------
  |  Branch (395:12): [True: 0, False: 0]
  ------------------
  396|      0|        ticklen = s->ext.session_ticket->length;
  397|      0|        s->session->ext.tick = OPENSSL_malloc(ticklen);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  398|      0|        if (s->session->ext.tick == NULL) {
  ------------------
  |  Branch (398:13): [True: 0, False: 0]
  ------------------
  399|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  400|      0|            return EXT_RETURN_FAIL;
  401|      0|        }
  402|      0|        memcpy(s->session->ext.tick,
  403|      0|            s->ext.session_ticket->data, ticklen);
  404|      0|        s->session->ext.ticklen = ticklen;
  405|      0|    } else {
  406|      0|        ticklen = 0;
  407|      0|    }
  408|       |
  409|      0|    if (ticklen == 0 && s->ext.session_ticket != NULL && s->ext.session_ticket->data == NULL)
  ------------------
  |  Branch (409:9): [True: 0, False: 0]
  |  Branch (409:25): [True: 0, False: 0]
  |  Branch (409:58): [True: 0, False: 0]
  ------------------
  410|      0|        return EXT_RETURN_NOT_SENT;
  411|       |
  412|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_session_ticket)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (412:9): [True: 0, False: 0]
  ------------------
  413|      0|        || !WPACKET_sub_memcpy_u16(pkt, s->session->ext.tick, ticklen)) {
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (413:12): [True: 0, False: 0]
  ------------------
  414|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  415|      0|        return EXT_RETURN_FAIL;
  416|      0|    }
  417|       |
  418|      0|    return EXT_RETURN_SENT;
  419|      0|}
tls_construct_ctos_sig_algs:
  424|  1.69k|{
  425|  1.69k|    size_t salglen;
  426|  1.69k|    const uint16_t *salg;
  427|       |
  428|       |    /*
  429|       |     * This used both in the initial hello and as part of renegotiation,
  430|       |     * in the latter case, the client version may be already set and may
  431|       |     * be lower than that initially offered in `client_version`.
  432|       |     */
  433|  1.69k|    if (!SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  1.69k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.69k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  1.69k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (433:9): [True: 1.69k, False: 0]
  ------------------
  434|  1.69k|        if (s->client_version < TLS1_2_VERSION
  ------------------
  |  |   26|  3.38k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (434:13): [True: 4, False: 1.68k]
  ------------------
  435|  1.68k|            || (s->ssl.method->version != TLS_ANY_VERSION
  ------------------
  |  |   40|  3.37k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (435:17): [True: 0, False: 1.68k]
  ------------------
  436|      0|                && s->version < TLS1_2_VERSION))
  ------------------
  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (436:20): [True: 0, False: 0]
  ------------------
  437|      4|            return EXT_RETURN_NOT_SENT;
  438|  1.69k|    } else {
  439|      0|        if (DTLS_VERSION_LT(s->client_version, DTLS1_2_VERSION)
  ------------------
  |  |   64|      0|#define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (64:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  440|      0|            || (s->ssl.method->version != DTLS_ANY_VERSION
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (440:17): [True: 0, False: 0]
  ------------------
  441|      0|                && DTLS_VERSION_LT(s->version, DTLS1_2_VERSION)))
  ------------------
  |  |   64|      0|#define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (64:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  442|      0|            return EXT_RETURN_NOT_SENT;
  443|      0|    }
  444|       |
  445|  1.68k|#ifndef OPENSSL_NO_ECH
  446|  1.68k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  1.68k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  3.37k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 1.68k, False: 0]
  |  |  |  Branch (317:44): [True: 1.68k, False: 0]
  |  |  ------------------
  |  |  318|  1.68k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 1.68k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  447|  1.68k|#endif
  448|       |
  449|  1.68k|    salglen = tls12_get_psigalgs(s, 1, &salg);
  450|  1.68k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_signature_algorithms)
  ------------------
  |  |  911|  3.37k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (450:9): [True: 0, False: 1.68k]
  ------------------
  451|       |        /* Sub-packet for sig-algs extension */
  452|  1.68k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  3.37k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (452:12): [True: 0, False: 1.68k]
  ------------------
  453|       |        /* Sub-packet for the actual list */
  454|  1.68k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  3.37k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (454:12): [True: 0, False: 1.68k]
  ------------------
  455|  1.68k|        || !tls12_copy_sigalgs(s, pkt, salg, salglen)
  ------------------
  |  Branch (455:12): [True: 0, False: 1.68k]
  ------------------
  456|  1.68k|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (456:12): [True: 0, False: 1.68k]
  ------------------
  457|  1.68k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (457:12): [True: 0, False: 1.68k]
  ------------------
  458|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  459|      0|        return EXT_RETURN_FAIL;
  460|      0|    }
  461|       |
  462|  1.68k|    return EXT_RETURN_SENT;
  463|  1.68k|}
tls_construct_ctos_status_request:
  469|  1.69k|{
  470|  1.69k|    int i;
  471|       |
  472|       |    /* This extension isn't defined for client Certificates */
  473|  1.69k|    if (x != NULL)
  ------------------
  |  Branch (473:9): [True: 0, False: 1.69k]
  ------------------
  474|      0|        return EXT_RETURN_NOT_SENT;
  475|       |
  476|  1.69k|    if (s->ext.status_type != TLSEXT_STATUSTYPE_ocsp)
  ------------------
  |  |  181|  1.69k|#define TLSEXT_STATUSTYPE_ocsp 1
  ------------------
  |  Branch (476:9): [True: 1.69k, False: 2]
  ------------------
  477|  1.69k|        return EXT_RETURN_NOT_SENT;
  478|      2|#ifndef OPENSSL_NO_ECH
  479|      2|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      2|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      4|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 2, False: 0]
  |  |  |  Branch (317:44): [True: 2, False: 0]
  |  |  ------------------
  |  |  318|      2|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 2]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  480|      2|#endif
  481|       |
  482|      2|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_status_request)
  ------------------
  |  |  911|      4|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (482:9): [True: 0, False: 2]
  ------------------
  483|       |        /* Sub-packet for status request extension */
  484|      2|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      4|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (484:12): [True: 0, False: 2]
  ------------------
  485|      2|        || !WPACKET_put_bytes_u8(pkt, TLSEXT_STATUSTYPE_ocsp)
  ------------------
  |  |  909|      4|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (485:12): [True: 0, False: 2]
  ------------------
  486|       |        /* Sub-packet for the ids */
  487|      2|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|      2|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (487:12): [True: 0, False: 2]
  ------------------
  488|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  489|      0|        return EXT_RETURN_FAIL;
  490|      0|    }
  491|      2|    for (i = 0; i < sk_OCSP_RESPID_num(s->ext.ocsp.ids); i++) {
  ------------------
  |  |  166|      2|#define sk_OCSP_RESPID_num(sk) OPENSSL_sk_num(ossl_check_const_OCSP_RESPID_sk_type(sk))
  ------------------
  |  Branch (491:17): [True: 0, False: 2]
  ------------------
  492|      0|        unsigned char *idbytes;
  493|      0|        OCSP_RESPID *id = sk_OCSP_RESPID_value(s->ext.ocsp.ids, i);
  ------------------
  |  |  167|      0|#define sk_OCSP_RESPID_value(sk, idx) ((OCSP_RESPID *)OPENSSL_sk_value(ossl_check_const_OCSP_RESPID_sk_type(sk), (idx)))
  ------------------
  494|      0|        int idlen = i2d_OCSP_RESPID(id, NULL);
  495|       |
  496|      0|        if (idlen <= 0
  ------------------
  |  Branch (496:13): [True: 0, False: 0]
  ------------------
  497|       |            /* Sub-packet for an individual id */
  498|      0|            || !WPACKET_sub_allocate_bytes_u16(pkt, idlen, &idbytes)
  ------------------
  |  |  851|      0|    WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 2)
  ------------------
  |  Branch (498:16): [True: 0, False: 0]
  ------------------
  499|      0|            || i2d_OCSP_RESPID(id, &idbytes) != idlen) {
  ------------------
  |  Branch (499:16): [True: 0, False: 0]
  ------------------
  500|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  501|      0|            return EXT_RETURN_FAIL;
  502|      0|        }
  503|      0|    }
  504|      2|    if (!WPACKET_close(pkt)
  ------------------
  |  Branch (504:9): [True: 0, False: 2]
  ------------------
  505|      2|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|      2|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (505:12): [True: 0, False: 2]
  ------------------
  506|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  507|      0|        return EXT_RETURN_FAIL;
  508|      0|    }
  509|      2|    if (s->ext.ocsp.exts) {
  ------------------
  |  Branch (509:9): [True: 0, False: 2]
  ------------------
  510|      0|        unsigned char *extbytes;
  511|      0|        int extlen = i2d_X509_EXTENSIONS(s->ext.ocsp.exts, NULL);
  512|       |
  513|      0|        if (extlen < 0) {
  ------------------
  |  Branch (513:13): [True: 0, False: 0]
  ------------------
  514|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  515|      0|            return EXT_RETURN_FAIL;
  516|      0|        }
  517|      0|        if (!WPACKET_allocate_bytes(pkt, extlen, &extbytes)
  ------------------
  |  Branch (517:13): [True: 0, False: 0]
  ------------------
  518|      0|            || i2d_X509_EXTENSIONS(s->ext.ocsp.exts, &extbytes)
  ------------------
  |  Branch (518:16): [True: 0, False: 0]
  ------------------
  519|      0|                != extlen) {
  520|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  521|      0|            return EXT_RETURN_FAIL;
  522|      0|        }
  523|      0|    }
  524|      2|    if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (524:9): [True: 0, False: 2]
  |  Branch (524:32): [True: 0, False: 2]
  ------------------
  525|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  526|      0|        return EXT_RETURN_FAIL;
  527|      0|    }
  528|       |
  529|      2|    return EXT_RETURN_SENT;
  530|      2|}
tls_construct_ctos_npn:
  537|  1.69k|{
  538|  1.69k|    if (SSL_CONNECTION_GET_CTX(s)->ext.npn_select_cb == NULL
  ------------------
  |  |   26|  1.69k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  |  Branch (538:9): [True: 1.69k, False: 0]
  ------------------
  539|      0|        || !SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  285|      0|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 0, False: 0]
  |  |  ------------------
  |  |  286|      0|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  540|  1.69k|        return EXT_RETURN_NOT_SENT;
  541|      0|#ifndef OPENSSL_NO_ECH
  542|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  543|      0|#endif
  544|       |
  545|       |    /*
  546|       |     * The client advertises an empty extension to indicate its support
  547|       |     * for Next Protocol Negotiation
  548|       |     */
  549|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_next_proto_neg)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (549:9): [True: 0, False: 0]
  ------------------
  550|      0|        || !WPACKET_put_bytes_u16(pkt, 0)) {
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (550:12): [True: 0, False: 0]
  ------------------
  551|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  552|      0|        return EXT_RETURN_FAIL;
  553|      0|    }
  554|       |
  555|      0|    return EXT_RETURN_SENT;
  556|      0|}
tls_construct_ctos_alpn:
  562|  1.68k|{
  563|  1.68k|    unsigned char *aval = s->ext.alpn;
  564|  1.68k|    size_t alen = s->ext.alpn_len;
  565|       |
  566|  1.68k|    s->s3.alpn_sent = 0;
  567|  1.68k|    if (!SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  285|  1.68k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 1.68k, False: 0]
  |  |  ------------------
  |  |  286|  1.68k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  568|      0|        return EXT_RETURN_NOT_SENT;
  569|  1.68k|#ifndef OPENSSL_NO_ECH
  570|       |    /*
  571|       |     * If we have different alpn and alpn_outer values, then we set
  572|       |     * the appropriate one for inner and outer.
  573|       |     * If no alpn is set (for inner or outer), we don't send any.
  574|       |     * If only an inner is set then we send the same in both.
  575|       |     * Logic above is on the basis that alpn's aren't that sensitive,
  576|       |     * usually, so special action is needed to do better.
  577|       |     * We also don't support a way to send alpn only in the inner.
  578|       |     * If you don't want the inner value in the outer, you have to
  579|       |     * pick what to send in the outer and send that.
  580|       |     */
  581|  1.68k|    if (s->ext.ech.ch_depth == 1 && s->ext.alpn == NULL) /* inner */
  ------------------
  |  Branch (581:9): [True: 0, False: 1.68k]
  |  Branch (581:37): [True: 0, False: 0]
  ------------------
  582|      0|        return EXT_RETURN_NOT_SENT;
  583|  1.68k|    if (s->ext.ech.ch_depth == 0 && s->ext.alpn == NULL
  ------------------
  |  Branch (583:9): [True: 1.68k, False: 0]
  |  Branch (583:37): [True: 1.24k, False: 441]
  ------------------
  584|  1.24k|        && s->ext.ech.alpn_outer == NULL) /* outer */
  ------------------
  |  Branch (584:12): [True: 1.24k, False: 0]
  ------------------
  585|  1.24k|        return EXT_RETURN_NOT_SENT;
  586|    441|    if (s->ext.ech.ch_depth == 0 && s->ext.ech.alpn_outer != NULL) {
  ------------------
  |  Branch (586:9): [True: 441, False: 0]
  |  Branch (586:37): [True: 0, False: 441]
  ------------------
  587|      0|        aval = s->ext.ech.alpn_outer;
  588|      0|        alen = s->ext.ech.alpn_outer_len;
  589|      0|    }
  590|    441|#endif
  591|    441|    if (aval == NULL)
  ------------------
  |  Branch (591:9): [True: 0, False: 441]
  ------------------
  592|      0|        return EXT_RETURN_NOT_SENT;
  593|    441|    if (!WPACKET_put_bytes_u16(pkt,
  ------------------
  |  |  911|    882|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (593:9): [True: 0, False: 441]
  ------------------
  594|    441|            TLSEXT_TYPE_application_layer_protocol_negotiation)
  595|       |        /* Sub-packet ALPN extension */
  596|    441|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|    882|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (596:12): [True: 0, False: 441]
  ------------------
  597|    441|        || !WPACKET_sub_memcpy_u16(pkt, aval, alen)
  ------------------
  |  |  940|    882|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (597:12): [True: 0, False: 441]
  ------------------
  598|    441|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (598:12): [True: 0, False: 441]
  ------------------
  599|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  600|      0|        return EXT_RETURN_FAIL;
  601|      0|    }
  602|    441|    s->s3.alpn_sent = 1;
  603|    441|    return EXT_RETURN_SENT;
  604|    441|}
tls_construct_ctos_use_srtp:
  610|  1.69k|{
  611|  1.69k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  1.69k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  612|  1.69k|    STACK_OF(SRTP_PROTECTION_PROFILE) *clnt = SSL_get_srtp_profiles(ssl);
  ------------------
  |  |   33|  1.69k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  613|  1.69k|    int i, end;
  614|       |
  615|  1.69k|    if (clnt == NULL)
  ------------------
  |  Branch (615:9): [True: 1.69k, False: 0]
  ------------------
  616|  1.69k|        return EXT_RETURN_NOT_SENT;
  617|      0|#ifndef OPENSSL_NO_ECH
  618|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  619|      0|#endif
  620|       |
  621|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_use_srtp)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (621:9): [True: 0, False: 0]
  ------------------
  622|       |        /* Sub-packet for SRTP extension */
  623|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (623:12): [True: 0, False: 0]
  ------------------
  624|       |        /* Sub-packet for the protection profile list */
  625|      0|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (625:12): [True: 0, False: 0]
  ------------------
  626|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  627|      0|        return EXT_RETURN_FAIL;
  628|      0|    }
  629|       |
  630|      0|    end = sk_SRTP_PROTECTION_PROFILE_num(clnt);
  ------------------
  |  |  251|      0|#define sk_SRTP_PROTECTION_PROFILE_num(sk) OPENSSL_sk_num(ossl_check_const_SRTP_PROTECTION_PROFILE_sk_type(sk))
  ------------------
  631|      0|    for (i = 0; i < end; i++) {
  ------------------
  |  Branch (631:17): [True: 0, False: 0]
  ------------------
  632|      0|        const SRTP_PROTECTION_PROFILE *prof = sk_SRTP_PROTECTION_PROFILE_value(clnt, i);
  ------------------
  |  |  252|      0|#define sk_SRTP_PROTECTION_PROFILE_value(sk, idx) ((SRTP_PROTECTION_PROFILE *)OPENSSL_sk_value(ossl_check_const_SRTP_PROTECTION_PROFILE_sk_type(sk), (idx)))
  ------------------
  633|       |
  634|      0|        if (prof == NULL || !WPACKET_put_bytes_u16(pkt, prof->id)) {
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (634:13): [True: 0, False: 0]
  |  Branch (634:29): [True: 0, False: 0]
  ------------------
  635|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  636|      0|            return EXT_RETURN_FAIL;
  637|      0|        }
  638|      0|    }
  639|      0|    if (!WPACKET_close(pkt)
  ------------------
  |  Branch (639:9): [True: 0, False: 0]
  ------------------
  640|       |        /* Add an empty use_mki value */
  641|      0|        || !WPACKET_put_bytes_u8(pkt, 0)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (641:12): [True: 0, False: 0]
  ------------------
  642|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (642:12): [True: 0, False: 0]
  ------------------
  643|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  644|      0|        return EXT_RETURN_FAIL;
  645|      0|    }
  646|       |
  647|      0|    return EXT_RETURN_SENT;
  648|      0|}
tls_construct_ctos_etm:
  654|  1.69k|{
  655|  1.69k|    if (s->options & SSL_OP_NO_ENCRYPT_THEN_MAC)
  ------------------
  |  |  399|  1.69k|#define SSL_OP_NO_ENCRYPT_THEN_MAC SSL_OP_BIT(19)
  |  |  ------------------
  |  |  |  |  351|  1.69k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (655:9): [True: 0, False: 1.69k]
  ------------------
  656|      0|        return EXT_RETURN_NOT_SENT;
  657|  1.69k|#ifndef OPENSSL_NO_ECH
  658|  1.69k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  1.69k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  3.38k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 1.69k, False: 0]
  |  |  |  Branch (317:44): [True: 1.69k, False: 0]
  |  |  ------------------
  |  |  318|  1.69k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 1.69k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  659|  1.69k|#endif
  660|       |
  661|  1.69k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_encrypt_then_mac)
  ------------------
  |  |  911|  3.38k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (661:9): [True: 0, False: 1.69k]
  ------------------
  662|  1.69k|        || !WPACKET_put_bytes_u16(pkt, 0)) {
  ------------------
  |  |  911|  1.69k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (662:12): [True: 0, False: 1.69k]
  ------------------
  663|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  664|      0|        return EXT_RETURN_FAIL;
  665|      0|    }
  666|       |
  667|  1.69k|    return EXT_RETURN_SENT;
  668|  1.69k|}
tls_construct_ctos_sct:
  674|  1.69k|{
  675|  1.69k|    if (s->ct_validation_callback == NULL)
  ------------------
  |  Branch (675:9): [True: 1.69k, False: 0]
  ------------------
  676|  1.69k|        return EXT_RETURN_NOT_SENT;
  677|       |
  678|       |    /* Not defined for client Certificates */
  679|      0|    if (x != NULL)
  ------------------
  |  Branch (679:9): [True: 0, False: 0]
  ------------------
  680|      0|        return EXT_RETURN_NOT_SENT;
  681|      0|#ifndef OPENSSL_NO_ECH
  682|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  683|      0|#endif
  684|       |
  685|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_signed_certificate_timestamp)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (685:9): [True: 0, False: 0]
  ------------------
  686|      0|        || !WPACKET_put_bytes_u16(pkt, 0)) {
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (686:12): [True: 0, False: 0]
  ------------------
  687|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  688|      0|        return EXT_RETURN_FAIL;
  689|      0|    }
  690|       |
  691|      0|    return EXT_RETURN_SENT;
  692|      0|}
tls_construct_ctos_ems:
  698|  1.69k|{
  699|  1.69k|    if (s->options & SSL_OP_NO_EXTENDED_MASTER_SECRET)
  ------------------
  |  |  357|  1.69k|#define SSL_OP_NO_EXTENDED_MASTER_SECRET SSL_OP_BIT(0)
  |  |  ------------------
  |  |  |  |  351|  1.69k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (699:9): [True: 0, False: 1.69k]
  ------------------
  700|      0|        return EXT_RETURN_NOT_SENT;
  701|  1.69k|#ifndef OPENSSL_NO_ECH
  702|  1.69k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  1.69k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  3.38k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 1.69k, False: 0]
  |  |  |  Branch (317:44): [True: 1.69k, False: 0]
  |  |  ------------------
  |  |  318|  1.69k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 1.69k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  703|  1.69k|#endif
  704|       |
  705|  1.69k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_extended_master_secret)
  ------------------
  |  |  911|  3.38k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (705:9): [True: 0, False: 1.69k]
  ------------------
  706|  1.69k|        || !WPACKET_put_bytes_u16(pkt, 0)) {
  ------------------
  |  |  911|  1.69k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (706:12): [True: 0, False: 1.69k]
  ------------------
  707|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  708|      0|        return EXT_RETURN_FAIL;
  709|      0|    }
  710|       |
  711|  1.69k|    return EXT_RETURN_SENT;
  712|  1.69k|}
tls_construct_ctos_supported_versions:
  717|  1.69k|{
  718|  1.69k|    int currv, min_version, max_version, reason;
  719|       |
  720|  1.69k|    reason = ssl_get_min_max_version(s, &min_version, &max_version, NULL);
  721|  1.69k|    if (reason != 0) {
  ------------------
  |  Branch (721:9): [True: 0, False: 1.69k]
  ------------------
  722|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, reason);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  723|      0|        return EXT_RETURN_FAIL;
  724|      0|    }
  725|       |
  726|       |    /*
  727|       |     * Don't include this if we can't negotiate TLSv1.3. We can do a straight
  728|       |     * comparison here because we will never be called in DTLS.
  729|       |     */
  730|  1.69k|    if (max_version < TLS1_3_VERSION)
  ------------------
  |  |   27|  1.69k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (730:9): [True: 28, False: 1.66k]
  ------------------
  731|     28|        return EXT_RETURN_NOT_SENT;
  732|  1.66k|#ifndef OPENSSL_NO_ECH
  733|  1.66k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  1.66k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  3.33k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 1.66k, False: 0]
  |  |  |  Branch (317:44): [True: 1.66k, False: 0]
  |  |  ------------------
  |  |  318|  1.66k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 1.66k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  734|  1.66k|#endif
  735|       |
  736|  1.66k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_supported_versions)
  ------------------
  |  |  911|  3.33k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (736:9): [True: 0, False: 1.66k]
  ------------------
  737|  1.66k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  3.33k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (737:12): [True: 0, False: 1.66k]
  ------------------
  738|  1.66k|        || !WPACKET_start_sub_packet_u8(pkt)) {
  ------------------
  |  |  810|  1.66k|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (738:12): [True: 0, False: 1.66k]
  ------------------
  739|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  740|      0|        return EXT_RETURN_FAIL;
  741|      0|    }
  742|       |
  743|  4.99k|    for (currv = max_version; currv >= min_version; currv--) {
  ------------------
  |  Branch (743:31): [True: 3.33k, False: 1.66k]
  ------------------
  744|  3.33k|        if (!WPACKET_put_bytes_u16(pkt, currv)) {
  ------------------
  |  |  911|  3.33k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (744:13): [True: 0, False: 3.33k]
  ------------------
  745|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  746|      0|            return EXT_RETURN_FAIL;
  747|      0|        }
  748|  3.33k|    }
  749|  1.66k|    if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (749:9): [True: 0, False: 1.66k]
  |  Branch (749:32): [True: 0, False: 1.66k]
  ------------------
  750|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  751|      0|        return EXT_RETURN_FAIL;
  752|      0|    }
  753|       |
  754|  1.66k|    return EXT_RETURN_SENT;
  755|  1.66k|}
tls_construct_ctos_psk_kex_modes:
  763|  1.66k|{
  764|  1.66k|#ifndef OPENSSL_NO_TLS1_3
  765|  1.66k|    int nodhe = s->options & SSL_OP_ALLOW_NO_DHE_KEX;
  ------------------
  |  |  370|  1.66k|#define SSL_OP_ALLOW_NO_DHE_KEX SSL_OP_BIT(10)
  |  |  ------------------
  |  |  |  |  351|  1.66k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  766|       |
  767|  1.66k|#ifndef OPENSSL_NO_ECH
  768|  1.66k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  1.66k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  3.33k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 1.66k, False: 0]
  |  |  |  Branch (317:44): [True: 1.66k, False: 0]
  |  |  ------------------
  |  |  318|  1.66k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 1.66k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  769|  1.66k|#endif
  770|       |
  771|  1.66k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_psk_kex_modes)
  ------------------
  |  |  911|  3.33k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (771:9): [True: 0, False: 1.66k]
  ------------------
  772|  1.66k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  3.33k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (772:12): [True: 0, False: 1.66k]
  ------------------
  773|  1.66k|        || !WPACKET_start_sub_packet_u8(pkt)
  ------------------
  |  |  810|  3.33k|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (773:12): [True: 0, False: 1.66k]
  ------------------
  774|  1.66k|        || !WPACKET_put_bytes_u8(pkt, TLSEXT_KEX_MODE_KE_DHE)
  ------------------
  |  |  909|  3.33k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (774:12): [True: 0, False: 1.66k]
  ------------------
  775|  1.66k|        || (nodhe && !WPACKET_put_bytes_u8(pkt, TLSEXT_KEX_MODE_KE))
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (775:13): [True: 0, False: 1.66k]
  |  Branch (775:22): [True: 0, False: 0]
  ------------------
  776|  1.66k|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (776:12): [True: 0, False: 1.66k]
  ------------------
  777|  1.66k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (777:12): [True: 0, False: 1.66k]
  ------------------
  778|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  779|      0|        return EXT_RETURN_FAIL;
  780|      0|    }
  781|       |
  782|  1.66k|    s->ext.psk_kex_mode = TLSEXT_KEX_MODE_FLAG_KE_DHE;
  ------------------
  |  | 2224|  1.66k|#define TLSEXT_KEX_MODE_FLAG_KE_DHE 2
  ------------------
  783|  1.66k|    if (nodhe)
  ------------------
  |  Branch (783:9): [True: 0, False: 1.66k]
  ------------------
  784|      0|        s->ext.psk_kex_mode |= TLSEXT_KEX_MODE_FLAG_KE;
  ------------------
  |  | 2223|      0|#define TLSEXT_KEX_MODE_FLAG_KE 1
  ------------------
  785|  1.66k|#endif
  786|       |
  787|  1.66k|    return EXT_RETURN_SENT;
  788|  1.66k|}
tls_construct_ctos_key_share:
  854|  1.66k|{
  855|  1.66k|#ifndef OPENSSL_NO_TLS1_3
  856|  1.66k|    size_t i, num_groups = 0;
  857|  1.66k|    const uint16_t *pgroups = NULL;
  858|  1.66k|    uint16_t group_id = 0;
  859|  1.66k|    int add_only_one = 0;
  860|  1.66k|    size_t valid_keyshare = 0;
  861|       |
  862|  1.66k|#ifndef OPENSSL_NO_ECH
  863|  1.66k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  1.66k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  3.33k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 1.66k, False: 0]
  |  |  |  Branch (317:44): [True: 1.66k, False: 0]
  |  |  ------------------
  |  |  318|  1.66k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 1.66k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  864|  1.66k|#endif
  865|       |
  866|       |    /* key_share extension */
  867|  1.66k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_key_share)
  ------------------
  |  |  911|  3.33k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (867:9): [True: 0, False: 1.66k]
  ------------------
  868|       |        /* Extension data sub-packet */
  869|  1.66k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  3.33k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (869:12): [True: 0, False: 1.66k]
  ------------------
  870|       |        /* KeyShare list sub-packet */
  871|  1.66k|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|  1.66k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (871:12): [True: 0, False: 1.66k]
  ------------------
  872|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  873|      0|        return EXT_RETURN_FAIL;
  874|      0|    }
  875|       |
  876|  1.66k|    tls1_get_requested_keyshare_groups(s, &pgroups, &num_groups);
  877|  1.66k|    if (num_groups == 1 && pgroups[0] == 0) { /* Indication that no * prefix was used */
  ------------------
  |  Branch (877:9): [True: 222, False: 1.44k]
  |  Branch (877:28): [True: 218, False: 4]
  ------------------
  878|    218|        tls1_get_supported_groups(s, &pgroups, &num_groups);
  879|    218|        add_only_one = 1;
  880|    218|    }
  881|       |
  882|       |    /* If neither the default nor the keyshares have any entry --> fatal */
  883|  1.66k|    if (num_groups == 0) {
  ------------------
  |  Branch (883:9): [True: 1, False: 1.66k]
  ------------------
  884|      1|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_KEY_SHARE);
  ------------------
  |  |  155|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      1|    (ERR_new(),                                                  \
  |  |  |  |  158|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  885|      1|        return EXT_RETURN_FAIL;
  886|      1|    }
  887|       |
  888|       |    /* Add key shares */
  889|       |
  890|  1.66k|    if (s->s3.group_id != 0 && s->s3.tmp.pkey == NULL) {
  ------------------
  |  Branch (890:9): [True: 0, False: 1.66k]
  |  Branch (890:32): [True: 0, False: 0]
  ------------------
  891|       |        /* new, single key share */
  892|      0|        group_id = s->s3.group_id;
  893|      0|        s->s3.tmp.num_ks_pkey = 0;
  894|      0|        if (!add_key_share(s, pkt, group_id, 0)) {
  ------------------
  |  Branch (894:13): [True: 0, False: 0]
  ------------------
  895|       |            /* SSLfatal() already called */
  896|      0|            return EXT_RETURN_FAIL;
  897|      0|        }
  898|      0|        valid_keyshare++;
  899|  1.66k|    } else {
  900|  1.66k|        if (s->ext.supportedgroups == NULL) /* use default */
  ------------------
  |  Branch (900:13): [True: 0, False: 1.66k]
  ------------------
  901|      0|            add_only_one = 1;
  902|       |
  903|  4.55k|        for (i = 0; i < num_groups; i++) {
  ------------------
  |  Branch (903:21): [True: 3.10k, False: 1.44k]
  ------------------
  904|  3.10k|            if (!tls_group_allowed(s, pgroups[i], SSL_SECOP_CURVE_SUPPORTED))
  ------------------
  |  | 2749|  3.10k|#define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2730|  3.10k|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  |  Branch (904:17): [True: 19, False: 3.08k]
  ------------------
  905|     19|                continue;
  906|  3.08k|            if (!tls_valid_group(s, pgroups[i], TLS1_3_VERSION, TLS1_3_VERSION,
  ------------------
  |  |   27|  3.08k|#define TLS1_3_VERSION 0x0304
  ------------------
                          if (!tls_valid_group(s, pgroups[i], TLS1_3_VERSION, TLS1_3_VERSION,
  ------------------
  |  |   27|  3.08k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (906:17): [True: 0, False: 3.08k]
  ------------------
  907|  3.08k|                    NULL, NULL))
  908|      0|                continue;
  909|       |
  910|  3.08k|            group_id = pgroups[i];
  911|       |
  912|  3.08k|            if (group_id == 0) {
  ------------------
  |  Branch (912:17): [True: 0, False: 3.08k]
  ------------------
  913|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_KEY_SHARE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  914|      0|                return EXT_RETURN_FAIL;
  915|      0|            }
  916|  3.08k|            if (!add_key_share(s, pkt, group_id, valid_keyshare)) {
  ------------------
  |  Branch (916:17): [True: 0, False: 3.08k]
  ------------------
  917|       |                /* SSLfatal() already called */
  918|      0|                return EXT_RETURN_FAIL;
  919|      0|            }
  920|  3.08k|            valid_keyshare++;
  921|  3.08k|            if (add_only_one)
  ------------------
  |  Branch (921:17): [True: 218, False: 2.86k]
  ------------------
  922|    218|                break;
  923|  3.08k|        }
  924|  1.66k|    }
  925|       |
  926|  1.66k|    if (valid_keyshare == 0) {
  ------------------
  |  Branch (926:9): [True: 3, False: 1.66k]
  ------------------
  927|       |        /* No key shares were allowed */
  928|      3|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_KEY_SHARE);
  ------------------
  |  |  155|      3|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      3|    (ERR_new(),                                                  \
  |  |  |  |  158|      3|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      3|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      3|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  929|      3|        return EXT_RETURN_FAIL;
  930|      3|    }
  931|       |
  932|  1.66k|#ifndef OPENSSL_NO_ECH
  933|       |    /* stash inner key shares */
  934|  1.66k|    if (s->ext.ech.ch_depth == 1 && ossl_ech_stash_keyshares(s) != 1) {
  ------------------
  |  Branch (934:9): [True: 0, False: 1.66k]
  |  Branch (934:37): [True: 0, False: 0]
  ------------------
  935|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  936|      0|        return EXT_RETURN_FAIL;
  937|      0|    }
  938|  1.66k|#endif
  939|       |
  940|  1.66k|    if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (940:9): [True: 0, False: 1.66k]
  |  Branch (940:32): [True: 0, False: 1.66k]
  ------------------
  941|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  942|      0|        return EXT_RETURN_FAIL;
  943|      0|    }
  944|  1.66k|    return EXT_RETURN_SENT;
  945|       |#else
  946|       |    return EXT_RETURN_NOT_SENT;
  947|       |#endif
  948|  1.66k|}
tls_construct_ctos_cookie:
  953|  1.66k|{
  954|  1.66k|    EXT_RETURN ret = EXT_RETURN_FAIL;
  955|       |
  956|       |    /* Should only be set if we've had an HRR */
  957|  1.66k|    if (s->ext.tls13_cookie_len == 0)
  ------------------
  |  Branch (957:9): [True: 1.66k, False: 0]
  ------------------
  958|  1.66k|        return EXT_RETURN_NOT_SENT;
  959|      0|#ifndef OPENSSL_NO_ECH
  960|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  961|      0|#endif
  962|       |
  963|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_cookie)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (963:9): [True: 0, False: 0]
  ------------------
  964|       |        /* Extension data sub-packet */
  965|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (965:12): [True: 0, False: 0]
  ------------------
  966|      0|        || !WPACKET_sub_memcpy_u16(pkt, s->ext.tls13_cookie,
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (966:12): [True: 0, False: 0]
  ------------------
  967|      0|            s->ext.tls13_cookie_len)
  968|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (968:12): [True: 0, False: 0]
  ------------------
  969|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  970|      0|        goto end;
  971|      0|    }
  972|       |
  973|      0|    ret = EXT_RETURN_SENT;
  974|      0|end:
  975|      0|    OPENSSL_free(s->ext.tls13_cookie);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  976|      0|    s->ext.tls13_cookie = NULL;
  977|      0|    s->ext.tls13_cookie_len = 0;
  978|       |
  979|      0|    return ret;
  980|      0|}
tls_construct_ctos_early_data:
  985|  1.66k|{
  986|  1.66k|#ifndef OPENSSL_NO_PSK
  987|  1.66k|    char identity[PSK_MAX_IDENTITY_LEN + 1];
  988|  1.66k|#endif /* OPENSSL_NO_PSK */
  989|  1.66k|    const unsigned char *id = NULL;
  990|  1.66k|    size_t idlen = 0;
  991|  1.66k|    SSL_SESSION *psksess = NULL;
  992|  1.66k|    SSL_SESSION *edsess = NULL;
  993|  1.66k|    const EVP_MD *handmd = NULL;
  994|  1.66k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  1.66k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  995|       |
  996|  1.66k|#ifndef OPENSSL_NO_ECH
  997|       |    /*
  998|       |     * If we're attempting ECH and processing the outer CH
  999|       |     * then we only need to check if the extension is to be
 1000|       |     * sent or not - any other processing (with side effects)
 1001|       |     * happened already for the inner CH.
 1002|       |     */
 1003|  1.66k|    if (s->ext.ech.es != NULL && s->ext.ech.ch_depth == 0) {
  ------------------
  |  Branch (1003:9): [True: 0, False: 1.66k]
  |  Branch (1003:34): [True: 0, False: 0]
  ------------------
 1004|       |        /*
 1005|       |         * if we called this for inner and did send then
 1006|       |         * the following two things should be set, if so,
 1007|       |         * then send again in the outer CH.
 1008|       |         */
 1009|      0|        if (s->ext.early_data == SSL_EARLY_DATA_REJECTED
  ------------------
  |  | 2073|      0|#define SSL_EARLY_DATA_REJECTED 1
  ------------------
  |  Branch (1009:13): [True: 0, False: 0]
  ------------------
 1010|      0|            && s->ext.early_data_ok == 1) {
  ------------------
  |  Branch (1010:16): [True: 0, False: 0]
  ------------------
 1011|      0|            if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_early_data)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1011:17): [True: 0, False: 0]
  ------------------
 1012|      0|                || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1012:20): [True: 0, False: 0]
  ------------------
 1013|      0|                || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1013:20): [True: 0, False: 0]
  ------------------
 1014|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1015|      0|                return EXT_RETURN_FAIL;
 1016|      0|            }
 1017|      0|            return EXT_RETURN_SENT;
 1018|      0|        } else {
 1019|      0|            return EXT_RETURN_NOT_SENT;
 1020|      0|        }
 1021|      0|    }
 1022|  1.66k|#endif
 1023|  1.66k|    if (s->hello_retry_request == SSL_HRR_PENDING)
  ------------------
  |  Branch (1023:9): [True: 0, False: 1.66k]
  ------------------
 1024|      0|        handmd = ssl_handshake_md(s);
 1025|       |
 1026|  1.66k|    if (s->psk_use_session_cb != NULL
  ------------------
  |  Branch (1026:9): [True: 0, False: 1.66k]
  ------------------
 1027|      0|        && (!s->psk_use_session_cb(ussl, handmd, &id, &idlen, &psksess)
  ------------------
  |  Branch (1027:13): [True: 0, False: 0]
  ------------------
 1028|      0|            || (psksess != NULL
  ------------------
  |  Branch (1028:17): [True: 0, False: 0]
  ------------------
 1029|      0|                && psksess->ssl_version != TLS1_3_VERSION))) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1029:20): [True: 0, False: 0]
  ------------------
 1030|      0|        SSL_SESSION_free(psksess);
 1031|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_PSK);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1032|      0|        return EXT_RETURN_FAIL;
 1033|      0|    }
 1034|       |
 1035|  1.66k|#ifndef OPENSSL_NO_PSK
 1036|  1.66k|    if (psksess == NULL && s->psk_client_callback != NULL) {
  ------------------
  |  Branch (1036:9): [True: 1.66k, False: 0]
  |  Branch (1036:28): [True: 0, False: 1.66k]
  ------------------
 1037|      0|        unsigned char psk[PSK_MAX_PSK_LEN];
 1038|      0|        size_t psklen = 0;
 1039|       |
 1040|      0|        memset(identity, 0, sizeof(identity));
 1041|      0|        psklen = s->psk_client_callback(ussl, NULL,
 1042|      0|            identity, sizeof(identity) - 1,
 1043|      0|            psk, sizeof(psk));
 1044|       |
 1045|      0|        if (psklen > PSK_MAX_PSK_LEN) {
  ------------------
  |  |  885|      0|#define PSK_MAX_PSK_LEN 512
  ------------------
  |  Branch (1045:13): [True: 0, False: 0]
  ------------------
 1046|      0|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1047|      0|            return EXT_RETURN_FAIL;
 1048|      0|        } else if (psklen > 0) {
  ------------------
  |  Branch (1048:20): [True: 0, False: 0]
  ------------------
 1049|      0|            const unsigned char tls13_aes128gcmsha256_id[] = { 0x13, 0x01 };
 1050|      0|            const SSL_CIPHER *cipher;
 1051|       |
 1052|      0|            idlen = strlen(identity);
 1053|      0|            if (idlen > PSK_MAX_IDENTITY_LEN) {
  ------------------
  |  |  884|      0|#define PSK_MAX_IDENTITY_LEN 256
  ------------------
  |  Branch (1053:17): [True: 0, False: 0]
  ------------------
 1054|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1055|      0|                return EXT_RETURN_FAIL;
 1056|      0|            }
 1057|      0|            id = (unsigned char *)identity;
 1058|       |
 1059|       |            /*
 1060|       |             * We found a PSK using an old style callback. We don't know
 1061|       |             * the digest so we default to SHA256 as per the TLSv1.3 spec
 1062|       |             */
 1063|      0|            cipher = SSL_CIPHER_find(SSL_CONNECTION_GET_SSL(s),
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1064|      0|                tls13_aes128gcmsha256_id);
 1065|      0|            if (cipher == NULL) {
  ------------------
  |  Branch (1065:17): [True: 0, False: 0]
  ------------------
 1066|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1067|      0|                return EXT_RETURN_FAIL;
 1068|      0|            }
 1069|       |
 1070|      0|            psksess = SSL_SESSION_new();
 1071|      0|            if (psksess == NULL
  ------------------
  |  Branch (1071:17): [True: 0, False: 0]
  ------------------
 1072|      0|                || !SSL_SESSION_set1_master_key(psksess, psk, psklen)
  ------------------
  |  Branch (1072:20): [True: 0, False: 0]
  ------------------
 1073|      0|                || !SSL_SESSION_set_cipher(psksess, cipher)
  ------------------
  |  Branch (1073:20): [True: 0, False: 0]
  ------------------
 1074|      0|                || !SSL_SESSION_set_protocol_version(psksess, TLS1_3_VERSION)) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1074:20): [True: 0, False: 0]
  ------------------
 1075|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1076|      0|                OPENSSL_cleanse(psk, psklen);
 1077|      0|                return EXT_RETURN_FAIL;
 1078|      0|            }
 1079|      0|            OPENSSL_cleanse(psk, psklen);
 1080|      0|        }
 1081|      0|    }
 1082|  1.66k|#endif /* OPENSSL_NO_PSK */
 1083|       |
 1084|  1.66k|    SSL_SESSION_free(s->psksession);
 1085|  1.66k|    s->psksession = psksess;
 1086|  1.66k|    if (psksess != NULL) {
  ------------------
  |  Branch (1086:9): [True: 0, False: 1.66k]
  ------------------
 1087|      0|        OPENSSL_free(s->psksession_id);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1088|      0|        s->psksession_id = OPENSSL_memdup(id, idlen);
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1089|      0|        if (s->psksession_id == NULL) {
  ------------------
  |  Branch (1089:13): [True: 0, False: 0]
  ------------------
 1090|      0|            s->psksession_id_len = 0;
 1091|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1092|      0|            return EXT_RETURN_FAIL;
 1093|      0|        }
 1094|      0|        s->psksession_id_len = idlen;
 1095|      0|    }
 1096|       |
 1097|  1.66k|    if (s->early_data_state != SSL_EARLY_DATA_CONNECTING
  ------------------
  |  Branch (1097:9): [True: 1.66k, False: 0]
  ------------------
 1098|      0|        || (s->session->ext.max_early_data == 0
  ------------------
  |  Branch (1098:13): [True: 0, False: 0]
  ------------------
 1099|  1.66k|            && (psksess == NULL || psksess->ext.max_early_data == 0))) {
  ------------------
  |  Branch (1099:17): [True: 0, False: 0]
  |  Branch (1099:36): [True: 0, False: 0]
  ------------------
 1100|  1.66k|        s->max_early_data = 0;
 1101|  1.66k|        return EXT_RETURN_NOT_SENT;
 1102|  1.66k|    }
 1103|      0|    edsess = s->session->ext.max_early_data != 0 ? s->session : psksess;
  ------------------
  |  Branch (1103:14): [True: 0, False: 0]
  ------------------
 1104|      0|    s->max_early_data = edsess->ext.max_early_data;
 1105|       |
 1106|      0|    if (edsess->ext.hostname != NULL) {
  ------------------
  |  Branch (1106:9): [True: 0, False: 0]
  ------------------
 1107|      0|        if (s->ext.hostname == NULL
  ------------------
  |  Branch (1107:13): [True: 0, False: 0]
  ------------------
 1108|      0|            || (s->ext.hostname != NULL
  ------------------
  |  Branch (1108:17): [True: 0, False: 0]
  ------------------
 1109|      0|                && strcmp(s->ext.hostname, edsess->ext.hostname) != 0)) {
  ------------------
  |  Branch (1109:20): [True: 0, False: 0]
  ------------------
 1110|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1111|      0|                SSL_R_INCONSISTENT_EARLY_DATA_SNI);
 1112|      0|            return EXT_RETURN_FAIL;
 1113|      0|        }
 1114|      0|    }
 1115|       |
 1116|      0|    if ((s->ext.alpn == NULL && edsess->ext.alpn_selected != NULL)) {
  ------------------
  |  Branch (1116:10): [True: 0, False: 0]
  |  Branch (1116:33): [True: 0, False: 0]
  ------------------
 1117|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_INCONSISTENT_EARLY_DATA_ALPN);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1118|      0|        return EXT_RETURN_FAIL;
 1119|      0|    }
 1120|       |
 1121|       |    /*
 1122|       |     * Verify that we are offering an ALPN protocol consistent with the early
 1123|       |     * data.
 1124|       |     */
 1125|      0|    if (edsess->ext.alpn_selected != NULL) {
  ------------------
  |  Branch (1125:9): [True: 0, False: 0]
  ------------------
 1126|      0|        PACKET prots, alpnpkt;
 1127|      0|        int found = 0;
 1128|       |
 1129|      0|        if (!PACKET_buf_init(&prots, s->ext.alpn, s->ext.alpn_len)) {
  ------------------
  |  Branch (1129:13): [True: 0, False: 0]
  ------------------
 1130|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1131|      0|            return EXT_RETURN_FAIL;
 1132|      0|        }
 1133|      0|        while (PACKET_get_length_prefixed_1(&prots, &alpnpkt)) {
  ------------------
  |  Branch (1133:16): [True: 0, False: 0]
  ------------------
 1134|      0|            if (PACKET_equal(&alpnpkt, edsess->ext.alpn_selected,
  ------------------
  |  Branch (1134:17): [True: 0, False: 0]
  ------------------
 1135|      0|                    edsess->ext.alpn_selected_len)) {
 1136|      0|                found = 1;
 1137|      0|                break;
 1138|      0|            }
 1139|      0|        }
 1140|      0|        if (!found) {
  ------------------
  |  Branch (1140:13): [True: 0, False: 0]
  ------------------
 1141|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1142|      0|                SSL_R_INCONSISTENT_EARLY_DATA_ALPN);
 1143|      0|            return EXT_RETURN_FAIL;
 1144|      0|        }
 1145|      0|    }
 1146|       |
 1147|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_early_data)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1147:9): [True: 0, False: 0]
  ------------------
 1148|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1148:12): [True: 0, False: 0]
  ------------------
 1149|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1149:12): [True: 0, False: 0]
  ------------------
 1150|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1151|      0|        return EXT_RETURN_FAIL;
 1152|      0|    }
 1153|       |
 1154|       |    /*
 1155|       |     * We set this to rejected here. Later, if the server acknowledges the
 1156|       |     * extension, we set it to accepted.
 1157|       |     */
 1158|      0|    s->ext.early_data = SSL_EARLY_DATA_REJECTED;
  ------------------
  |  | 2073|      0|#define SSL_EARLY_DATA_REJECTED 1
  ------------------
 1159|      0|    s->ext.early_data_ok = 1;
 1160|       |
 1161|      0|    return EXT_RETURN_SENT;
 1162|      0|}
tls_construct_ctos_padding:
 1184|  1.68k|{
 1185|  1.68k|    unsigned char *padbytes;
 1186|  1.68k|    size_t hlen;
 1187|       |
 1188|  1.68k|    if ((s->options & SSL_OP_TLSEXT_PADDING) == 0)
  ------------------
  |  |  364|  1.68k|#define SSL_OP_TLSEXT_PADDING SSL_OP_BIT(4)
  |  |  ------------------
  |  |  |  |  351|  1.68k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1188:9): [True: 0, False: 1.68k]
  ------------------
 1189|      0|        return EXT_RETURN_NOT_SENT;
 1190|  1.68k|#ifndef OPENSSL_NO_ECH
 1191|  1.68k|    ECH_SAME_EXT(s, context, pkt);
  ------------------
  |  |  317|  1.68k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  3.37k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 1.68k, False: 0]
  |  |  |  Branch (317:44): [True: 1.68k, False: 0]
  |  |  ------------------
  |  |  318|  1.68k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 1.68k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
 1192|  1.68k|#endif
 1193|       |
 1194|       |    /*
 1195|       |     * Add padding to workaround bugs in F5 terminators. See RFC7685.
 1196|       |     * This code calculates the length of all extensions added so far but
 1197|       |     * excludes the PSK extension (because that MUST be written last). Therefore
 1198|       |     * this extension MUST always appear second to last.
 1199|       |     */
 1200|  1.68k|    if (!WPACKET_get_total_written(pkt, &hlen)) {
  ------------------
  |  Branch (1200:9): [True: 0, False: 1.68k]
  ------------------
 1201|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1202|      0|        return EXT_RETURN_FAIL;
 1203|      0|    }
 1204|       |
 1205|       |    /*
 1206|       |     * If we're going to send a PSK then that will be written out after this
 1207|       |     * extension, so we need to calculate how long it is going to be.
 1208|       |     */
 1209|  1.68k|    if (s->session->ssl_version == TLS1_3_VERSION
  ------------------
  |  |   27|  3.37k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1209:9): [True: 1.66k, False: 28]
  ------------------
 1210|  1.66k|        && s->session->ext.ticklen != 0
  ------------------
  |  Branch (1210:12): [True: 0, False: 1.66k]
  ------------------
 1211|      0|        && s->session->cipher != NULL) {
  ------------------
  |  Branch (1211:12): [True: 0, False: 0]
  ------------------
 1212|      0|        const EVP_MD *md = ssl_md(SSL_CONNECTION_GET_CTX(s),
  ------------------
  |  |   26|      0|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1213|      0|            s->session->cipher->algorithm2);
 1214|       |
 1215|      0|        if (md != NULL) {
  ------------------
  |  Branch (1215:13): [True: 0, False: 0]
  ------------------
 1216|       |            /*
 1217|       |             * Add the fixed PSK overhead, the identity length and the binder
 1218|       |             * length.
 1219|       |             */
 1220|      0|            int md_size = EVP_MD_get_size(md);
 1221|       |
 1222|      0|            if (md_size <= 0)
  ------------------
  |  Branch (1222:17): [True: 0, False: 0]
  ------------------
 1223|      0|                return EXT_RETURN_FAIL;
 1224|      0|            hlen += PSK_PRE_BINDER_OVERHEAD + s->session->ext.ticklen
  ------------------
  |  | 1179|      0|#define PSK_PRE_BINDER_OVERHEAD (2 + 2 + 2 + 2 + 4 + 2 + 1)
  ------------------
 1225|      0|                + md_size;
 1226|      0|        }
 1227|      0|    }
 1228|       |
 1229|  1.68k|    if (hlen > F5_WORKAROUND_MIN_MSG_LEN && hlen < F5_WORKAROUND_MAX_MSG_LEN) {
  ------------------
  |  | 1164|  3.37k|#define F5_WORKAROUND_MIN_MSG_LEN 0xff
  ------------------
                  if (hlen > F5_WORKAROUND_MIN_MSG_LEN && hlen < F5_WORKAROUND_MAX_MSG_LEN) {
  ------------------
  |  | 1165|  1.59k|#define F5_WORKAROUND_MAX_MSG_LEN 0x200
  ------------------
  |  Branch (1229:9): [True: 1.59k, False: 91]
  |  Branch (1229:45): [True: 159, False: 1.43k]
  ------------------
 1230|       |        /* Calculate the amount of padding we need to add */
 1231|    159|        hlen = F5_WORKAROUND_MAX_MSG_LEN - hlen;
  ------------------
  |  | 1165|    159|#define F5_WORKAROUND_MAX_MSG_LEN 0x200
  ------------------
 1232|       |
 1233|       |        /*
 1234|       |         * Take off the size of extension header itself (2 bytes for type and
 1235|       |         * 2 bytes for length bytes), but ensure that the extension is at least
 1236|       |         * 1 byte long so as not to have an empty extension last (WebSphere 7.x,
 1237|       |         * 8.x are intolerant of that condition)
 1238|       |         */
 1239|    159|        if (hlen > 4)
  ------------------
  |  Branch (1239:13): [True: 159, False: 0]
  ------------------
 1240|    159|            hlen -= 4;
 1241|      0|        else
 1242|      0|            hlen = 1;
 1243|       |
 1244|    159|        if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_padding)
  ------------------
  |  |  911|    318|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1244:13): [True: 0, False: 159]
  ------------------
 1245|    159|            || !WPACKET_sub_allocate_bytes_u16(pkt, hlen, &padbytes)) {
  ------------------
  |  |  851|    159|    WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 2)
  ------------------
  |  Branch (1245:16): [True: 0, False: 159]
  ------------------
 1246|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1247|      0|            return EXT_RETURN_FAIL;
 1248|      0|        }
 1249|    159|        memset(padbytes, 0, hlen);
 1250|    159|    }
 1251|       |
 1252|  1.68k|    return EXT_RETURN_SENT;
 1253|  1.68k|}
tls_construct_ctos_psk:
 1261|  1.66k|{
 1262|  1.66k|#ifndef OPENSSL_NO_TLS1_3
 1263|  1.66k|    uint32_t agesec, agems = 0;
 1264|  1.66k|    size_t binderoffset, msglen;
 1265|  1.66k|    int reshashsize = 0, pskhashsize = 0;
 1266|  1.66k|    unsigned char *resbinder = NULL, *pskbinder = NULL, *msgstart = NULL;
 1267|  1.66k|    const EVP_MD *handmd = NULL, *mdres = NULL, *mdpsk = NULL;
 1268|  1.66k|    int dores = 0;
 1269|  1.66k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  1.66k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1270|  1.66k|    OSSL_TIME t;
 1271|       |
 1272|  1.66k|    s->ext.tick_identity = 0;
 1273|       |
 1274|       |    /*
 1275|       |     * Note: At this stage of the code we only support adding a single
 1276|       |     * resumption PSK. If we add support for multiple PSKs then the length
 1277|       |     * calculations in the padding extension will need to be adjusted.
 1278|       |     */
 1279|       |
 1280|       |    /*
 1281|       |     * If this is an incompatible or new session then we have nothing to resume
 1282|       |     * so don't add this extension.
 1283|       |     */
 1284|  1.66k|    if (s->session->ssl_version != TLS1_3_VERSION
  ------------------
  |  |   27|  3.32k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1284:9): [True: 0, False: 1.66k]
  ------------------
 1285|  1.66k|        || (s->session->ext.ticklen == 0 && s->psksession == NULL))
  ------------------
  |  Branch (1285:13): [True: 1.66k, False: 0]
  |  Branch (1285:45): [True: 1.66k, False: 0]
  ------------------
 1286|  1.66k|        return EXT_RETURN_NOT_SENT;
 1287|       |
 1288|      0|    if (s->hello_retry_request == SSL_HRR_PENDING)
  ------------------
  |  Branch (1288:9): [True: 0, False: 0]
  ------------------
 1289|      0|        handmd = ssl_handshake_md(s);
 1290|       |
 1291|      0|    if (s->session->ext.ticklen != 0) {
  ------------------
  |  Branch (1291:9): [True: 0, False: 0]
  ------------------
 1292|       |        /* Get the digest associated with the ciphersuite in the session */
 1293|      0|        if (s->session->cipher == NULL) {
  ------------------
  |  Branch (1293:13): [True: 0, False: 0]
  ------------------
 1294|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1295|      0|            return EXT_RETURN_FAIL;
 1296|      0|        }
 1297|      0|        mdres = ssl_md(sctx, s->session->cipher->algorithm2);
 1298|      0|        if (mdres == NULL) {
  ------------------
  |  Branch (1298:13): [True: 0, False: 0]
  ------------------
 1299|       |            /*
 1300|       |             * Don't recognize this cipher so we can't use the session.
 1301|       |             * Ignore it
 1302|       |             */
 1303|      0|            goto dopsksess;
 1304|      0|        }
 1305|       |
 1306|      0|        if (s->hello_retry_request == SSL_HRR_PENDING && mdres != handmd) {
  ------------------
  |  Branch (1306:13): [True: 0, False: 0]
  |  Branch (1306:58): [True: 0, False: 0]
  ------------------
 1307|       |            /*
 1308|       |             * Selected ciphersuite hash does not match the hash for the session
 1309|       |             * so we can't use it.
 1310|       |             */
 1311|      0|            goto dopsksess;
 1312|      0|        }
 1313|       |
 1314|      0|#ifndef OPENSSL_NO_ECH
 1315|       |        /*
 1316|       |         * When doing ECH, we get here twice (for inner then outer). The
 1317|       |         * 2nd time (for outer) we can skip some checks as we know how
 1318|       |         * those went last time.
 1319|       |         */
 1320|      0|        if (s->ext.ech.es != NULL && s->ext.ech.ch_depth == 0) {
  ------------------
  |  Branch (1320:13): [True: 0, False: 0]
  |  Branch (1320:38): [True: 0, False: 0]
  ------------------
 1321|      0|            s->ext.tick_identity = s->ext.ech.tick_identity;
 1322|      0|            dores = (s->ext.tick_identity > 0);
 1323|      0|            goto dopsksess;
 1324|      0|        }
 1325|      0|#endif
 1326|       |
 1327|       |        /*
 1328|       |         * Technically the C standard just says time() returns a time_t and says
 1329|       |         * nothing about the encoding of that type. In practice most
 1330|       |         * implementations follow POSIX which holds it as an integral type in
 1331|       |         * seconds since epoch. We've already made the assumption that we can do
 1332|       |         * this in multiple places in the code, so portability shouldn't be an
 1333|       |         * issue.
 1334|       |         */
 1335|      0|        t = ossl_time_subtract(ossl_time_now(), s->session->time);
 1336|      0|        agesec = (uint32_t)ossl_time2seconds(t);
  ------------------
  |  |   43|      0|#define ossl_time2seconds(t) (ossl_time2ticks(t) / OSSL_TIME_SECOND)
  |  |  ------------------
  |  |  |  |   31|      0|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  ------------------
  ------------------
 1337|       |
 1338|       |        /*
 1339|       |         * We calculate the age in seconds but the server may work in ms. Due to
 1340|       |         * rounding errors we could overestimate the age by up to 1s. It is
 1341|       |         * better to underestimate it. Otherwise, if the RTT is very short, when
 1342|       |         * the server calculates the age reported by the client it could be
 1343|       |         * bigger than the age calculated on the server - which should never
 1344|       |         * happen.
 1345|       |         */
 1346|      0|        if (agesec > 0)
  ------------------
  |  Branch (1346:13): [True: 0, False: 0]
  ------------------
 1347|      0|            agesec--;
 1348|       |
 1349|      0|        if (s->session->ext.tick_lifetime_hint < agesec) {
  ------------------
  |  Branch (1349:13): [True: 0, False: 0]
  ------------------
 1350|       |            /* Ticket is too old. Ignore it. */
 1351|      0|            goto dopsksess;
 1352|      0|        }
 1353|       |
 1354|       |        /*
 1355|       |         * Calculate age in ms. We're just doing it to nearest second. Should be
 1356|       |         * good enough.
 1357|       |         */
 1358|      0|        agems = agesec * (uint32_t)1000;
 1359|       |
 1360|      0|        if (agesec != 0 && agems / (uint32_t)1000 != agesec) {
  ------------------
  |  Branch (1360:13): [True: 0, False: 0]
  |  Branch (1360:28): [True: 0, False: 0]
  ------------------
 1361|       |            /*
 1362|       |             * Overflow. Shouldn't happen unless this is a *really* old session.
 1363|       |             * If so we just ignore it.
 1364|       |             */
 1365|      0|            goto dopsksess;
 1366|      0|        }
 1367|       |
 1368|       |        /*
 1369|       |         * Obfuscate the age. Overflow here is fine, this addition is supposed
 1370|       |         * to be mod 2^32.
 1371|       |         */
 1372|      0|        agems += s->session->ext.tick_age_add;
 1373|       |
 1374|      0|        reshashsize = EVP_MD_get_size(mdres);
 1375|      0|        if (reshashsize <= 0)
  ------------------
  |  Branch (1375:13): [True: 0, False: 0]
  ------------------
 1376|      0|            goto dopsksess;
 1377|      0|        s->ext.tick_identity++;
 1378|      0|#ifndef OPENSSL_NO_ECH
 1379|       |        /* stash this for re-use in outer CH */
 1380|      0|        if (s->ext.ech.es != NULL && s->ext.ech.ch_depth == 1)
  ------------------
  |  Branch (1380:13): [True: 0, False: 0]
  |  Branch (1380:38): [True: 0, False: 0]
  ------------------
 1381|      0|            s->ext.ech.tick_identity = s->ext.tick_identity;
 1382|      0|#endif
 1383|      0|        dores = 1;
 1384|      0|    }
 1385|       |
 1386|      0|dopsksess:
 1387|      0|    if (!dores && s->psksession == NULL)
  ------------------
  |  Branch (1387:9): [True: 0, False: 0]
  |  Branch (1387:19): [True: 0, False: 0]
  ------------------
 1388|      0|        return EXT_RETURN_NOT_SENT;
 1389|       |
 1390|      0|    if (s->psksession != NULL) {
  ------------------
  |  Branch (1390:9): [True: 0, False: 0]
  ------------------
 1391|      0|        mdpsk = ssl_md(sctx, s->psksession->cipher->algorithm2);
 1392|      0|        if (mdpsk == NULL) {
  ------------------
  |  Branch (1392:13): [True: 0, False: 0]
  ------------------
 1393|       |            /*
 1394|       |             * Don't recognize this cipher so we can't use the session.
 1395|       |             * If this happens it's an application bug.
 1396|       |             */
 1397|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_PSK);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1398|      0|            return EXT_RETURN_FAIL;
 1399|      0|        }
 1400|       |
 1401|      0|        if (s->hello_retry_request == SSL_HRR_PENDING && mdpsk != handmd) {
  ------------------
  |  Branch (1401:13): [True: 0, False: 0]
  |  Branch (1401:58): [True: 0, False: 0]
  ------------------
 1402|       |            /*
 1403|       |             * Selected ciphersuite hash does not match the hash for the PSK
 1404|       |             * session. This is an application bug.
 1405|       |             */
 1406|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_PSK);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1407|      0|            return EXT_RETURN_FAIL;
 1408|      0|        }
 1409|       |
 1410|      0|        pskhashsize = EVP_MD_get_size(mdpsk);
 1411|      0|        if (pskhashsize <= 0) {
  ------------------
  |  Branch (1411:13): [True: 0, False: 0]
  ------------------
 1412|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_PSK);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1413|      0|            return EXT_RETURN_FAIL;
 1414|      0|        }
 1415|      0|    }
 1416|       |
 1417|       |    /* Create the extension, but skip over the binder for now */
 1418|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_psk)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1418:9): [True: 0, False: 0]
  ------------------
 1419|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1419:12): [True: 0, False: 0]
  ------------------
 1420|      0|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1420:12): [True: 0, False: 0]
  ------------------
 1421|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1422|      0|        return EXT_RETURN_FAIL;
 1423|      0|    }
 1424|       |
 1425|      0|#ifndef OPENSSL_NO_ECH
 1426|       |    /*
 1427|       |     * For ECH if we're processing the outer CH and the inner CH
 1428|       |     * has a PSK, then we want to send a GREASE PSK in the outer.
 1429|       |     * We'll do that by just replacing the ticket value itself
 1430|       |     * with random values of the same length.
 1431|       |     */
 1432|      0|    if (s->ext.ech.es != NULL && s->ext.ech.ch_depth == 0) {
  ------------------
  |  Branch (1432:9): [True: 0, False: 0]
  |  Branch (1432:34): [True: 0, False: 0]
  ------------------
 1433|      0|        unsigned char *rndbuf = NULL, *rndbufp = NULL;
 1434|      0|        size_t totalrndsize = 0;
 1435|       |
 1436|      0|        totalrndsize = s->session->ext.ticklen
 1437|      0|            + sizeof(agems)
 1438|      0|            + s->psksession_id_len
 1439|      0|            + reshashsize
 1440|      0|            + pskhashsize;
 1441|      0|        rndbuf = OPENSSL_malloc(totalrndsize);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1442|      0|        if (rndbuf == NULL) {
  ------------------
  |  Branch (1442:13): [True: 0, False: 0]
  ------------------
 1443|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1444|      0|            return EXT_RETURN_FAIL;
 1445|      0|        }
 1446|       |        /* for outer CH allocate a similar sized random value */
 1447|      0|        if (RAND_bytes_ex(sctx->libctx, rndbuf, totalrndsize, 0) <= 0) {
  ------------------
  |  Branch (1447:13): [True: 0, False: 0]
  ------------------
 1448|      0|            OPENSSL_free(rndbuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1449|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1450|      0|            return EXT_RETURN_FAIL;
 1451|      0|        }
 1452|       |        /* set agems from random buffer */
 1453|      0|        rndbufp = rndbuf;
 1454|      0|        memcpy(&agems, rndbufp, sizeof(agems));
 1455|      0|        rndbufp += sizeof(agems);
 1456|      0|        if (dores != 0) {
  ------------------
  |  Branch (1456:13): [True: 0, False: 0]
  ------------------
 1457|      0|            if (!WPACKET_sub_memcpy_u16(pkt, rndbufp,
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (1457:17): [True: 0, False: 0]
  ------------------
 1458|      0|                    s->session->ext.ticklen)
 1459|      0|                || !WPACKET_put_bytes_u32(pkt, agems)) {
  ------------------
  |  |  915|      0|    WPACKET_put_bytes__((pkt), (val), 4)
  ------------------
  |  Branch (1459:20): [True: 0, False: 0]
  ------------------
 1460|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1461|      0|                OPENSSL_free(rndbuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1462|      0|                return EXT_RETURN_FAIL;
 1463|      0|            }
 1464|      0|            rndbufp += s->session->ext.ticklen;
 1465|      0|        }
 1466|      0|        if (s->psksession != NULL) {
  ------------------
  |  Branch (1466:13): [True: 0, False: 0]
  ------------------
 1467|      0|            if (!WPACKET_sub_memcpy_u16(pkt, rndbufp, s->psksession_id_len)
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (1467:17): [True: 0, False: 0]
  ------------------
 1468|      0|                || !WPACKET_put_bytes_u32(pkt, 0)) {
  ------------------
  |  |  915|      0|    WPACKET_put_bytes__((pkt), (val), 4)
  ------------------
  |  Branch (1468:20): [True: 0, False: 0]
  ------------------
 1469|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1470|      0|                OPENSSL_free(rndbuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1471|      0|                return EXT_RETURN_FAIL;
 1472|      0|            }
 1473|      0|            rndbufp += s->psksession_id_len;
 1474|      0|        }
 1475|      0|        if (!WPACKET_close(pkt)
  ------------------
  |  Branch (1475:13): [True: 0, False: 0]
  ------------------
 1476|      0|            || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1476:16): [True: 0, False: 0]
  ------------------
 1477|      0|            || (dores == 1
  ------------------
  |  Branch (1477:17): [True: 0, False: 0]
  ------------------
 1478|      0|                && !WPACKET_sub_memcpy_u8(pkt, rndbufp, reshashsize))
  ------------------
  |  |  938|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (1478:20): [True: 0, False: 0]
  ------------------
 1479|      0|            || (s->psksession != NULL
  ------------------
  |  Branch (1479:17): [True: 0, False: 0]
  ------------------
 1480|      0|                && !WPACKET_sub_memcpy_u8(pkt, rndbufp, pskhashsize))
  ------------------
  |  |  938|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (1480:20): [True: 0, False: 0]
  ------------------
 1481|      0|            || !WPACKET_close(pkt)
  ------------------
  |  Branch (1481:16): [True: 0, False: 0]
  ------------------
 1482|      0|            || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1482:16): [True: 0, False: 0]
  ------------------
 1483|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1484|      0|            OPENSSL_free(rndbuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1485|      0|            return EXT_RETURN_FAIL;
 1486|      0|        }
 1487|      0|        OPENSSL_free(rndbuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1488|      0|        return EXT_RETURN_SENT;
 1489|      0|    }
 1490|      0|#endif /* OPENSSL_NO_ECH */
 1491|      0|    if (dores) {
  ------------------
  |  Branch (1491:9): [True: 0, False: 0]
  ------------------
 1492|      0|        if (!WPACKET_sub_memcpy_u16(pkt, s->session->ext.tick,
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (1492:13): [True: 0, False: 0]
  ------------------
 1493|      0|                s->session->ext.ticklen)
 1494|      0|            || !WPACKET_put_bytes_u32(pkt, agems)) {
  ------------------
  |  |  915|      0|    WPACKET_put_bytes__((pkt), (val), 4)
  ------------------
  |  Branch (1494:16): [True: 0, False: 0]
  ------------------
 1495|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1496|      0|            return EXT_RETURN_FAIL;
 1497|      0|        }
 1498|      0|    }
 1499|       |
 1500|      0|    if (s->psksession != NULL) {
  ------------------
  |  Branch (1500:9): [True: 0, False: 0]
  ------------------
 1501|      0|        if (!WPACKET_sub_memcpy_u16(pkt, s->psksession_id,
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (1501:13): [True: 0, False: 0]
  ------------------
 1502|      0|                s->psksession_id_len)
 1503|      0|            || !WPACKET_put_bytes_u32(pkt, 0)) {
  ------------------
  |  |  915|      0|    WPACKET_put_bytes__((pkt), (val), 4)
  ------------------
  |  Branch (1503:16): [True: 0, False: 0]
  ------------------
 1504|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1505|      0|            return EXT_RETURN_FAIL;
 1506|      0|        }
 1507|      0|        s->ext.tick_identity++;
 1508|      0|    }
 1509|       |
 1510|      0|    if (!WPACKET_close(pkt)
  ------------------
  |  Branch (1510:9): [True: 0, False: 0]
  ------------------
 1511|      0|        || !WPACKET_get_total_written(pkt, &binderoffset)
  ------------------
  |  Branch (1511:12): [True: 0, False: 0]
  ------------------
 1512|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1512:12): [True: 0, False: 0]
  ------------------
 1513|      0|        || (dores
  ------------------
  |  Branch (1513:13): [True: 0, False: 0]
  ------------------
 1514|      0|            && !WPACKET_sub_allocate_bytes_u8(pkt, reshashsize, &resbinder))
  ------------------
  |  |  849|      0|    WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 1)
  ------------------
  |  Branch (1514:16): [True: 0, False: 0]
  ------------------
 1515|      0|        || (s->psksession != NULL
  ------------------
  |  Branch (1515:13): [True: 0, False: 0]
  ------------------
 1516|      0|            && !WPACKET_sub_allocate_bytes_u8(pkt, pskhashsize, &pskbinder))
  ------------------
  |  |  849|      0|    WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 1)
  ------------------
  |  Branch (1516:16): [True: 0, False: 0]
  ------------------
 1517|      0|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (1517:12): [True: 0, False: 0]
  ------------------
 1518|      0|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (1518:12): [True: 0, False: 0]
  ------------------
 1519|      0|        || !WPACKET_get_total_written(pkt, &msglen)
  ------------------
  |  Branch (1519:12): [True: 0, False: 0]
  ------------------
 1520|       |        /*
 1521|       |         * We need to fill in all the sub-packet lengths now so we can
 1522|       |         * calculate the HMAC of the message up to the binders
 1523|       |         */
 1524|      0|        || !WPACKET_fill_lengths(pkt)) {
  ------------------
  |  Branch (1524:12): [True: 0, False: 0]
  ------------------
 1525|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1526|      0|        return EXT_RETURN_FAIL;
 1527|      0|    }
 1528|       |
 1529|      0|    msgstart = WPACKET_get_curr(pkt) - msglen;
 1530|       |
 1531|      0|    if (dores
  ------------------
  |  Branch (1531:9): [True: 0, False: 0]
  ------------------
 1532|      0|        && tls_psk_do_binder(s, mdres, msgstart, binderoffset, NULL,
  ------------------
  |  Branch (1532:12): [True: 0, False: 0]
  ------------------
 1533|      0|               resbinder, s->session, 1, 0)
 1534|      0|            != 1) {
 1535|       |        /* SSLfatal() already called */
 1536|      0|        return EXT_RETURN_FAIL;
 1537|      0|    }
 1538|       |
 1539|      0|    if (s->psksession != NULL
  ------------------
  |  Branch (1539:9): [True: 0, False: 0]
  ------------------
 1540|      0|        && tls_psk_do_binder(s, mdpsk, msgstart, binderoffset, NULL,
  ------------------
  |  Branch (1540:12): [True: 0, False: 0]
  ------------------
 1541|      0|               pskbinder, s->psksession, 1, 1)
 1542|      0|            != 1) {
 1543|       |        /* SSLfatal() already called */
 1544|      0|        return EXT_RETURN_FAIL;
 1545|      0|    }
 1546|       |
 1547|      0|    return EXT_RETURN_SENT;
 1548|       |#else
 1549|       |    return EXT_RETURN_NOT_SENT;
 1550|       |#endif
 1551|      0|}
tls_construct_ctos_post_handshake_auth:
 1557|  1.66k|{
 1558|  1.66k|#ifndef OPENSSL_NO_TLS1_3
 1559|  1.66k|    if (!s->pha_enabled)
  ------------------
  |  Branch (1559:9): [True: 0, False: 1.66k]
  ------------------
 1560|      0|        return EXT_RETURN_NOT_SENT;
 1561|  1.66k|#ifndef OPENSSL_NO_ECH
 1562|  1.66k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  1.66k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  3.33k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 1.66k, False: 0]
  |  |  |  Branch (317:44): [True: 1.66k, False: 0]
  |  |  ------------------
  |  |  318|  1.66k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 1.66k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
 1563|  1.66k|#endif
 1564|       |
 1565|       |    /* construct extension - 0 length, no contents */
 1566|  1.66k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_post_handshake_auth)
  ------------------
  |  |  911|  3.33k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1566:9): [True: 0, False: 1.66k]
  ------------------
 1567|  1.66k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  3.33k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1567:12): [True: 0, False: 1.66k]
  ------------------
 1568|  1.66k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1568:12): [True: 0, False: 1.66k]
  ------------------
 1569|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1570|      0|        return EXT_RETURN_FAIL;
 1571|      0|    }
 1572|       |
 1573|  1.66k|    s->post_handshake_auth = SSL_PHA_EXT_SENT;
 1574|       |
 1575|  1.66k|    return EXT_RETURN_SENT;
 1576|       |#else
 1577|       |    return EXT_RETURN_NOT_SENT;
 1578|       |#endif
 1579|  1.66k|}
tls_parse_stoc_renegotiate:
 1587|     21|{
 1588|     21|    size_t expected_len = s->s3.previous_client_finished_len
 1589|     21|        + s->s3.previous_server_finished_len;
 1590|     21|    size_t ilen;
 1591|     21|    const unsigned char *data;
 1592|       |
 1593|       |    /* Check for logic errors */
 1594|     21|    if (!ossl_assert(expected_len == 0
  ------------------
  |  |   52|     42|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 21, False: 0]
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|     42|    __FILE__, __LINE__)
  ------------------
  |  Branch (1594:9): [True: 0, False: 21]
  ------------------
 1595|     21|            || s->s3.previous_client_finished_len != 0)
 1596|     21|        || !ossl_assert(expected_len == 0
  ------------------
  |  |   52|     21|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 21, False: 0]
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|     21|    __FILE__, __LINE__)
  ------------------
  |  Branch (1596:12): [True: 0, False: 21]
  ------------------
 1597|     21|            || s->s3.previous_server_finished_len != 0)) {
 1598|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1599|      0|        return 0;
 1600|      0|    }
 1601|       |
 1602|       |    /* Parse the length byte */
 1603|     21|    if (!PACKET_get_1_len(pkt, &ilen)) {
  ------------------
  |  Branch (1603:9): [True: 0, False: 21]
  ------------------
 1604|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_RENEGOTIATION_ENCODING_ERR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1605|      0|        return 0;
 1606|      0|    }
 1607|       |
 1608|       |    /* Consistency check */
 1609|     21|    if (PACKET_remaining(pkt) != ilen) {
  ------------------
  |  Branch (1609:9): [True: 1, False: 20]
  ------------------
 1610|      1|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_RENEGOTIATION_ENCODING_ERR);
  ------------------
  |  |  155|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      1|    (ERR_new(),                                                  \
  |  |  |  |  158|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1611|      1|        return 0;
 1612|      1|    }
 1613|       |
 1614|       |    /* Check that the extension matches */
 1615|     20|    if (ilen != expected_len) {
  ------------------
  |  Branch (1615:9): [True: 0, False: 20]
  ------------------
 1616|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_RENEGOTIATION_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1617|      0|        return 0;
 1618|      0|    }
 1619|       |
 1620|     20|    if (!PACKET_get_bytes(pkt, &data, s->s3.previous_client_finished_len)
  ------------------
  |  Branch (1620:9): [True: 0, False: 20]
  ------------------
 1621|     20|        || memcmp(data, s->s3.previous_client_finished,
  ------------------
  |  Branch (1621:12): [True: 0, False: 20]
  ------------------
 1622|     20|               s->s3.previous_client_finished_len)
 1623|     20|            != 0) {
 1624|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_RENEGOTIATION_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1625|      0|        return 0;
 1626|      0|    }
 1627|       |
 1628|     20|    if (!PACKET_get_bytes(pkt, &data, s->s3.previous_server_finished_len)
  ------------------
  |  Branch (1628:9): [True: 0, False: 20]
  ------------------
 1629|     20|        || memcmp(data, s->s3.previous_server_finished,
  ------------------
  |  Branch (1629:12): [True: 0, False: 20]
  ------------------
 1630|     20|               s->s3.previous_server_finished_len)
 1631|     20|            != 0) {
 1632|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_RENEGOTIATION_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1633|      0|        return 0;
 1634|      0|    }
 1635|     20|    s->s3.send_connection_binding = 1;
 1636|       |
 1637|     20|    return 1;
 1638|     20|}
tls_parse_stoc_ec_pt_formats:
 1716|      2|{
 1717|      2|    size_t ecpointformats_len;
 1718|      2|    PACKET ecptformatlist;
 1719|       |
 1720|      2|    if (!PACKET_as_length_prefixed_1(pkt, &ecptformatlist)) {
  ------------------
  |  Branch (1720:9): [True: 1, False: 1]
  ------------------
 1721|      1|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      1|    (ERR_new(),                                                  \
  |  |  |  |  158|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1722|      1|        return 0;
 1723|      1|    }
 1724|      1|    if (!s->hit) {
  ------------------
  |  Branch (1724:9): [True: 1, False: 0]
  ------------------
 1725|      1|        ecpointformats_len = PACKET_remaining(&ecptformatlist);
 1726|      1|        if (ecpointformats_len == 0) {
  ------------------
  |  Branch (1726:13): [True: 1, False: 0]
  ------------------
 1727|      1|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_LENGTH);
  ------------------
  |  |  155|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      1|    (ERR_new(),                                                  \
  |  |  |  |  158|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1728|      1|            return 0;
 1729|      1|        }
 1730|       |
 1731|      0|        s->ext.peer_ecpointformats_len = 0;
 1732|      0|        OPENSSL_free(s->ext.peer_ecpointformats);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1733|      0|        s->ext.peer_ecpointformats = OPENSSL_malloc(ecpointformats_len);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1734|      0|        if (s->ext.peer_ecpointformats == NULL) {
  ------------------
  |  Branch (1734:13): [True: 0, False: 0]
  ------------------
 1735|      0|            s->ext.peer_ecpointformats_len = 0;
 1736|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1737|      0|            return 0;
 1738|      0|        }
 1739|       |
 1740|      0|        s->ext.peer_ecpointformats_len = ecpointformats_len;
 1741|       |
 1742|      0|        if (!PACKET_copy_bytes(&ecptformatlist,
  ------------------
  |  Branch (1742:13): [True: 0, False: 0]
  ------------------
 1743|      0|                s->ext.peer_ecpointformats,
 1744|      0|                ecpointformats_len)) {
 1745|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1746|      0|            return 0;
 1747|      0|        }
 1748|      0|    }
 1749|       |
 1750|      0|    return 1;
 1751|      1|}
tls_parse_stoc_sct:
 1816|      1|{
 1817|      1|    if (context == SSL_EXT_TLS1_3_CERTIFICATE_REQUEST) {
  ------------------
  |  |  308|      1|#define SSL_EXT_TLS1_3_CERTIFICATE_REQUEST 0x04000
  ------------------
  |  Branch (1817:9): [True: 0, False: 1]
  ------------------
 1818|       |        /* We ignore this if the server sends it in a CertificateRequest */
 1819|      0|        return 1;
 1820|      0|    }
 1821|       |
 1822|       |    /*
 1823|       |     * Only take it if we asked for it - i.e if there is no CT validation
 1824|       |     * callback set, then a custom extension MAY be processing it, so we
 1825|       |     * need to let control continue to flow to that.
 1826|       |     */
 1827|      1|    if (s->ct_validation_callback != NULL) {
  ------------------
  |  Branch (1827:9): [True: 0, False: 1]
  ------------------
 1828|      0|        size_t size = PACKET_remaining(pkt);
 1829|       |
 1830|       |        /* Simply copy it off for later processing */
 1831|      0|        OPENSSL_free(s->ext.scts);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1832|      0|        s->ext.scts = NULL;
 1833|       |
 1834|      0|        s->ext.scts_len = (uint16_t)size;
 1835|      0|        if (size > 0) {
  ------------------
  |  Branch (1835:13): [True: 0, False: 0]
  ------------------
 1836|      0|            s->ext.scts = OPENSSL_malloc(size);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1837|      0|            if (s->ext.scts == NULL) {
  ------------------
  |  Branch (1837:17): [True: 0, False: 0]
  ------------------
 1838|      0|                s->ext.scts_len = 0;
 1839|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1840|      0|                return 0;
 1841|      0|            }
 1842|      0|            if (!PACKET_copy_bytes(pkt, s->ext.scts, size)) {
  ------------------
  |  Branch (1842:17): [True: 0, False: 0]
  ------------------
 1843|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1844|      0|                return 0;
 1845|      0|            }
 1846|      0|        }
 1847|      1|    } else {
 1848|      1|        ENDPOINT role = (context & SSL_EXT_TLS1_2_SERVER_HELLO) != 0
  ------------------
  |  |  302|      1|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
  |  Branch (1848:25): [True: 1, False: 0]
  ------------------
 1849|      1|            ? ENDPOINT_CLIENT
 1850|      1|            : ENDPOINT_BOTH;
 1851|       |
 1852|       |        /*
 1853|       |         * If we didn't ask for it then there must be a custom extension,
 1854|       |         * otherwise this is unsolicited.
 1855|       |         */
 1856|      1|        if (custom_ext_find(&s->cert->custext, role,
  ------------------
  |  Branch (1856:13): [True: 1, False: 0]
  ------------------
 1857|      1|                TLSEXT_TYPE_signed_certificate_timestamp,
  ------------------
  |  |  125|      1|#define TLSEXT_TYPE_signed_certificate_timestamp 18
  ------------------
 1858|      1|                NULL)
 1859|      1|            == NULL) {
 1860|      1|            SSLfatal(s, TLS1_AD_UNSUPPORTED_EXTENSION, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      1|    (ERR_new(),                                                  \
  |  |  |  |  158|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1861|      1|            return 0;
 1862|      1|        }
 1863|       |
 1864|      0|        if (!custom_ext_parse(s, context,
  ------------------
  |  Branch (1864:13): [True: 0, False: 0]
  ------------------
 1865|      0|                TLSEXT_TYPE_signed_certificate_timestamp,
  ------------------
  |  |  125|      0|#define TLSEXT_TYPE_signed_certificate_timestamp 18
  ------------------
 1866|      0|                PACKET_data(pkt), PACKET_remaining(pkt),
 1867|      0|                x, chainidx)) {
 1868|       |            /* SSLfatal already called */
 1869|      0|            return 0;
 1870|      0|        }
 1871|      0|    }
 1872|       |
 1873|      0|    return 1;
 1874|      1|}
tls_parse_stoc_alpn:
 1954|      1|{
 1955|      1|    size_t len;
 1956|      1|    PACKET confpkt, protpkt;
 1957|      1|    int valid = 0;
 1958|       |
 1959|       |    /* We must have requested it. */
 1960|      1|    if (!s->s3.alpn_sent) {
  ------------------
  |  Branch (1960:9): [True: 0, False: 1]
  ------------------
 1961|      0|        SSLfatal(s, SSL_AD_UNSUPPORTED_EXTENSION, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1962|      0|        return 0;
 1963|      0|    }
 1964|       |    /*-
 1965|       |     * The extension data consists of:
 1966|       |     *   uint16 list_length
 1967|       |     *   uint8 proto_length;
 1968|       |     *   uint8 proto[proto_length];
 1969|       |     */
 1970|      1|    if (!PACKET_get_net_2_len(pkt, &len)
  ------------------
  |  Branch (1970:9): [True: 1, False: 0]
  ------------------
 1971|      0|        || PACKET_remaining(pkt) != len || !PACKET_get_1_len(pkt, &len)
  ------------------
  |  Branch (1971:12): [True: 0, False: 0]
  |  Branch (1971:44): [True: 0, False: 0]
  ------------------
 1972|      1|        || PACKET_remaining(pkt) != len) {
  ------------------
  |  Branch (1972:12): [True: 0, False: 0]
  ------------------
 1973|      1|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      1|    (ERR_new(),                                                  \
  |  |  |  |  158|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1974|      1|        return 0;
 1975|      1|    }
 1976|       |
 1977|       |    /* It must be a protocol that we sent */
 1978|      0|    if (!PACKET_buf_init(&confpkt, s->ext.alpn, s->ext.alpn_len)) {
  ------------------
  |  Branch (1978:9): [True: 0, False: 0]
  ------------------
 1979|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1980|      0|        return 0;
 1981|      0|    }
 1982|      0|    while (PACKET_get_length_prefixed_1(&confpkt, &protpkt)) {
  ------------------
  |  Branch (1982:12): [True: 0, False: 0]
  ------------------
 1983|      0|        if (PACKET_remaining(&protpkt) != len)
  ------------------
  |  Branch (1983:13): [True: 0, False: 0]
  ------------------
 1984|      0|            continue;
 1985|      0|        if (memcmp(PACKET_data(pkt), PACKET_data(&protpkt), len) == 0) {
  ------------------
  |  Branch (1985:13): [True: 0, False: 0]
  ------------------
 1986|       |            /* Valid protocol found */
 1987|      0|            valid = 1;
 1988|      0|            break;
 1989|      0|        }
 1990|      0|    }
 1991|       |
 1992|      0|    if (!valid) {
  ------------------
  |  Branch (1992:9): [True: 0, False: 0]
  ------------------
 1993|       |        /* The protocol sent from the server does not match one we advertised */
 1994|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1995|      0|        return 0;
 1996|      0|    }
 1997|       |
 1998|      0|    OPENSSL_free(s->s3.alpn_selected);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1999|      0|    s->s3.alpn_selected = OPENSSL_malloc(len);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2000|      0|    if (s->s3.alpn_selected == NULL) {
  ------------------
  |  Branch (2000:9): [True: 0, False: 0]
  ------------------
 2001|      0|        s->s3.alpn_selected_len = 0;
 2002|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2003|      0|        return 0;
 2004|      0|    }
 2005|      0|    if (!PACKET_copy_bytes(pkt, s->s3.alpn_selected, len)) {
  ------------------
  |  Branch (2005:9): [True: 0, False: 0]
  ------------------
 2006|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2007|      0|        return 0;
 2008|      0|    }
 2009|      0|    s->s3.alpn_selected_len = len;
 2010|       |
 2011|      0|    if (s->session->ext.alpn_selected == NULL
  ------------------
  |  Branch (2011:9): [True: 0, False: 0]
  ------------------
 2012|      0|        || s->session->ext.alpn_selected_len != len
  ------------------
  |  Branch (2012:12): [True: 0, False: 0]
  ------------------
 2013|      0|        || memcmp(s->session->ext.alpn_selected, s->s3.alpn_selected, len)
  ------------------
  |  Branch (2013:12): [True: 0, False: 0]
  ------------------
 2014|      0|            != 0) {
 2015|       |        /* ALPN not consistent with the old session so cannot use early_data */
 2016|      0|        s->ext.early_data_ok = 0;
 2017|      0|    }
 2018|      0|    if (!s->hit) {
  ------------------
  |  Branch (2018:9): [True: 0, False: 0]
  ------------------
 2019|       |        /*
 2020|       |         * This is a new session and so alpn_selected should have been
 2021|       |         * initialised to NULL. We should update it with the selected ALPN.
 2022|       |         */
 2023|      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 (2023:13): [True: 0, False: 0]
  ------------------
 2024|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2025|      0|            return 0;
 2026|      0|        }
 2027|      0|        s->session->ext.alpn_selected = OPENSSL_memdup(s->s3.alpn_selected, s->s3.alpn_selected_len);
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2028|      0|        if (s->session->ext.alpn_selected == NULL) {
  ------------------
  |  Branch (2028:13): [True: 0, False: 0]
  ------------------
 2029|      0|            s->session->ext.alpn_selected_len = 0;
 2030|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2031|      0|            return 0;
 2032|      0|        }
 2033|      0|        s->session->ext.alpn_selected_len = s->s3.alpn_selected_len;
 2034|      0|    }
 2035|       |
 2036|      0|    return 1;
 2037|      0|}
tls_parse_stoc_etm:
 2091|      2|{
 2092|       |    /* Ignore if inappropriate ciphersuite */
 2093|      2|    if (!(s->options & SSL_OP_NO_ENCRYPT_THEN_MAC)
  ------------------
  |  |  399|      2|#define SSL_OP_NO_ENCRYPT_THEN_MAC SSL_OP_BIT(19)
  |  |  ------------------
  |  |  |  |  351|      2|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (2093:9): [True: 2, False: 0]
  ------------------
 2094|      2|        && s->s3.tmp.new_cipher->algorithm_mac != SSL_AEAD
  ------------------
  |  |  181|      4|#define SSL_AEAD 0x00000040U
  ------------------
  |  Branch (2094:12): [True: 1, False: 1]
  ------------------
 2095|      1|        && s->s3.tmp.new_cipher->algorithm_enc != SSL_RC4
  ------------------
  |  |  136|      3|#define SSL_RC4 0x00000004U
  ------------------
  |  Branch (2095:12): [True: 1, False: 0]
  ------------------
 2096|      1|        && s->s3.tmp.new_cipher->algorithm_enc != SSL_eGOST2814789CNT
  ------------------
  |  |  144|      3|#define SSL_eGOST2814789CNT 0x00000400U
  ------------------
  |  Branch (2096:12): [True: 1, False: 0]
  ------------------
 2097|      1|        && s->s3.tmp.new_cipher->algorithm_enc != SSL_eGOST2814789CNT12
  ------------------
  |  |  152|      3|#define SSL_eGOST2814789CNT12 0x00040000U
  ------------------
  |  Branch (2097:12): [True: 1, False: 0]
  ------------------
 2098|      1|        && s->s3.tmp.new_cipher->algorithm_enc != SSL_MAGMA
  ------------------
  |  |  156|      3|#define SSL_MAGMA 0x00400000U
  ------------------
  |  Branch (2098:12): [True: 1, False: 0]
  ------------------
 2099|      1|        && s->s3.tmp.new_cipher->algorithm_enc != SSL_KUZNYECHIK)
  ------------------
  |  |  157|      1|#define SSL_KUZNYECHIK 0x00800000U
  ------------------
  |  Branch (2099:12): [True: 1, False: 0]
  ------------------
 2100|      1|        s->ext.use_etm = 1;
 2101|       |
 2102|      2|    return 1;
 2103|      2|}
tls_parse_stoc_ems:
 2107|      1|{
 2108|      1|    if (s->options & SSL_OP_NO_EXTENDED_MASTER_SECRET)
  ------------------
  |  |  357|      1|#define SSL_OP_NO_EXTENDED_MASTER_SECRET SSL_OP_BIT(0)
  |  |  ------------------
  |  |  |  |  351|      1|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (2108:9): [True: 0, False: 1]
  ------------------
 2109|      0|        return 1;
 2110|      1|    s->s3.flags |= TLS1_FLAGS_RECEIVED_EXTMS;
  ------------------
  |  |  300|      1|#define TLS1_FLAGS_RECEIVED_EXTMS 0x0200
  ------------------
 2111|      1|    if (!s->hit)
  ------------------
  |  Branch (2111:9): [True: 1, False: 0]
  ------------------
 2112|      1|        s->session->flags |= SSL_SESS_FLAG_EXTMS;
  ------------------
  |  |  577|      1|#define SSL_SESS_FLAG_EXTMS 0x1
  ------------------
 2113|       |
 2114|      1|    return 1;
 2115|      1|}
tls_parse_stoc_supported_versions:
 2120|      2|{
 2121|      2|    unsigned int version;
 2122|       |
 2123|      2|    if (!PACKET_get_net_2(pkt, &version)
  ------------------
  |  Branch (2123:9): [True: 1, False: 1]
  ------------------
 2124|      2|        || PACKET_remaining(pkt) != 0) {
  ------------------
  |  Branch (2124:12): [True: 1, False: 0]
  ------------------
 2125|      2|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      2|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      2|    (ERR_new(),                                                  \
  |  |  |  |  158|      2|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      2|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      2|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2126|      2|        return 0;
 2127|      2|    }
 2128|       |
 2129|       |    /*
 2130|       |     * The only protocol version we support which is valid in this extension in
 2131|       |     * a ServerHello is TLSv1.3 therefore we shouldn't be getting anything else.
 2132|       |     */
 2133|      0|    if (version != TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (2133:9): [True: 0, False: 0]
  ------------------
 2134|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2135|      0|            SSL_R_BAD_PROTOCOL_VERSION_NUMBER);
 2136|      0|        return 0;
 2137|      0|    }
 2138|       |
 2139|       |    /* We ignore this extension for HRRs except to sanity check it */
 2140|      0|    if (context == SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST)
  ------------------
  |  |  305|      0|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
  |  Branch (2140:9): [True: 0, False: 0]
  ------------------
 2141|      0|        return 1;
 2142|       |
 2143|       |    /* We just set it here. We validate it in ssl_choose_client_version */
 2144|      0|    s->version = version;
 2145|      0|    if (!ssl_set_record_protocol_version(s, version)) {
  ------------------
  |  Branch (2145:9): [True: 0, False: 0]
  ------------------
 2146|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2147|      0|        return 0;
 2148|      0|    }
 2149|       |
 2150|      0|    return 1;
 2151|      0|}
tls_construct_ctos_client_cert_type:
 2454|  1.68k|{
 2455|  1.68k|    sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE;
  ------------------
  |  |  375|  1.68k|#define OSSL_CERT_TYPE_CTOS_NONE 0
  ------------------
 2456|  1.68k|    if (sc->client_cert_type == NULL)
  ------------------
  |  Branch (2456:9): [True: 1.68k, False: 0]
  ------------------
 2457|  1.68k|        return EXT_RETURN_NOT_SENT;
 2458|      0|#ifndef OPENSSL_NO_ECH
 2459|      0|    ECH_SAME_EXT(sc, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
 2460|      0|#endif
 2461|       |
 2462|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_client_cert_type)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2462:9): [True: 0, False: 0]
  ------------------
 2463|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2463:12): [True: 0, False: 0]
  ------------------
 2464|      0|        || !WPACKET_sub_memcpy_u8(pkt, sc->client_cert_type, sc->client_cert_type_len)
  ------------------
  |  |  938|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (2464:12): [True: 0, False: 0]
  ------------------
 2465|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2465:12): [True: 0, False: 0]
  ------------------
 2466|      0|        SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2467|      0|        return EXT_RETURN_FAIL;
 2468|      0|    }
 2469|      0|    sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_GOOD;
  ------------------
  |  |  376|      0|#define OSSL_CERT_TYPE_CTOS_GOOD 1
  ------------------
 2470|      0|    return EXT_RETURN_SENT;
 2471|      0|}
tls_construct_ctos_server_cert_type:
 2509|  1.68k|{
 2510|  1.68k|    sc->ext.server_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE;
  ------------------
  |  |  375|  1.68k|#define OSSL_CERT_TYPE_CTOS_NONE 0
  ------------------
 2511|  1.68k|    if (sc->server_cert_type == NULL)
  ------------------
  |  Branch (2511:9): [True: 1.68k, False: 0]
  ------------------
 2512|  1.68k|        return EXT_RETURN_NOT_SENT;
 2513|      0|#ifndef OPENSSL_NO_ECH
 2514|      0|    ECH_SAME_EXT(sc, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
 2515|      0|#endif
 2516|       |
 2517|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_server_cert_type)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2517:9): [True: 0, False: 0]
  ------------------
 2518|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2518:12): [True: 0, False: 0]
  ------------------
 2519|      0|        || !WPACKET_sub_memcpy_u8(pkt, sc->server_cert_type, sc->server_cert_type_len)
  ------------------
  |  |  938|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (2519:12): [True: 0, False: 0]
  ------------------
 2520|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2520:12): [True: 0, False: 0]
  ------------------
 2521|      0|        SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2522|      0|        return EXT_RETURN_FAIL;
 2523|      0|    }
 2524|      0|    sc->ext.server_cert_type_ctos = OSSL_CERT_TYPE_CTOS_GOOD;
  ------------------
  |  |  376|      0|#define OSSL_CERT_TYPE_CTOS_GOOD 1
  ------------------
 2525|      0|    return EXT_RETURN_SENT;
 2526|      0|}
tls_construct_ctos_ech:
 2565|  1.66k|{
 2566|  1.66k|    int rv = 0, hpke_mode = OSSL_HPKE_MODE_BASE;
  ------------------
  |  |   18|  1.66k|#define OSSL_HPKE_MODE_BASE 0 /* Base mode  */
  ------------------
 2567|  1.66k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  1.66k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2568|  1.66k|    OSSL_ECHSTORE_ENTRY *ee = NULL;
 2569|  1.66k|    OSSL_HPKE_SUITE hpke_suite = OSSL_HPKE_SUITE_DEFAULT;
  ------------------
  |  |   92|  1.66k|    {                                 \
  |  |   93|  1.66k|        OSSL_HPKE_KEM_ID_X25519,      \
  |  |  ------------------
  |  |  |  |   41|  1.66k|#define OSSL_HPKE_KEM_ID_X25519 0x0020 /* Curve25519 */
  |  |  ------------------
  |  |   94|  1.66k|        OSSL_HPKE_KDF_ID_HKDF_SHA256, \
  |  |  ------------------
  |  |  |  |   45|  1.66k|#define OSSL_HPKE_KDF_ID_HKDF_SHA256 0x0001 /* HKDF-SHA256 */
  |  |  ------------------
  |  |   95|  1.66k|        OSSL_HPKE_AEAD_ID_AES_GCM_128 \
  |  |  ------------------
  |  |  |  |   50|  1.66k|#define OSSL_HPKE_AEAD_ID_AES_GCM_128 0x0001 /* AES-GCM-128 */
  |  |  ------------------
  |  |   96|  1.66k|    }
  ------------------
 2570|  1.66k|    unsigned char config_id_to_use = 0x00, info[OSSL_ECH_MAX_INFO_LEN];
 2571|  1.66k|    unsigned char *encoded = NULL, *mypub = NULL;
 2572|  1.66k|    size_t cipherlen = 0, aad_len = 0, lenclen = 0, mypub_len = 0;
 2573|  1.66k|    size_t info_len = OSSL_ECH_MAX_INFO_LEN, clear_len = 0, encoded_len = 0;
  ------------------
  |  |   24|  1.66k|#define OSSL_ECH_MAX_INFO_LEN (OSSL_ECH_MAX_ECHCONFIG_LEN + 8)
  |  |  ------------------
  |  |  |  |   33|  1.66k|#define OSSL_ECH_MAX_ECHCONFIG_LEN 1500 /* max for all encodings */
  |  |  ------------------
  ------------------
 2574|       |    /* whether or not we've been asked to GREASE, one way or another */
 2575|  1.66k|    int grease_opt_set = (s->ext.ech.attempted != 1
  ------------------
  |  Branch (2575:27): [True: 1.66k, False: 0]
  ------------------
 2576|  1.66k|        && ((s->ext.ech.grease == OSSL_ECH_IS_GREASE)
  ------------------
  |  |   37|  1.66k|#define OSSL_ECH_IS_GREASE 1 /* when decryption failed or GREASE wanted */
  ------------------
  |  Branch (2576:13): [True: 0, False: 1.66k]
  ------------------
 2577|  1.66k|            || ((s->options & SSL_OP_ECH_GREASE) != 0)));
  ------------------
  |  |  460|  1.66k|#define SSL_OP_ECH_GREASE SSL_OP_BIT(37)
  |  |  ------------------
  |  |  |  |  351|  1.66k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (2577:16): [True: 0, False: 1.66k]
  ------------------
 2578|       |
 2579|       |    /* if we're not doing real ECH and not GREASEing then exit */
 2580|  1.66k|    if (s->ext.ech.attempted_type != TLSEXT_TYPE_ech && grease_opt_set == 0)
  ------------------
  |  |  174|  3.32k|#define TLSEXT_TYPE_ech 0xfe0d
  ------------------
  |  Branch (2580:9): [True: 1.66k, False: 0]
  |  Branch (2580:57): [True: 1.66k, False: 0]
  ------------------
 2581|  1.66k|        return EXT_RETURN_NOT_SENT;
 2582|       |    /* send grease if not really attempting ECH */
 2583|      0|    if (grease_opt_set == 1) {
  ------------------
  |  Branch (2583:9): [True: 0, False: 0]
  ------------------
 2584|      0|        if (s->hello_retry_request == SSL_HRR_PENDING
  ------------------
  |  Branch (2584:13): [True: 0, False: 0]
  ------------------
 2585|      0|            && s->ext.ech.sent != NULL) {
  ------------------
  |  Branch (2585:16): [True: 0, False: 0]
  ------------------
 2586|       |            /* re-tx already sent GREASEy ECH */
 2587|      0|            if (WPACKET_memcpy(pkt, s->ext.ech.sent,
  ------------------
  |  Branch (2587:17): [True: 0, False: 0]
  ------------------
 2588|      0|                    s->ext.ech.sent_len)
 2589|      0|                != 1) {
 2590|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2591|      0|                return EXT_RETURN_FAIL;
 2592|      0|            }
 2593|      0|            return EXT_RETURN_SENT;
 2594|      0|        }
 2595|       |        /* if nobody set a type, use the default */
 2596|      0|        if (s->ext.ech.attempted_type == OSSL_ECH_type_unknown)
  ------------------
  |  |   40|      0|#define OSSL_ECH_type_unknown 0xffff
  ------------------
  |  Branch (2596:13): [True: 0, False: 0]
  ------------------
 2597|      0|            s->ext.ech.attempted_type = TLSEXT_TYPE_ech;
  ------------------
  |  |  174|      0|#define TLSEXT_TYPE_ech 0xfe0d
  ------------------
 2598|      0|        if (ossl_ech_send_grease(s, pkt) != 1) {
  ------------------
  |  Branch (2598:13): [True: 0, False: 0]
  ------------------
 2599|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2600|      0|            return EXT_RETURN_NOT_SENT;
 2601|      0|        }
 2602|      0|        return EXT_RETURN_SENT;
 2603|      0|    }
 2604|       |
 2605|       |    /* For the inner CH - we simply include one of these saying "inner" */
 2606|      0|    if (s->ext.ech.ch_depth == 1) {
  ------------------
  |  Branch (2606:9): [True: 0, False: 0]
  ------------------
 2607|      0|        if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_ech)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2607:13): [True: 0, False: 0]
  ------------------
 2608|      0|            || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2608:16): [True: 0, False: 0]
  ------------------
 2609|      0|            || !WPACKET_put_bytes_u8(pkt, OSSL_ECH_INNER_CH_TYPE)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (2609:16): [True: 0, False: 0]
  ------------------
 2610|      0|            || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2610:16): [True: 0, False: 0]
  ------------------
 2611|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2612|      0|            return EXT_RETURN_FAIL;
 2613|      0|        }
 2614|      0|        return EXT_RETURN_SENT;
 2615|      0|    }
 2616|       |
 2617|       |    /*
 2618|       |     * If not GREASEing we prepare sending the outer value - after the
 2619|       |     * entire thing has been constructed, putting in zeros for now where
 2620|       |     * we'd otherwise include ECH ciphertext, we later encode and encrypt.
 2621|       |     * We need to do it that way as we need the rest of the outer CH to
 2622|       |     * be known and used as AAD input before we do encryption.
 2623|       |     */
 2624|      0|    if (s->ext.ech.ch_depth != 0)
  ------------------
  |  Branch (2624:9): [True: 0, False: 0]
  ------------------
 2625|      0|        return EXT_RETURN_NOT_SENT;
 2626|       |    /* Make ClientHelloInner and EncodedClientHelloInner as per spec. */
 2627|      0|    if (ossl_ech_encode_inner(s, &encoded, &encoded_len) != 1) {
  ------------------
  |  Branch (2627:9): [True: 0, False: 0]
  ------------------
 2628|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2629|      0|        goto err;
 2630|      0|    }
 2631|      0|    s->ext.ech.encoded_inner = encoded;
 2632|      0|    s->ext.ech.encoded_inner_len = encoded_len;
 2633|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 2634|      0|    ossl_ech_pbuf("encoded inner CH", encoded, encoded_len);
 2635|      0|#endif
 2636|      0|    rv = ossl_ech_pick_matching_cfg(s, &ee, &hpke_suite);
 2637|      0|    if (rv != 1 || ee == NULL) {
  ------------------
  |  Branch (2637:9): [True: 0, False: 0]
  |  Branch (2637:20): [True: 0, False: 0]
  ------------------
 2638|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2639|      0|        goto err;
 2640|      0|    }
 2641|      0|    s->ext.ech.attempted_type = ee->version;
 2642|      0|    OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2643|      0|    {
 2644|      0|        BIO_printf(trc_out, "EAAE: selected: version: %4x, config %2x\n",
 2645|      0|            ee->version, ee->config_id);
 2646|      0|    }
 2647|      0|    OSSL_TRACE_END(TLS);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2648|      0|    config_id_to_use = ee->config_id; /* if requested, use a random config_id instead */
 2649|      0|    if ((s->options & SSL_OP_ECH_IGNORE_CID) != 0) {
  ------------------
  |  |  471|      0|#define SSL_OP_ECH_IGNORE_CID SSL_OP_BIT(39)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (2649:9): [True: 0, False: 0]
  ------------------
 2650|      0|        int max_iters = 1000, i = 0;
 2651|       |
 2652|       |        /* rejection sample to get a different but random config_id */
 2653|      0|        while (config_id_to_use == ee->config_id) {
  ------------------
  |  Branch (2653:16): [True: 0, False: 0]
  ------------------
 2654|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 2655|      0|            if (i > 0) {
  ------------------
  |  Branch (2655:17): [True: 0, False: 0]
  ------------------
 2656|      0|                OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2657|      0|                {
 2658|      0|                    BIO_printf(trc_out, "EAAE: rejected random-config %02x\n",
 2659|      0|                        config_id_to_use);
 2660|      0|                }
 2661|      0|                OSSL_TRACE_END(TLS);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2662|      0|            }
 2663|      0|#endif
 2664|      0|            if (RAND_bytes_ex(sctx->libctx, &config_id_to_use, 1, 0) <= 0) {
  ------------------
  |  Branch (2664:17): [True: 0, False: 0]
  ------------------
 2665|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2666|      0|                return 0;
 2667|      0|            }
 2668|      0|            if (i++ >= max_iters) {
  ------------------
  |  Branch (2668:17): [True: 0, False: 0]
  ------------------
 2669|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2670|      0|                return 0;
 2671|      0|            }
 2672|      0|        }
 2673|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 2674|      0|        ossl_ech_pbuf("EAAE: random config_id", &config_id_to_use, 1);
 2675|      0|#endif
 2676|      0|    }
 2677|      0|    s->ext.ech.attempted_cid = config_id_to_use;
 2678|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 2679|      0|    ossl_ech_pbuf("EAAE: peer pub", ee->pub, ee->pub_len);
 2680|      0|    ossl_ech_pbuf("EAAE: clear", encoded, encoded_len);
 2681|      0|    ossl_ech_pbuf("EAAE: ECHConfig", ee->encoded, ee->encoded_len);
 2682|      0|#endif
 2683|       |    /*
 2684|       |     * The AAD is the full outer client hello but with the correct number of
 2685|       |     * zeros for where the ECH ciphertext octets will later be placed. So we
 2686|       |     * add the ECH extension to the |pkt| but with zeros for ciphertext, that
 2687|       |     * forms up the AAD, then after we've encrypted, we'll splice in the actual
 2688|       |     * ciphertext.
 2689|       |     * Watch out for the "4" offsets that remove the type and 3-octet length
 2690|       |     * from the encoded CH as per the spec.
 2691|       |     */
 2692|      0|    clear_len = ossl_ech_calc_padding(s, ee, encoded_len);
 2693|      0|    if (clear_len == 0) {
  ------------------
  |  Branch (2693:9): [True: 0, False: 0]
  ------------------
 2694|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2695|      0|        goto err;
 2696|      0|    }
 2697|      0|    lenclen = OSSL_HPKE_get_public_encap_size(hpke_suite);
 2698|      0|    if (s->ext.ech.hpke_ctx == NULL) { /* 1st CH */
  ------------------
  |  Branch (2698:9): [True: 0, False: 0]
  ------------------
 2699|      0|        if (ossl_ech_make_enc_info(ee->encoded, ee->encoded_len,
  ------------------
  |  Branch (2699:13): [True: 0, False: 0]
  ------------------
 2700|      0|                info, &info_len)
 2701|      0|            != 1) {
 2702|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2703|      0|            goto err;
 2704|      0|        }
 2705|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 2706|      0|        ossl_ech_pbuf("EAAE info", info, info_len);
 2707|      0|#endif
 2708|      0|        s->ext.ech.hpke_ctx = OSSL_HPKE_CTX_new(hpke_mode, hpke_suite,
 2709|      0|            OSSL_HPKE_ROLE_SENDER,
  ------------------
  |  |   73|      0|#define OSSL_HPKE_ROLE_SENDER 0
  ------------------
 2710|      0|            sctx->libctx, sctx->propq);
 2711|      0|        if (s->ext.ech.hpke_ctx == NULL) {
  ------------------
  |  Branch (2711:13): [True: 0, False: 0]
  ------------------
 2712|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2713|      0|            goto err;
 2714|      0|        }
 2715|      0|        mypub = OPENSSL_malloc(lenclen);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2716|      0|        if (mypub == NULL) {
  ------------------
  |  Branch (2716:13): [True: 0, False: 0]
  ------------------
 2717|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2718|      0|            goto err;
 2719|      0|        }
 2720|      0|        mypub_len = lenclen;
 2721|      0|        rv = OSSL_HPKE_encap(s->ext.ech.hpke_ctx, mypub, &mypub_len,
 2722|      0|            ee->pub, ee->pub_len, info, info_len);
 2723|      0|        if (rv != 1) {
  ------------------
  |  Branch (2723:13): [True: 0, False: 0]
  ------------------
 2724|      0|            OPENSSL_free(mypub);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2725|      0|            mypub = NULL;
 2726|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2727|      0|            goto err;
 2728|      0|        }
 2729|      0|        s->ext.ech.pub = mypub;
 2730|      0|        s->ext.ech.pub_len = mypub_len;
 2731|      0|    } else { /* HRR - retrieve public */
 2732|      0|        mypub = s->ext.ech.pub;
 2733|      0|        mypub_len = s->ext.ech.pub_len;
 2734|      0|        if (mypub == NULL || mypub_len == 0) {
  ------------------
  |  Branch (2734:13): [True: 0, False: 0]
  |  Branch (2734:30): [True: 0, False: 0]
  ------------------
 2735|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2736|      0|            goto err;
 2737|      0|        }
 2738|      0|    }
 2739|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 2740|      0|    ossl_ech_pbuf("EAAE: mypub", mypub, mypub_len);
 2741|      0|    WPACKET_get_total_written(pkt, &aad_len); /* use aad_len for tracing */
 2742|      0|    ossl_ech_pbuf("EAAE pkt b4", WPACKET_get_curr(pkt) - aad_len, aad_len);
 2743|      0|#endif
 2744|      0|    cipherlen = OSSL_HPKE_get_ciphertext_size(hpke_suite, clear_len);
 2745|      0|    if (cipherlen <= clear_len || cipherlen > OSSL_ECH_MAX_PAYLOAD_LEN) {
  ------------------
  |  |   31|      0|#define OSSL_ECH_MAX_PAYLOAD_LEN 1500 /* max ECH ciphertext to en/decode */
  ------------------
  |  Branch (2745:9): [True: 0, False: 0]
  |  Branch (2745:35): [True: 0, False: 0]
  ------------------
 2746|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2747|      0|        goto err;
 2748|      0|    }
 2749|      0|    s->ext.ech.clearlen = clear_len;
 2750|      0|    s->ext.ech.cipherlen = cipherlen;
 2751|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_ech)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2751:9): [True: 0, False: 0]
  ------------------
 2752|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2752:12): [True: 0, False: 0]
  ------------------
 2753|      0|        || !WPACKET_put_bytes_u8(pkt, OSSL_ECH_OUTER_CH_TYPE)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (2753:12): [True: 0, False: 0]
  ------------------
 2754|      0|        || !WPACKET_put_bytes_u16(pkt, hpke_suite.kdf_id)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2754:12): [True: 0, False: 0]
  ------------------
 2755|      0|        || !WPACKET_put_bytes_u16(pkt, hpke_suite.aead_id)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2755:12): [True: 0, False: 0]
  ------------------
 2756|      0|        || !WPACKET_put_bytes_u8(pkt, config_id_to_use)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (2756:12): [True: 0, False: 0]
  ------------------
 2757|      0|        || (s->hello_retry_request == SSL_HRR_PENDING
  ------------------
  |  Branch (2757:13): [True: 0, False: 0]
  ------------------
 2758|      0|            && !WPACKET_put_bytes_u16(pkt, 0x00)) /* no pub */
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2758:16): [True: 0, False: 0]
  ------------------
 2759|      0|        || (s->hello_retry_request != SSL_HRR_PENDING
  ------------------
  |  Branch (2759:13): [True: 0, False: 0]
  ------------------
 2760|      0|            && !WPACKET_sub_memcpy_u16(pkt, mypub, mypub_len))
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (2760:16): [True: 0, False: 0]
  ------------------
 2761|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2761:12): [True: 0, False: 0]
  ------------------
 2762|      0|        || !WPACKET_get_total_written(pkt, &s->ext.ech.cipher_offset)
  ------------------
  |  Branch (2762:12): [True: 0, False: 0]
  ------------------
 2763|      0|        || !WPACKET_memset(pkt, 0, cipherlen)
  ------------------
  |  Branch (2763:12): [True: 0, False: 0]
  ------------------
 2764|      0|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (2764:12): [True: 0, False: 0]
  ------------------
 2765|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2765:12): [True: 0, False: 0]
  ------------------
 2766|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2767|      0|        goto err;
 2768|      0|    }
 2769|       |    /* don't count the type + 3-octet length */
 2770|      0|    s->ext.ech.cipher_offset -= 4;
 2771|      0|    return EXT_RETURN_SENT;
 2772|      0|err:
 2773|      0|    return EXT_RETURN_FAIL;
 2774|      0|}
extensions_clnt.c:negotiate_dhe:
  207|  5.13k|{
  208|  5.13k|    int i, end, ret = 0;
  209|  5.13k|    STACK_OF(SSL_CIPHER) *cipher_stack = NULL;
  ------------------
  |  |   33|  5.13k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  210|  5.13k|    const uint16_t *pgroups = NULL;
  211|  5.13k|    size_t num_groups, j;
  212|  5.13k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  5.13k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  213|  5.13k|    int dtls = SSL_CONNECTION_IS_DTLS(s);
  ------------------
  |  |  266|  5.13k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  5.13k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  5.13k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  214|       |
  215|       |    /* See if we support any EC or FFDHE ciphersuites */
  216|  5.13k|    cipher_stack = SSL_get1_supported_ciphers(ssl);
  217|  5.13k|    end = sk_SSL_CIPHER_num(cipher_stack);
  ------------------
  |  | 1028|  5.13k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  218|  11.6k|    for (i = 0; i < end; i++) {
  ------------------
  |  Branch (218:17): [True: 11.5k, False: 89]
  ------------------
  219|  11.5k|        const SSL_CIPHER *c = sk_SSL_CIPHER_value(cipher_stack, i);
  ------------------
  |  | 1029|  11.5k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
  220|  11.5k|        unsigned long alg_k = c->algorithm_mkey;
  221|  11.5k|        unsigned long alg_a = c->algorithm_auth;
  222|       |
  223|  11.5k|        int is_ffdhe_ciphersuite = (alg_k & (SSL_kDHE | SSL_kDHEPSK));
  ------------------
  |  |   87|  11.5k|#define SSL_kDHE 0x00000002U
  ------------------
                      int is_ffdhe_ciphersuite = (alg_k & (SSL_kDHE | SSL_kDHEPSK));
  ------------------
  |  |   99|  11.5k|#define SSL_kDHEPSK 0x00000100U
  ------------------
  224|  11.5k|        int is_ec_ciphersuite = ((alg_k & (SSL_kECDHE | SSL_kECDHEPSK))
  ------------------
  |  |   89|  11.5k|#define SSL_kECDHE 0x00000004U
  ------------------
                      int is_ec_ciphersuite = ((alg_k & (SSL_kECDHE | SSL_kECDHEPSK))
  ------------------
  |  |   98|  11.5k|#define SSL_kECDHEPSK 0x00000080U
  ------------------
  |  Branch (224:34): [True: 1.76k, False: 9.80k]
  ------------------
  225|  9.80k|            || (alg_a & SSL_aECDSA));
  ------------------
  |  |  118|  9.80k|#define SSL_aECDSA 0x00000008U
  ------------------
  |  Branch (225:16): [True: 0, False: 9.80k]
  ------------------
  226|  11.5k|        int is_tls13 = (dtls ? DTLS_VERSION_GT(c->min_dtls, DTLS1_2_VERSION)
  ------------------
  |  |   62|      0|#define DTLS_VERSION_GT(v1, v2) (dtls_ver_ordinal(v1) < dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_GT(v1, v2) (dtls_ver_ordinal(v1) < dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (226:25): [True: 0, False: 11.5k]
  ------------------
  227|  11.5k|                             : (c->min_tls > TLS1_2_VERSION));
  ------------------
  |  |   26|  11.5k|#define TLS1_2_VERSION 0x0303
  ------------------
  228|       |
  229|  11.5k|        if ((check_type == ffdhe_check && (is_ffdhe_ciphersuite || is_tls13))
  ------------------
  |  Branch (229:14): [True: 1.83k, False: 9.73k]
  |  Branch (229:44): [True: 22, False: 1.81k]
  |  Branch (229:68): [True: 1.68k, False: 130]
  ------------------
  230|  9.86k|            || (check_type == ecdhe_check && (is_ec_ciphersuite || is_tls13))
  ------------------
  |  Branch (230:17): [True: 1.84k, False: 8.02k]
  |  Branch (230:47): [True: 21, False: 1.81k]
  |  Branch (230:68): [True: 1.68k, False: 137]
  ------------------
  231|  8.16k|            || (check_type == ptfmt_check && is_ec_ciphersuite)) {
  ------------------
  |  Branch (231:17): [True: 7.89k, False: 267]
  |  Branch (231:46): [True: 1.63k, False: 6.26k]
  ------------------
  232|  5.04k|            ret = 1;
  233|  5.04k|            break;
  234|  5.04k|        }
  235|  11.5k|    }
  236|  5.13k|    sk_SSL_CIPHER_free(cipher_stack);
  ------------------
  |  | 1034|  5.13k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
  237|  5.13k|    if (ret == 0)
  ------------------
  |  Branch (237:9): [True: 89, False: 5.04k]
  ------------------
  238|     89|        return 0;
  239|       |
  240|       |    /* Check we have at least one EC or FFDHE supported group */
  241|  5.04k|    tls1_get_supported_groups(s, &pgroups, &num_groups);
  242|  27.0k|    for (j = 0; j < num_groups; j++) {
  ------------------
  |  Branch (242:17): [True: 26.7k, False: 303]
  ------------------
  243|  26.7k|        uint16_t ctmp = pgroups[j];
  244|  26.7k|        const TLS_GROUP_INFO *ginfo = NULL;
  245|       |
  246|  26.7k|        if (!tls_valid_group(s, ctmp, min_version, max_version, NULL, &ginfo))
  ------------------
  |  Branch (246:13): [True: 185, False: 26.6k]
  ------------------
  247|    185|            continue;
  248|       |
  249|  26.6k|        if (check_type == ffdhe_check && is_ffdhe_group(ginfo->group_id)
  ------------------
  |  Branch (249:13): [True: 14.8k, False: 11.8k]
  |  Branch (249:42): [True: 1.48k, False: 13.3k]
  ------------------
  250|  1.48k|            && tls_group_allowed(s, ctmp, SSL_SECOP_CURVE_SUPPORTED))
  ------------------
  |  | 2749|  1.48k|#define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2730|  1.48k|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  |  Branch (250:16): [True: 1.43k, False: 43]
  ------------------
  251|  1.43k|            return 1;
  252|       |
  253|  25.1k|        if (check_type != ffdhe_check && is_ecdhe_group(ginfo->group_id)
  ------------------
  |  Branch (253:13): [True: 11.8k, False: 13.3k]
  |  Branch (253:42): [True: 3.38k, False: 8.42k]
  ------------------
  254|  3.38k|            && tls_group_allowed(s, ctmp, SSL_SECOP_CURVE_SUPPORTED))
  ------------------
  |  | 2749|  3.38k|#define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2730|  3.38k|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  |  Branch (254:16): [True: 3.30k, False: 80]
  ------------------
  255|  3.30k|            return 1;
  256|  25.1k|    }
  257|    303|    return 0;
  258|  5.04k|}
extensions_clnt.c:add_key_share:
  792|  3.08k|{
  793|  3.08k|    unsigned char *encoded_pubkey = NULL;
  794|  3.08k|    EVP_PKEY *key_share_key = NULL;
  795|  3.08k|    size_t encodedlen;
  796|       |
  797|  3.08k|    if (loop_num < s->s3.tmp.num_ks_pkey) {
  ------------------
  |  Branch (797:9): [True: 0, False: 3.08k]
  ------------------
  798|      0|        if (!ossl_assert(s->hello_retry_request == SSL_HRR_PENDING)
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (798:13): [True: 0, False: 0]
  ------------------
  799|      0|            || !ossl_assert(s->s3.tmp.ks_pkey[loop_num] != NULL)) {
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (799:16): [True: 0, False: 0]
  ------------------
  800|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  801|      0|            return 0;
  802|      0|        }
  803|       |        /*
  804|       |         * Could happen if we got an HRR that wasn't requesting a new key_share
  805|       |         */
  806|      0|        key_share_key = s->s3.tmp.ks_pkey[loop_num];
  807|  3.08k|    } else {
  808|  3.08k|        key_share_key = ssl_generate_pkey_group(s, group_id);
  809|  3.08k|        if (key_share_key == NULL) {
  ------------------
  |  Branch (809:13): [True: 0, False: 3.08k]
  ------------------
  810|       |            /* SSLfatal() already called */
  811|      0|            return 0;
  812|      0|        }
  813|  3.08k|    }
  814|       |
  815|       |    /* Encode the public key. */
  816|  3.08k|    encodedlen = EVP_PKEY_get1_encoded_public_key(key_share_key,
  817|  3.08k|        &encoded_pubkey);
  818|  3.08k|    if (encodedlen == 0) {
  ------------------
  |  Branch (818:9): [True: 0, False: 3.08k]
  ------------------
  819|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EC_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  820|      0|        goto err;
  821|      0|    }
  822|       |
  823|       |    /* Create KeyShareEntry */
  824|  3.08k|    if (!WPACKET_put_bytes_u16(pkt, group_id)
  ------------------
  |  |  911|  6.17k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (824:9): [True: 0, False: 3.08k]
  ------------------
  825|  3.08k|        || !WPACKET_sub_memcpy_u16(pkt, encoded_pubkey, encodedlen)) {
  ------------------
  |  |  940|  3.08k|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (825:12): [True: 0, False: 3.08k]
  ------------------
  826|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  827|      0|        goto err;
  828|      0|    }
  829|       |
  830|       |    /* For backward compatibility, we use the first valid group to add a key share */
  831|  3.08k|    if (loop_num == 0) {
  ------------------
  |  Branch (831:9): [True: 1.66k, False: 1.42k]
  ------------------
  832|  1.66k|        s->s3.tmp.pkey = key_share_key;
  833|  1.66k|        s->s3.group_id = group_id;
  834|  1.66k|    }
  835|       |    /* We ensure in t1_lib.c that the loop number does not exceed OPENSSL_CLIENT_MAX_KEY_SHARES */
  836|  3.08k|    s->s3.tmp.ks_pkey[loop_num] = key_share_key;
  837|  3.08k|    s->s3.tmp.ks_group_id[loop_num] = group_id;
  838|  3.08k|    if (loop_num >= s->s3.tmp.num_ks_pkey)
  ------------------
  |  Branch (838:9): [True: 3.08k, False: 0]
  ------------------
  839|  3.08k|        s->s3.tmp.num_ks_pkey++;
  840|       |
  841|  3.08k|    OPENSSL_free(encoded_pubkey);
  ------------------
  |  |  132|  3.08k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  842|  3.08k|    return 1;
  843|      0|err:
  844|      0|    if (key_share_key != s->s3.tmp.ks_pkey[loop_num])
  ------------------
  |  Branch (844:9): [True: 0, False: 0]
  ------------------
  845|      0|        EVP_PKEY_free(key_share_key);
  846|      0|    OPENSSL_free(encoded_pubkey);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  847|      0|    return 0;
  848|  3.08k|}

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

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

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

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

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

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

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

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

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

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

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

